Hi there,
We are almost towards the completion of the authorize.net integration with our own application. We have been receiving the response parameters through IframeCommunicator page. As of now we have set the "showReceipt" parameter in the "hostedPaymentReturnOptions" accept hosted page setting to "false" because if its set to "true" it redirects to our custom receipt page without returning any response parameters. we would like t know if there is a way to redirect to our page from the iframe communicator while getting the transaction response parameters along.
Thanks in advance.
โ04-03-2018 01:34 PM
Hi @Mohammed
When you embed our hosted form in an IFrame on your page, our hosted form can in turn embed your IFrameCommunicator page within it inside an invisible IFrame. This enables a channel of communication that allows us to send messages to your IFrameCommunicator page. Then, as long as your IFrameCommunicator page is hosted on the same domain as your main page, it can communicate back to your main page.
This channel of communication is used to pass a few basic messages back to a listener script running on your main page (the page that calls the form):
For an example of an IFrameCommunicator page and more information about the messages passed, see our sample IFrameCommunicator.html in our sample application on GitHub.
โ04-04-2018 12:45 AM
Can someone please post a php example of how to handle Request Succeeded? I don't see any examples of this.
โ04-18-2018 01:18 PM
Hi @tapseries
Have you checkout this https://github.com/AuthorizeNet/accept-sample-app/blob/master/README-AcceptHosted.md
Hope it helps !!!
โ04-18-2018 01:25 PM
Thanks. I am trying to redirect to a receipt page that already exists. I tried the code below, but it still shows the auth.net receipt.
<script type="text/javascript"> function callParentFunction(str) { if (str && str.length > 0 && window.parent && window.parent.parent && window.parent.parent.CommunicationHandler && window.parent.parent.CommunicationHandler.onReceiveCommunication) { window.parent.parent.CommunicationHandler.onReceiveCommunication = function (argument) { params = parseQueryString(argument.qstr) parentFrame = argument.parent.split('/')[4]; switch (params['action']) { case "transactResponse": $('#HostedPayment').attr('src','<receipt url>'); } } } }
โ04-18-2018 01:54 PM
I just tried the custom receipt code in the readme file and I still get an auth. net receipt page.
โ04-18-2018 02:23 PM
hi @tapseries
Can you please post the request you passing for getHostedPaymentPage API ?
Thanks
โ04-18-2018 10:48 PM