Integration and Testing

Authorize.Net API questions and help with your payment integration.

Reply
Contributor
Posts: 17
Registered: ‎03-03-2016

Example of custom receipt using iframe?

I am using the new Accept Hosted code in an iframe on a php page, and even with showReceipt is false, I still get the authorize.net receipt page.  How do I bypass that and redirect to my own receipt page?  I've searched pages and pages of files and documentation  and I still don't get it.  I need an example of using transactResponse, I don't have that in my page.  Thanks.

Authorize.Net Developer
Posts: 16
Registered: ‎03-01-2018

Re: Example of custom receipt using iframe?

[ Edited ]

Hello,

 

When you set "showReceipt" to false, you shouldn't get the receipt page, actually.

 

Since you are loading the Accept Payment Form in iFrame and want to skip the default receipt page, make sure you have "showReceipt" in <hostedPaymentReturnOptions> set to false and provide your own iFrameCommunicatorUrl to "url" in <hostedPaymentIFrameCommunicatorUrl>.

 

To implement your own iFrameCommunicatorUrl, please reference

https://github.com/AuthorizeNet/accept-sample-app/blob/master/IFrameCommunicator.html

 

For more information, you can reference

https://developer.authorize.net/api/reference/features/accept_hosted.html#Overview

https://developer.authorize.net/api/reference/#payment-transactions-get-an-accept-payment-page

 

Hope this helps! 

 

Thanks,

Angie