Hi,
I am new to Authorize.net and I am stuck with using the API to authorize a card.
The documentation provided is vague. It ask to use the sample php code and that's it.
Can some one please explain the directory structure.
For now, I have added the authorize credit card code snippet into a php with my sandbox credentials and hosted it on the server.
It uses couple of namespaces so had to add the lib folder which I extracted from the sdk.
When I try to execute the php from my page onclick button, I get a 500 Error.
Since the API method did not work, I tried using the SDK for the integration, I uploaded the SDK to my server and executed the sample-code-php/PaymentTransactions/charge-credit-card.php by just providing my api id and transaction key, but I get the same error.
For some reason the USE command for the namespaces shows error though I have it in the lib folder
Can someone please help me with the steps I need to follow to setup the php and be able to execute it from my webpage?
Thanks in advance...
10-12-2016 07:01 AM - edited 10-12-2016 07:09 AM
Hi keshavnaik,
You need to make sure to install the SDK. Our SDK is designed to be loaded using composer which automatically also downloads other dependencies such as the serializer. Please make sure you are using composer or those dependencies will be failing. Please note that you can integrate directly with our XML without using the SDK if you prefer, you are not required to use our SDK to integrate with us.
Thanks,
Joy
10-13-2016 03:24 PM
Thanks for the reply Joy...
I would like to be able to invoke the api without the sdk.
Canyou help me with the endpoint URL and the format of the xml for the http request.
are there any other request parameters I need to provide?
Is there any explaination about this method on the Authorie API Reference guide?
Thanks
Keshav Naik
10-21-2016 09:21 AM
Hello @keshavnaik
The API Reference provides both the sandbox and production endpoints (check under authentication), as well as detailed XML/JSON request and response formats for all of our API Methods.
http://developer.authorize.net/api/reference
Richard
10-21-2016 09:26 AM
I am trying to configure the sdk on another server to get the API working but I get the same 500 error there too...
Can it be that the server is not able to handle the php version which the sdk is working with?
10-21-2016 09:27 AM
Which version of the SDK are you using?
10-21-2016 12:39 PM
I am trying with sdk-php-1.9.0
10-24-2016 04:06 AM