I have downloaded code of c#.net ARB from sample code section. I am having ARB Test account credentials.
But I do not understand, how to integrate that sample code in my website. I want to create subscriptions, update subscriptions and cancel subscriptions accordingly.
Please guide me for the same.
You should start by reading the ARB integration guide.
Thanks for the reply. I already read that guide. But I want to know how to implement sample code in my website, where I am reading credit card values from database. How can I pass that values to function in class file.
I am not sure if this is what you are looking for, but whether you are using the XML or SOAP sample code, my answer is the same.
ARBSubscriptionType sub = new ARBSubscriptionType(); creditCardType creditCard = new creditCardType(); sub.name = "Sample subscription"; creditCard.cardNumber = "4111111111111111"; creditCard.expirationDate = "2010-08"; // required format for API is YYYY-MM sub.payment = new paymentType(); sub.payment.Item = creditCard; sub.billTo = new nameAndAddressType(); sub.billTo.firstName = "John"; sub.billTo.lastName = "Smith";
Wherever there are constant values, like "4111111111111111" or "John" and "Smith", you can use values read from your database to set these fields instead.
Is this what you are looking for?
(Note: While I try not to post gratuitous plugs, given the nature of your question I feel I should point out that my company sells a .NET library for accessing AIM and ARB called I-Bill IT. It costs just $99 and could save you a bunch of development time writing your own layer on the Authorize.net APIs. You can read more about it here[^], and can download a trial version here[^].)
Thanks for your reply. I managed to integrate ARB functions in my website. Now subscription are created with database values.
Now, I am having another question. As I further progress, I am now working on Cancel Subscription. It is working fine.
But the problem is that, If I have created one subscription on 1st Jan 2009 with 1 month billing cycle, and unsubscribed it on 15th Jan 2009, When did subscription will be unsubscribed, on 15th Jan 2009 or 1Feb 2009?
Same question is for update subscription also.
Please provide me guidance.
If your question is will Authorize.net prorate the amount charged to the customer's credit card, then the answer is no. So, when you cancel the subscription on Jan 15th, the customer's card will not be billed anything on the 15th, Feb 1st, or any other time until you create a new subscription or otherwise cause their card to be billed. If you need to prorate someone's subscription, you must do that on your own, either in code or manually via the merchant interface. The same applies to updating subscriptions.
If you want to implement prorating payments, then you need to think about whether customers are paying for a month in advance with each billing cycle or paying for the month just completed? If they are paying a month in advance, then you will need to capture the TransactionID (using SilentPost) of each transaction submitted via ARB, and when a customer cancells their subscription, use that TransactionID to issue a CREDIT transaction for the portion of the month unused. If you bill for the month just completed, then you can calculate how much the customer owes for the partial month and charge them that amount using AIM.
Thanks for the reply. I understand from your post that authorize.net unsubscribe the subscription immediately, and cannot wait till monthly billing cycle.
I want to know how to set silent post url in my arb test account.
If setting is in the Configure ARB Email Notifications section of arb, then I am getting error message to that section as
Access is denied.
Please provide me guidance.
You can set the SilentPost URL in your test account by logging in to your test account at https://test.authorize.net, clicking "Account" in the blue menu bar at the top, then in the first section, "Transaction Format Settings", under the sub-section "Transaction Response Settings", select "Silent Post URL". In there, set the URL field to a page on your site that has code to handle the Silent Post submit. Whenver a transaction is submitted to your account, the URL you set will be called just as if it was coming from a form submit. This means you can use the Request.Form collection to retrieve all of the values submitted. For more details check out the following thread:
I am having a challenge updating the credit card information. There is a reponse type for updating but not a method like the create subscription or cancel subscription.
AuthorizationService.ARBUpdateSubscriptionResponseType _response =
the code above does nto allow any paramters so i cannot pass in the Authorization or the subscription object. help would be much appreciated.
Are you using ARB XML C# sample code? Code exists in the sample code that performs both the update of the subscription and displays the resulting response that occurs.
If you can provide more information about the problem you are having it may be helpful.