I am using the C# SDK to implement a Subscription. Unfortunately there is no documentation on how to use the SDK; Topic Here
I have figured out how to a single transaction:
Gateway gate = new Gateway("NAME", "PASS"); var request = new AuthorizationRequest(txtCCNum.Text, cboExpMonth.SelectedValue + cboExpYear.SelectedValue, txtCost.Text, "MY DESC"); request.Queue(ApiFields.Method, "CC"); var response = gate.Send(request);
However I can't figure out how to create the SubscriptionRequest as ithas no constructor
SubscriptionGateway subGate = new SubscriptionGateway("NAME", "PASS"); var subRequest = new SubscriptionRequest();
Any code samples of using the C# SDK with Subscriptions?
โ08-26-2011 10:00 AM
Got it.
Well after loading the SDK project I dove into the code. It looks like the cycles are broken out into it's own methods:
var subRequest = SubscriptionRequest.CreateMonthly("email", "desc", amount);
โ08-26-2011 10:09 AM
Yes, but there does not appear to be a method for creating quarterly subscriptions!!
โ11-28-2011 04:25 PM
I don't know C#, but looking at the source code, I see this:
public static SubscriptionRequest CreateAnnual(string email, string subscriptionName, decimal amount, short numberOfBillings) { var sub = new SubscriptionRequest(); sub.CustomerEmail = email; sub.Amount = amount; sub.SubscriptionName = subscriptionName; sub.BillingCycles = numberOfBillings; sub.BillingInterval = 12; return sub; }
Seems to me it would be easy to add another function to the code for quarterly billing, or add a function that lets you specify the BillingInterval as an argument. I don't know why the API has all these millions of methods rather than just one that can be set to whatever you want, anyway - seems rather inefficient.
โ11-28-2011 11:31 PM
How to apply AVS & CCV verification API for subscriptiongetway.Plz do reply as soon as possible
โ12-12-2013 11:01 PM
You would have to do a AIM auth_only transaction to get the AVS & CCV response. Then, create the ARB subscription.
โ12-13-2013 04:14 AM
Thank you for your reply,yes i have already read this AIM auth_only somewher at u r blogs...but i m unable to apply this functionality before ARB subscription.can u plz provide me the sample code for the same.
โ12-15-2013 09:49 PM
it not a function of ARB, it an AIM transaction. you can either use the sample code, the sdks, or your own code by reading the documentation.
โ12-16-2013 04:28 AM