Body: <p>There is a problem with one of the paths to register a contact for an event where if an error is returned from the payment processor (in this case IATS) the form just hangs and never returns. When the page it reloaded it displays the error.
  <a href="https://i.sstatic.net/Nm3U0.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Nm3U0.png" alt="enter image description here"></a></p>
  
  <p>If you go to the events tab of a contact and click Submit Credit Card Registration, the form only works correctly if the payment processor response is positive.
  <a href="https://i.sstatic.net/HtJyT.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/HtJyT.png" alt="enter image description here"></a></p>
  
  <p>This only happens when the form is an overlay/popup. 
  <a href="https://i.sstatic.net/jpKgX.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/jpKgX.png" alt="enter image description here"></a>
  If the user opens the link in a new tab instead of allowing for the overlay, the error is returned to the user (although in a less than pretty way). 
  <a href="https://i.sstatic.net/re5OB.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/re5OB.png" alt="enter image description here"></a>
  <a href="https://i.sstatic.net/VBLf8.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/VBLf8.png" alt="enter image description here"></a>
  This does not happen in the same context for contributions, that form reacts well to all situations. 
  The form does not hang if the response from the processor does not contain an error message.</p>
  
  <p>I'm submitting this here to get feedback before submitting this to gitlab as an issue </p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-06T22:07:09.060Z
Comments.Text: i couldn't actually see where the $ amount was on any of those screens (Blame ageing eyes perhaps). Just checking this isn't an issue (which bit us recently with a different payment gate) of problems with $0 amounts
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-06T23:05:36.643Z
Comments.Text: I posted just enough to give an idea of the workflows that works and that does not. The $ amount and all other expected fields show in both cases. 
  IATS has a test account available to anyone, if you set up a payment processor as documented here you should be able to replicate the issue,  https://home.iatspayments.com/developer-info/testing-cards/#3049
  
  (set this data for the live payment data for a testing payment processor)
Comments.UserDisplayName: ericG
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-07T01:58:55.007Z
Comments.Text: Hey ericG - I find "Error bubbles" come in late on a number of pages. I've gotten in the habit of opening a new window - copy the url to see the bubble (if things hang/take long).
Comments.UserDisplayName: KarinG - Semper IT
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-07T02:00:24.813Z
Comments.Text: Hey petednz - iATS minimum charge is $1 - it's on my ToDo list somewhere to report that back to the admin before attempting to transact with iATS Payments - but it has not surfaced near the top yet.
Comments.UserDisplayName: KarinG - Semper IT
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-07T17:53:35.243Z
Comments.Text: KarinG, since this works totally correctly in a similar context (start from contact record, go to contributions tab, make credit card contribution in overlay) even when errors are returned, but not in Event reg, I was hoping that someone more familiar with how these forms work in overlay mode would be able to find the problem without too much effort. While we've instructed users in how to avoid the problem, the inconsistency seems to indicate this can be resolved (however it's done in events)
Comments.UserDisplayName: ericG
Tags: <civievent><payment-processor>
Title: Bug in submit credit card event form when processor returns error
ThreadText: # Bug in submit credit card event form when processor returns error
  
  (Asked by: username_0 on 2019-03-06)
  
  There is a problem with one of the paths to register a contact for an event where if an error is returned from the payment processor (in this case IATS) the form just hangs and never returns. When the page it reloaded it displays the error.
  [![enter image description here](https://i.sstatic.net/Nm3U0.png)](https://i.sstatic.net/Nm3U0.png)
  
  If you go to the events tab of a contact and click Submit Credit Card Registration, the form only works correctly if the payment processor response is positive.
  [![enter image description here](https://i.sstatic.net/HtJyT.png)](https://i.sstatic.net/HtJyT.png)
  
  This only happens when the form is an overlay/popup.
  [![enter image description here](https://i.sstatic.net/jpKgX.png)](https://i.sstatic.net/jpKgX.png)
  If the user opens the link in a new tab instead of allowing for the overlay, the error is returned to the user (although in a less than pretty way).
  [![enter image description here](https://i.sstatic.net/re5OB.png)](https://i.sstatic.net/re5OB.png)
  [![enter image description here](https://i.sstatic.net/VBLf8.png)](https://i.sstatic.net/VBLf8.png)
  This does not happen in the same context for contributions, that form reacts well to all situations.
  The form does not hang if the response from the processor does not contain an error message.
  
  I'm submitting this here to get feedback before submitting this to gitlab as an issue
  
  **Tags:** civievent, payment-processor
  
  > **Comments:**
  > **username_1**: i couldn't actually see where the $ amount was on any of those screens (Blame ageing eyes perhaps). Just checking this isn't an issue (which bit us recently with a different payment gate) of problems with $0 amounts  
  > **username_0**: I posted just enough to give an idea of the workflows that works and that does not. The $ amount and all other expected fields show in both cases.  IATS has a test account available to anyone, if you set up a payment processor as documented here you should be able to replicate the issue,  https://home.iatspayments.com/developer-info/testing-cards/#3049  (set this data for the live payment data for a testing payment processor)  
  > **username_2**: Hey username_0 - I find "Error bubbles" come in late on a number of pages. I've gotten in the habit of opening a new window - copy the url to see the bubble (if things hang/take long).  
  > **username_2**: Hey petednz - iATS minimum charge is $1 - it's on my ToDo list somewhere to report that back to the admin before attempting to transact with iATS Payments - but it has not surfaced near the top yet.  
  > **username_0**: KarinG, since this works totally correctly in a similar context (start from contact record, go to contributions tab, make credit card contribution in overlay) even when errors are returned, but not in Event reg, I was hoping that someone more familiar with how these forms work in overlay mode would be able to find the problem without too much effort. While we've instructed users in how to avoid the problem, the inconsistency seems to indicate this can be resolved (however it's done in events)  
  
  ---
  
  ## 0 answers
  
  