AuthorizeNet / sample-code-php

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

Simple curl example to fetch Authorize.net transactions #85

Closed upstateInc closed 7 years ago

upstateInc commented 7 years ago

Hello, Can we fetch the details of individual transactions by submitting the transaction Id from API without using SDK and using simple curl only? If yes kindly provide an example..

Thanks in advance.

adavidw commented 7 years ago

Hi,

The actual API reference for that request is at http://developer.authorize.net/api/reference/index.html#transaction-reporting-get-transaction-details.

There’s a sample request there in XML or JSON format, and all you’d have to do is use curl to post that whole request to the endpoint URL. (Sandbox: https://apitest.authorize.net/xml/v1/request.api or production: https://api.authorize.net/xml/v1/request.api)

On Apr 25, 2017, at 7:17 AM, upstateInc notifications@github.com wrote:

Hello, Can we fetch the details of individual transactions by submitting the transaction Id from API without using SDK and using simple curl only? If yes kindly provide an example..

Thanks in advance.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

adavidw commented 7 years ago

With curl on the command line, it would look something like this:

`curl -X POST -H "Content-Type: text/xml" -d '

5KP3u95bQpv 346HZ32z3fP4hTG2
  <transId>12345</transId>

' "https://apitest.authorize.net/xml/v1/request.api"`