cancel
Showing results for 
Search instead for 
Did you mean: 

CIM & ARB creating subscriptions not returning any subscription reference

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

shafiqhossain
Member
1 ACCEPTED SOLUTION

Accepted Solutions
shafiqhossain
Member
2 REPLIES 2
shafiqhossain
Member

 

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

Joy
Administrator Administrator
Administrator