sdk-php icon indicating copy to clipboard operation
sdk-php copied to clipboard

CIM-ARB Not returning subscription reference

Open shafiqhossain opened this issue 10 years ago • 1 comments

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 you suggest how to get the subscription id ?

thanks

shafiqhossain avatar Aug 18 '16 17:08 shafiqhossain

@shafiqhossain Are you following the create-subscription-from-customer-profile

In that lines 36-37 show how to set create a subscription from customer profile id and customer payment profile id. Also please use ARBCreateSubscriptionController instead of CreateTransactionController as in line 47

Please ask if you are able to run it.

ashtru avatar Aug 19 '16 05:08 ashtru