11-10-2016 04:28 PM
I am using this php SDK (https://github.com/AuthorizeNet/sdk-php), and I don't see any documentation on how to add an order description for a subscription. It has been pretty frustrating, and I feel I am probably missing something obvious. I need this, as I use the description to pass along parameters needed by a third party app that are unique to each subscription (CRM Contact ID, CRM Order Id, CRM Product Id).
The only way I have found this possible is by using the old php API (https://github.com/AuthorizeNet/sdk-php/blob/master/doc/ARB.markdown), using the follow code:
$subscription = new AuthorizeNet_Subscription;
$subscription->orderDescription = $read_Description;
// Update Subscription
$request = new AuthorizeNetARB;
$response = $request->updateSubscription($response->getSubscriptionId(), $subscription);
This flow isn't ideal, because I am using two different APIs. I add the subscription with the new API, then update it (which is when I add the order description) with the old API.
I am hoping there is way I can use the new SDK and add the order description to the subscription with one call. Any help is greatly appreciated!
11-10-2016 04:51 PM
The API supports what you need, but it's not included in the sample code. I would recommend opening an issue on GitHub and ask it be added. An issue on GitHub will notify the developer responsible for this section and you'll be notified as soon as it's available.
11-12-2018 03:37 PM - edited 11-12-2018 03:38 PM
There is a a LOT missing from the sample code on the Accept Hosted API Help Guide!
I am using the sim.php and able to pass these before creating the hash and for the life of me, I cannot find the same functionality in the accept hosted...
$x_Description = $_REQUEST['x_Description'];
$x_Amount = $_REQUEST['x_Amount'];
$x_cust_id = $_REQUEST['x_cust_id'];
$x_company = $_REQUEST['x_company'];
$x_po_num = $_REQUEST['x_po_num'];
$x_event = $_REQUEST['x_event'];
Where exactly is it documented in the API documentation? I have crawled all over that... and this seems like it really should be some basic stuff....
I'm just trying to move a customer over and I don't need every imaginable jsfeature and every payment method... I just need to pass a fixed amount and a customer reference number....