Hi,
I am trying to update plan amount for one of the subscription ID i.e., for example user wanted to upgrade to advanced plan starting next month and he clicked on Update Subscription I would like to update the amount to 75$ from the current 50$.
I did call the ARBUpdateSubscription method with parameter as subscriptionID and the amount field in ARBSubscriptionType. Although I get the responseType as OK I do not see the amount getting updated in my subscription.
Please help!
Thanks,
Hemanth
Solved! Go to Solution.
06-30-2012 02:49 PM
I figured out the issue i.e., whenever you are updating amount using Update Webmethod you also need to set subscription.AmountSpecified = true;
This resolved my problem.
Thanks,
Hemanth
07-01-2012 10:26 PM
Post code, preferably in a code box (5th option from the left in Rich Text mode).
06-30-2012 05:25 PM
public static bool UpdateSubscriptionPlan(long AuthsubscriptionID, decimal planAmount) { bool bResult = true; MerchantAuthenticationType authentication = PopulateMerchantAuthentication(); ARBSubscriptionType subscription = new ARBSubscriptionType(); UpdateSubscriptionforAmount(subscription, planAmount); ARBUpdateSubscriptionResponseType response; response = _webservice.ARBUpdateSubscription(authentication, AuthsubscriptionID, subscription); if (response.resultCode == MessageTypeEnum.Ok) bResult = true; else bResult = false; return bResult; } private static void UpdateSubscriptionforAmount(ARBSubscriptionType subscription, decimal planAmount) { subscription.amount = planAmount; }
Please help!
07-01-2012 05:01 AM
Only the subscription ID is required, so it's possible something is going wrong with the amount assignment and then no amount is being passed and therefore nothing is being updated even though you get back a success code. My advice would be to do a dump of the data just before it's passed to Authorize.net and then a dump of what comes back, so you can take a look and be 100% sure you know what's going on.
07-01-2012 12:34 PM
I figured out the issue i.e., whenever you are updating amount using Update Webmethod you also need to set subscription.AmountSpecified = true;
This resolved my problem.
Thanks,
Hemanth
07-01-2012 10:26 PM