Hello,
What is the easiest way to create an ARB subscription using the .NET SDK? I cannot find any SDK documentation.
I see some sample code that calls a web service, which is fine if it works but I would like something even simpler. For AIM, the SDK's AuthorizationRequest object is beautifully straightforward - is there anything similar for creating ARB subscriptions?
Thanks, Crile
12-14-2011 06:52 AM
Well, there is documentation for XML and SOAP:
http://developer.authorize.net/api/arb/
<?xml version="1.0" encoding="utf-8"?>
<ARBCreateSubscriptionRequest xmlns="AnetApi/xml/v1/schema/
AnetApiSchema.xsd">
<merchantAuthentication>
<name>mytestacct</name>
<transactionKey>112223344</transactionKey>
</merchantAuthentication>
<refId>Sample</refId>
<subscription>
<name>Sample subscription</name>
<paymentSchedule>
<interval>
<length>1</length>
<unit>months</unit>
</interval>
<startDate>2007-03-15</startDate>
<totalOccurrences>12</totalOccurrences>
<trialOccurrences>1</trialOccurrences>
</paymentSchedule>
<amount>10.29</amount>
<trialAmount>0.00</trialAmount>
<payment>
<creditCard>
<cardNumber>4111111111111111</cardNumber>
<expirationDate>2008-08</expirationDate>
</creditCard>
</payment>
<billTo>
<firstName>John</firstName>
<lastName>Smith</lastName>
</billTo>
</subscription>
</ARBCreateSubscriptionRequest>
Also, I don't know how simple it is, since I don't program in .NET, but there is sample code for VB.NET and ARB here:
http://developer.authorize.net/resources/files/samplecode/vbnet_arb.zip
12-14-2011 08:58 AM
Thanks. I did see the SOAP / XML way of doing things but am looking for a wrapper around that.
I finally found the SDK docs in the form of a help file "Authorize.NET .NET SDK Documentation.chm" that gets extracted with the SDK. Looks like I can use the SubscriptionGateway and SubscriptionRequest classes to do this quite elegantly. Now to see if works...
Crile
12-14-2011 10:14 AM