Skip to content

Fix: Amount input is not zeroed after successful payment#228

Merged
a1denvalu3 merged 1 commit intomainfrom
fix-amount-not-zeroed-216
Mar 19, 2026
Merged

Fix: Amount input is not zeroed after successful payment#228
a1denvalu3 merged 1 commit intomainfrom
fix-amount-not-zeroed-216

Conversation

@a1denvalu3
Copy link
Collaborator

Fixes #216.

Summary

  • Prevented cancelPayment() and onBackPressed() in PaymentRequestActivity from overwriting Activity.RESULT_OK with Activity.RESULT_CANCELED if the payment has already succeeded.
  • Now, if the user dismisses the success screen by pressing the hardware back button, it appropriately skips canceling the payment and instead elegantly fades out the success screen just like the 'Close' button does.
  • This ensures the caller ModernPOSActivity receives RESULT_OK correctly and subsequently resets the amount input field.

The amount input wasn't properly zeroing out when dismissing the payment success
overlay using the hardware back button because onBackPressed() unconditionally
called cancelPayment(), which explicitly overwrote the RESULT_OK with RESULT_CANCELED.
This caused the caller (ModernPOSActivity) to ignore the success and skip the reset.
Now, cancelPayment() and onBackPressed() respect the terminal success state and
simply dismiss the success screen without overriding the result.
@github-project-automation github-project-automation bot moved this to Backlog in Numo Mar 19, 2026
@a1denvalu3 a1denvalu3 merged commit af976b7 into main Mar 19, 2026
3 checks passed
@github-project-automation github-project-automation bot moved this from Backlog to Done in Numo Mar 19, 2026
@a1denvalu3 a1denvalu3 deleted the fix-amount-not-zeroed-216 branch March 20, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Amount input is not zeroed after successful payment

1 participant