Skip to content

Instantly share code, notes, and snippets.

@ponnamkarthik
Created February 24, 2024 12:10
Show Gist options
  • Save ponnamkarthik/2b8e45ca7250ef22f87d983bfdf1a7f3 to your computer and use it in GitHub Desktop.
Save ponnamkarthik/2b8e45ca7250ef22f87d983bfdf1a7f3 to your computer and use it in GitHub Desktop.
void _openCheckout() {
var options = {
'key': 'YOUR_RAZORPAY_API_KEY',
'amount': 2000,
'name': 'Example Store',
'description': 'Payment for your order',
'prefill': {'contact': '9876543210', 'email': 'customer@example.com'},
};
try {
razorpay.open(options);
} catch (e) {
print('Error: $e');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment