The following is my code:
...
...
$request = new AnetAPI\ARBCreateSubscriptionRequest();
$request->setMerchantAuthentication($merchantAuthentication);
$request->setSubscription($subscription);
$controller = new AnetController\CreateTransactionController($request);
$response = $controller->executeWithApiResponse( \net\authorize\api\constants\ANetEnvironment::SANDBOX);
I am creating a subscription using existing customer profile id and customer payment profile id. It creates a subscription successfully. Th problem is that, its not returning any reference of subscription i.e subscriber id or subscription id.
transactionResponse and profileResponse is empty.
As there is no reference of subscription id, there is no way to update it or cancel it. Can anyone suggest how to get the subscription id ?
thanks
Solved! Go to Solution.
08-18-2016 11:02 AM
The problem is solved. Here is some sample code for it.
08-19-2016 11:54 AM
The problem is solved. Here is some sample code for it.
08-19-2016 11:54 AM
Hi shafiqhossain,
There is no transaction created at the time of subscription creation this is why there wont be a transactionResponse. There will be a subscriptionId in the subscriptionResponse along with a "profile" object of a customerProfileIdType.
Thanks,
Joy
08-19-2016 01:26 PM