razorpay / razorpay-flutter

Razorpay Flutter Plugin
MIT License
106 stars 147 forks source link

How to show qr payment method in flutter #393

Open PavanZensark opened 1 month ago

PavanZensark commented 1 month ago

Hi, can you please help me to show Qr code in payment options

PavanZensark commented 1 month ago

'config': { 'display': { 'blocks': { 'upi': { 'name': 'Pay via UPI', 'instruments': [ { 'method': 'upi', 'flows': ['qr'], 'apps': ['google_pay', 'phonepe', 'bhim'] }, ], }, // 'wallets': { // 'name': 'Pay via wallet', // 'instruments': [ // { // 'method': 'wallet', // "wallets": ["amazonpay"] // }, // ] // }, }, 'sequence': ['block.upi'], 'preferences': { 'show_default_blocks': false, }, }, },

                its throwing error as "No appropriate payment method found", when flows qr is added
vivekshindhe commented 1 month ago

@PavanZensark Hey, so we don't show the QR code on devices with less than a pre-set width size. In this case, it is 485px. Any device with a width greater than this would have the QR code enabled/visible by default. Unfortunately, we cannot enable the QR code on mobile devices with the config options either.

PavanZensark commented 1 month ago

@vivekshindhe really appreciate for the fast response, is there any way we can show qr and receive status of payment in mobile

vivekshindhe commented 1 month ago

@PavanZensark The status of the payment will be relayed to the application via the events mentioned here. Regarding the QR code, unfortunately there is no way to manually enable QR on mobile device below a certain size.