bcgov / namerequest

Public Front End for the Name Request System
1 stars 44 forks source link

#9009 Renew/Upgrade payment: remove previous incomplete payment after a new payment created #484

Closed eve-git closed 2 years ago

eve-git commented 2 years ago

Delete the all the incomplete payments after a new payment records created for Renew/Upgrade payments.

Issue #: /bcgov/entity#9009

Description of changes: After a new renew or upgrade payment record created, delete all the previous incomplete payment records.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the namerequest license (Apache 2.0).

severinbeauvais commented 2 years ago

@eve-git I assigned you so that the CI checks will run.

eve-git commented 2 years ago

Since Renew and Upgrade share one piece of code to create a new payment, I only list the steps to reproduce the error in Upgrade:

  1. request a name request without priority
  2. upgrade priority a. click Upgrade Priority in nr search result page b. click Continue to Payment in payment confirmation page c. leave the credit payment page by closing the browser, or clicking "back" buttons in browser or inputting a new url in the browser (The error won't show up by cancel the payment (cancel in both credit card input page and payment cancelled page)
  3. search the nr, the result page shows Request Status as Payment Incomplete.
  4. try upgrade priority again, and finish all the payment steps
  5. go to NR search result page again. Even though the nr has been upgraded successfully (you can see two receipts), the Request Status is still Payment Incomplete.

Test: follow the steps 1-4 above. When back to search result page, Request Status is Staff Review instead of Payment Incomplete.