Use this method for fetching the payment methods:
onPressed: () {final paymentMethods = await _razorpay.getPaymentMethods();}
Use this method for fetching those apps on the customer's phone which support UPI payments:
onPressed: () {final supportedUpiApps = _razorpay.getAppsWhichSupportUpi();}
Use this method to get the card network. This function expects the card number as a parameter and returns the card network eg: VISA, Mastercard, RuPay and so on:
onPressed: () {final cardNetwork = _razorpay.getCardsNetwork("<card-number>");}
Use this method to validate the card number. This function returns a boolean value that determines the card is valid or invalid:
onPressed: () {final isValidCard = await _razorpay.isValidCardNumber('4111111111111111');}
Use this method for fetching the bank logo URL. It needs bank code as a method parameter which is returned in the getPaymentMethod()
call:
onPressed: () {final bankLogoUrl = _razorpay.getBankLogoUrl("<bank-code>");}
Use this method for changing the API keys:
onPressed: () {_razorpay.changeApiKey(‘api-key’);}
Use this method for fetching the card network length:
onPressed: () {final length = await _razorpay.getCardNetworkLenght('VISA');}
Use this method for fetching the subscription amount using the subscription_id
:
onPressed: () {final subAmount = await _razorpay.getSubscriptionAmount('sub_8tkmbhhROdiVSc');}
Use this method for fetching the wallet logo URL:
onPressed: () {final walletLogo = await _razorpay.getWalletLogoUrl('paytm');}
Use this method for submitting the payment details:
onPressed: () {var options = {'key': key,'amount': 100,'currency': 'INR','email': 'gaurav.kumar@example.com','contact': '9900990099','method': 'netbanking','bank': 'hdfc'};_razorpay.submit(options);}