I'm sure it's lack of sleep, but I can't seem to fugure out how to add an order description to "Charge A Card" in PHP.
This one didn't throw any errors, but it it didn't add the description to the email receipt either. The part that is confusing is... Do I need to setup the new Anet part (and did I do it correctly) or would the description just fit into an existing part of the code sample for Charge A Card? I guess I'm not sure on which ones get their own Anet setup and what keyword to use for each top level section. I've seen some that show a single word in the API documentation, but then have 2 words in the Anet setup. It would be nice if there was a key in the samples that shows every option and where it goes under or how it plugs in. Anyway, my code is below and again is not working to add the description to the order.
$orderInfo = new AnetAPI\OrderType();
$orderInfo->setDescription("This is the product description");
I realize the API sample code should be enough to build upon, but the naming and plugging in of the additional fields/choices into the API are not easy to do if you have not worked with this type of data before. Any guidance would be appreciated.
Thank you!
Solved! Go to Solution.
05-03-2016 07:16 PM
Hi there,
Just updated the sample, I think you were almost there, the order object probably wasn't added to the transaction object before the request.
We're planning to generate some PHP Docs as a supplement to the Sample code.
Thanks for the feedback,
Brian
05-04-2016 09:37 AM
Hi there,
Just updated the sample, I think you were almost there, the order object probably wasn't added to the transaction object before the request.
We're planning to generate some PHP Docs as a supplement to the Sample code.
Thanks for the feedback,
Brian
05-04-2016 09:37 AM
Thank you very much! Yeah, I missed the final piece to plug it in. I had it in the code originally, but for some reason I had that line commented. :) I really appreciate the clarification.
05-04-2016 11:49 AM