MakePaymentOnline method
Future<void>
MakePaymentOnline({
- dynamic amount,
- dynamic mobnum,
- dynamic email,
- dynamic description,
- dynamic name,
- dynamic razorpayOrderId,
- dynamic medicine_razorpay_key,
Implementation
Future<void> MakePaymentOnline({
amount,
mobnum,
email,
description,
name,
razorpayOrderId,
medicine_razorpay_key,
}) async {
Razorpay razorpay = Razorpay();
var options = {
'key': medicine_razorpay_key,
'amount': amount,
'name': name,
'order_id': razorpayOrderId,
'description': description.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);
}