Hello,
I have implemented Hosted Payment Page for our company's testing website.
Using the API reference page (https://developer.authorize.net/api/reference/index.html#payment-transactions); I am sending all the customer, billing, shipping information and the transaction goes through successfully, but I am struggling to get a response from authorize.net.
I would like to know how it could be done. Ideally I would like to get a POST/GET request will all the information about the transaction on my redirect page, regardless whether it succeeds or not.
Thank you for the help.
05-02-2017 03:28 AM
If you are using the ifame method and setting the iFrameCommunicatorURL, when you request a token with :
<setting> <settingName>hostedPaymentIFrameCommunicatorUrl</settingName> <settingValue>{"url":"https://yourstore.com/iCommunicator.html"}</settingValue> </setting>
you can listen for the "transactResponse" messages in your main page and display it with JavaScript ...
<script> var transResponse = JSON.parse(params['response']); $("#HPConfirmation p").html($"+transResponse.totalAmount+"</b> for <b>"+transResponse.orderDescription+"</b> has been Processed Successfully on <b>"+transResponse.dateTime+"</b>.<br><br>Generated Order Invoice Number is : <b>"+transResponse.orderInvoiceNumber+"</b>); </script>
05-03-2017 08:08 AM - edited 05-03-2017 08:09 AM