Reply
Member
Posts: 2
Registered: ‎08-09-2018
Accepted Solution

createTransactionRequest Api response error

Hello

 

I am new to Authorize.net. I am using "https://apitest.authorize.net/xml/v1/request.api" api to charge credit cards into JSON format with PHP Curl.

It transactionResponse with result "OK".

But I am getting response into string format and I am getting this with a red dot.

 

Screenshot_74.png 

 

I am not able to parse it into php.

 

 


Accepted Solutions
Solution
Accepted by topic author jy967845
‎08-10-2018 06:51 AM
Posts: 293
Kudos: 48
Solutions: 33
Registered: ‎03-13-2017

Re: createTransactionRequest Api response error

[ Edited ]

All Replies
Solution
Accepted by topic author jy967845
‎08-10-2018 06:51 AM
Posts: 293
Kudos: 48
Solutions: 33
Registered: ‎03-13-2017

Re: createTransactionRequest Api response error

[ Edited ]
Member
Posts: 2
Registered: ‎08-09-2018

Re: createTransactionRequest Api response error

I have  downloaded and configured sample code, it giving me this error when I execute this.
Fatal error: Interface 'JMS\Serializer\GraphNavigatorInterface' not found in  ............./sdk-php/vendor/jms/serializer/src/JMS/Serializer/GraphNavigator.php on line 27

 

 * Can you provide a single api to charge credit card?

 

Currently we are using this


$ch = curl_init('https://apitest.authorize.net/xml/v1/request.api');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_VERBOSE, true);
curl_setopt($ch, CURLOPT_POSTFIELDS,json_encode($post_data));
$data = curl_exec($ch);
curl_close($ch);

Highlighted
Contributor
Posts: 11
Registered: ‎09-28-2016

Re: createTransactionRequest Api response error

1. Can you also share the code for the sample code you are executing?

2. And what is the first line of your code?
Is it 

require 'vendor/autoload.php';

or

require 'autoload.php';

?

 

3. Are you using Composer? Can you share a screenshot of your folder structure - to give an idea of where the sample-code-php directory is, the sample code being exectued, and the vendor folder.