AuthorizeNet / sample-code-php

This repository contains working code samples which demonstrate php integration with the Authorize.Net API
MIT License
175 stars 197 forks source link

No Option for setting Request Headers as JSON #140

Closed buttflattery closed 5 years ago

buttflattery commented 5 years ago

in the getTransactionDetails() example for php you have provided, there isnt any example to set the response type to json instead of xml, as i need to save the response json string in my databases for the transaction logs and wanted to mimic the same response that is shown by the API Live Console , but i cant find any way to do so using the php-sdk.

kikmak42 commented 5 years ago

Hi @buttflattery,

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 we 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

For 2.0.0-ALPHA SDK Github Release Link Packagist Link

Thanks Kaushik

buttflattery commented 5 years ago

Hmm, that is what I thought but wanted to ask about to the concerned person, thanks for the reply I will wait for the stable build to be released for the production server otherwise it would be waste of time as I cant use the Alpha Build on the production server. Thanks for your time @kikmak42