openCheckout method

void openCheckout({
  1. required String amount,
  2. required String mobileNo,
  3. required String email,
  4. required String description,
})

Implementation

void openCheckout({
  required String amount,
  required String mobileNo,
  required String email,
  required String description,
}) async {
  var options = {
    'key': razorPay_Key,
    'amount': amount,
    'name': 'Medibhai',
    'description': description,
    'retry': {
      'enabled': true,
      'max_count': 1,
    },
    'send_sms_hash': true,
    'prefill': {
      'contact': mobileNo,
      'email': email,
    },
  };

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