09-20-2018 12:09 PM
I'm a newbie to Authorize.net integration. I am invoking hosted payment page from my application and getting a Webhook for the authorize/capture. Given the transID in the Webhook, I send a getTransactionDetailsRequest. The code I'm using is similar to the online examples, where I:
1. instantiate a getTransactionDetailsRequest (call it <my_request>)
2. fill in the MerchantAuthentiation and TransId
3. instantiate new GetTransactionDetailsController(<my_request>)
4. call the execute() method on the controller
5. load the response into a response object via getAPIResponse()
Question: is there a way to convert or retrieve that entire response in JSON format, like you see in the API Reference "Try It" examples? I will want to pull certain fields (InvoiceNumber, Amount, etc.) from the response to do further processing, but I'd also like to take the entire response and store it in a log file.
Thanks in advance for anyone's help!
12-26-2018 03:32 AM
The intent of the SDKs are to provide language libraries which helps easy integration with the AuthorizeNet API. Thus the underlying SDK can be using xml or json requests for communication to the server which user need not worry about.
Right now the PHP SDK uses XML but luckily for PHP AuthorizeNet have been working on a new version of the SDK on JSON, it currently in public ALPHA and undergoing testing, you can have look into that if that fulfills your requirement
NOTE : This is NOT a stable release, and it is NOT recommended to be used in live/production systems