Reply
Member
Posts: 6
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!


Accepted Solutions
Solution
Accepted by Aaron (All Star)
‎04-20-2017 10:04 AM
All Star
Posts: 699
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.

View solution in original post


All Replies
Solution
Accepted by Aaron (All Star)
‎04-20-2017 10:04 AM
All Star
Posts: 699
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.

Member
Posts: 6
Registered: ‎03-20-2017

Re: Accept Hosted / Iframe / Cancel Button

Hi Aaron,

 

I don't think that this is an Accepted Solution.  The major issue we have in testing is that users can press "Pay" and then "Cancel" immediately.  This causes a transaction to go through on Auth.net, but users think the transaction has been cancelled.  This is a bug.  The "Pay" button is disabled when they press it, but not the cancel button?

 

I'm still not sure what the purpose of a Cancel button within an iFrame is supposed to do?  In what shopping scenario would you press a Cancel button.  I understand it on Authorize's hosted payment page (as user's may want to go back), but there is just no need for it within an iFrame.  

 

Thanks,

Mike

Contributor
Posts: 11
Registered: ‎08-02-2017

Re: Accept Hosted / Iframe / Cancel Button

I find myself in the same situation as Mike. The Accepted Hosted solution is also too quiet. If it at least told me more via the iframe communicator, such as "user pressed pay" then I could keep some state to make the cancel button a no-op at least. This is further useful because the way I have set it up, clicking anywhere outside of the iframe also closes the payment window.

km
Member
Posts: 2
Registered: ‎08-07-2017

Re: Accept Hosted / Iframe / Cancel Button

I agree, there should be an option to hide the cancel button. I ended up changing the cancelUrlText to "Back", which makes some sense for my implementation.

 

 

Kevin

All Star
Posts: 699
Registered: ‎11-03-2016

Re: Accept Hosted / Iframe / Cancel Button

Unfortunately, there's no current way to completely disable the cancel button, but I can definitely see the usefulness in such a scenario.

 

I'd encourage you to post this onto our Ideas Forum where others can take a look, contribute feedback, and vote for new features.

Highlighted
Member
Posts: 7
Registered: ‎03-07-2018

Re: Accept Hosted / Iframe / Cancel Button

We also had nowhere good to send the user when they clicked "cancel".

Also, because of this related issue https://community.developer.authorize.net/t5/Integration-and-Testing/API-hosted-form-can-t-post-afte..., which causes all payments to have an error after the 1st one had a legitimate validation error, we instead chose to name the button "Cancel and Retry", and just made it refresh the page containing the iFrame.

This way users have some clue where to go after a payment failed validation.

Member
Posts: 7
Registered: ‎03-07-2018

Re: Accept Hosted / Iframe / Cancel Button