After payment declined, have to submit twice from order info page

Created on 8 August 2023, over 1 year ago
Updated 14 August 2023, over 1 year ago

Good morning,

There is one issue we came across in testing. After a payment is declined, the user is directed back to the page to edit their information, then they need to click the submit button twice in order to progress back to the payment screen. After the first click the page is refreshed and the decline error message goes away but requires clicking again to get back to the Moneris iframe to take payment.

You can test a declined transaction with a 0.05 product as per: https://developer.moneris.com/More/Testing/Penny%20Value%20Simulator

Thanks,
Chris

πŸ› Bug report
Status

Fixed

Version

1.0

Component

User interface

Created by

πŸ‡¨πŸ‡¦Canada redsky

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @redsky
  • πŸ‡¨πŸ‡¦Canada redsky

    Interestingly we just did a live test on a different Moneris account and a real credit card with a declined transaction and it did not show this double submit behavior. I didn't see the test first hand though, I can try to set the test up again if that helps.

  • πŸ‡ΊπŸ‡¦Ukraine marchuk.vitaliy Rivne, UA

    vmarchuk β†’ made their first commit to this issue’s fork.

  • @vmarchuk opened merge request.
  • Status changed to Needs review over 1 year ago
  • πŸ‡ΊπŸ‡¦Ukraine marchuk.vitaliy Rivne, UA

    @redsky @rszrama

    I created an MR with fixes. The main idea is that we need to generate a new ticket on the Moneris side in case of an error, so for that we need to do $order->unset Data('moneris checkout');. And then a new ticket will be generated in getTicket() method.
    Can you test it and let me know the results?

  • πŸ‡¨πŸ‡¦Canada redsky

    Sounds good @vmarchuk, I'm testing this now.

    Thanks!

  • πŸ‡¨πŸ‡¦Canada redsky

    Thanks for this MR!

    I tested this out and it did stop the need to press submit twice after having a declined transaction but only for the "Moneris Checkout order number strategy" named "Use the order ID with timestamp appended". (See https://www.drupal.org/project/commerce_moneris_checkout/issues/3367095 πŸ“Œ Should the order_no field be the Commerce Order No? Fixed )

    For the "Moneris Checkout order number strategy" named "Generate the order number early and use it instead of the ID" it fails. Without this MR, each submissions generates a new order_no which is consistent with the help text message "Note: generating order numbers will likely result in out of order or missing order numbers based on if / when the orders are placed." Those wasted numbers were missing from Drupal but they did show up as declined transactions in Moneris.

    We'd love it if the double pressing submit bug could be solved and still generate new order_no's with each Moneris call.

    Thanks,
    Chris

  • πŸ‡ΊπŸ‡¦Ukraine marchuk.vitaliy Rivne, UA

    @redsky @rszrama

    I added a fix to MR and changed the strategy a bit.
    Can you test it and let me know the results?

  • πŸ‡¨πŸ‡¦Canada redsky

    Great thanks @vmarchuk, I'm going to test it now.

  • πŸ‡¨πŸ‡¦Canada redsky

    This is working in my initial tests - just waiting to here back from our client.

  • πŸ‡¨πŸ‡¦Canada redsky

    I can confirm this MR worked. I accepted the Merge Request.

  • Status changed to Fixed over 1 year ago
  • Status changed to Fixed over 1 year ago
  • πŸ‡¨πŸ‡¦Canada redsky

    Creating release 1.0.1, closing.

Production build 0.71.5 2024