MakePaymentOnline method
Future<void>
MakePaymentOnline(
{ - dynamic amount,
- dynamic mobnum,
- dynamic email,
- dynamic desc,
})
Implementation
Future<void> MakePaymentOnline({amount, mobnum, email, desc}) async {
Razorpay razorpay = Razorpay();
var options = {
'key': razorPay_Key,
'amount': amount,
'name': 'Medibhai',
'description': desc.toString(),
'retry': {'enabled': true, 'max_count': 1},
'send_sms_hash': true,
'prefill': {'contact': mobnum, 'email': email},
'external': {
'wallets': [
'paytm',
]
}
};
razorpay.on(Razorpay.EVENT_PAYMENT_ERROR, _handlePaymentError);
razorpay.on(Razorpay.EVENT_PAYMENT_SUCCESS, _handlePaymentSuccess);
razorpay.on(Razorpay.EVENT_EXTERNAL_WALLET, _handleExternalWallet);
razorpay.open(options);
}