I've been trying to move our charges over to the API in php.
I have charge a card and create profile working but cannot get create a subscription to work.
I am trying to do this all on the same page.
I am trying to grab the profile ID, payment ID, and address ID for the subscription.
When i put the function in for ARB I get errors on the "use net\authorize\api\contract\v1 as AnetAPI;" - most likely since it was used previously. So I commented those two lines out and nothing happened. Not even an error.
Is it even possible to do these all on one page?
After the charge and create profile, I use these:
$transid=$tresponse->getTransId(); $profileID=$presponse->getCustomerProfileId; $paymentID=$presponse->getCustomerPaymentProfileIdList[0]; $addressID=$presponse->getCustomerShippingAddressIdList[0];
Is this incorrect? I could not find anything about doing it this way.
Any other suggestions if I can't?
Solved! Go to Solution.
06-12-2018 01:31 PM
Hi @deevoo
are functions,
hence you need to call as functions like this,
$profileID=$presponse->getCustomerProfileId(); $paymentID=$presponse->getCustomerPaymentProfileIdList()[0]; $addressID=$presponse->getCustomerShippingAddressIdList()[0];
Hope this helps !
06-12-2018 08:34 PM
Hi @deevoo
are functions,
hence you need to call as functions like this,
$profileID=$presponse->getCustomerProfileId(); $paymentID=$presponse->getCustomerPaymentProfileIdList()[0]; $addressID=$presponse->getCustomerShippingAddressIdList()[0];
Hope this helps !
06-12-2018 08:34 PM
This helped as far as getting the variables so I can store them but I ended up having to make another page to make the subscription after. I just couldn't get it to work with both processes on the same page for some reason.
06-13-2018 02:17 PM