Reply
Member
Posts: 5
Registered: ‎03-20-2017
Accepted Solution

Accept Hosted / Iframe / Cancel Button

Hello,

 

We are working on integrating Accept Hosted into our payment environment, and have some questions regarding the cancel button that shows up in the IFrame of the accept hosted page.

 

1.  What is the intended purpose of the cancel button?  It seems a bit wonky, as any URL we use as a "cancelUrl" will load inside the iFrame.  Where do you envision a "cancel" button taking the user?  What scenario's would this button be beneficial?

 

2.  When using the iFrame communicator, we can listen for the "cancel" event, but it also loads the cancelUrl in the Iframe as well (and there's no way to avoid loading of the cancelUrl).  Currently we are thinking the "cancel" event will just reload the page.  This just seems odd though, as the user will be flashed with whatever the cancelUrl is before the page refreshes.

 

3.  Is there any way to hide the cancel button?  

 

Thank you!

Administrator
Posts: 384
Registered: ‎11-03-2016

Re: Accept Hosted / Iframe / Cancel Button

Hi @mikeyudin,

 

In an iframe scenario, a click on the "Cancel" button calls the "cancelContinueBtnHandler" function. That function will pass a message to you that the transaction has been cancelled, and if there is a "cancelUrl" that you passed, will then direct the browser to that URL. So, that URL doesn't load within the iframe, but within the browser.

 

There's no way to disable the cancel button entirely, but you can choose whether or not to pass the URL, which would change the behavior of the button a little bit either way.

-Aaron

Aaron Wright
Developer Advocate - Authorize.Net

Follow Authorize.Net developer news on Twitter!