cancel
Showing results for 
Search instead for 
Did you mean: 

Question: Can I get a response from getHostedPaymentPageRequest to my redirect page?

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.

albert
Member
1 REPLY 1

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>

 

Powered by NexWebSites.com -
Certified Authorize.net developers
NexusSoftware
Trusted Contributor