openCheckout method

void openCheckout({
  1. required String amount,
  2. required String mobileNo,
  3. required String email,
  4. required String description,
  5. required String razorpayOrderId,
  6. required String name,
  7. required String medicine_razorpay_key,
})

Implementation

void openCheckout({
  required String amount,
  required String mobileNo,
  required String email,
  required String description,
  required String razorpayOrderId,
  required String name,
  required String medicine_razorpay_key,
}) async {
  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': mobileNo, 'email': email},
    'external': {
      'wallets': [
        'paytm',
      ]
    }
  };

  try {
    _razorpay.open(options);
  } catch (e) {}
}