razorpay / razorpay-flutter

Razorpay Flutter Plugin
MIT License
106 stars 144 forks source link

Razorpay closes screen without Cancel payment > are you sure you want to cancel screen showing when user presses backbutton. #369

Open Nxtframe opened 5 months ago

Nxtframe commented 5 months ago

Description

When "modal": {"confirm_close": true,} is true the screen, Are you sure you want to cancel screen should be shown when user tries to exit the screen. On trying to close payment using backbutton or gestures ,Are you sure you want to cancel screen does not show and the payment page closes directly. When this screen should be showing image

My options: var options = { "key": "rzp_test_HkIjTO2M#####", "order_id": "order_NUKeH4x6imGGoF", "amount": num.parse(textEditingController.text) * 100, "name": "Sample App", "modal": {"confirm_close": true, "escape": true}, "description": "Payment for the some random product", "prefill": {"contact": "+918258011576", "email": "shdjsdh@gmail.com"}, };

Flutter Version : Flutter 3.10.6

Xcode Version : NA

Open Xcode > Go to About Xcode > copy the Xcode version here.

Cocoapod Version : NA

Go to iOS folder > open podfile.lock > copy the razorpay-pod version and razorpay_fluttera version.

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

1.Make confirm_close:true 2.Open Razorpay Pay page

  1. Press backbutton or back gesture
  2. Razorpay closes and goes back to app.

Expected Results

On trying to close user should be shown Are you sure you want to cancel screen then user can close the app.

Snack, code example, screenshot, or link to a repository:

Reproducible code github: https://github.com/Nxtframe/flutterrazor