Created
April 21, 2020 09:46
-
-
Save fayazara/f77fe35d075cfc8b8f390ec6181fddd1 to your computer and use it in GitHub Desktop.
Make Payments with Razorpay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
order() { | |
const rzp_options = { | |
key: "YOUR_RAZORPAY_KEY", | |
amount: this.product.price * 100, | |
name: "The Bollywood Store", | |
description: this.product.title, | |
handler: function(response) { | |
alert(`Payment Succesful ${response.razorpay_payment_id}`) | |
}, | |
modal: { | |
ondismiss: function() { | |
alert(`Payment Failed`) | |
} | |
}, | |
prefill: { | |
email: 'test@email.com', | |
contact: +914455667788 | |
}, | |
notes: { | |
name: "Customer Name", | |
item: self.product.title, | |
}, | |
theme: { | |
color: "#667eea" | |
} | |
}; | |
const rzp1 = new Razorpay(rzp_options); | |
rzp1.open(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment