I\'m using angular 2. I\'ve tried below URL\'s to integrate Razorpay [https://docs.razorpay.com/docs/checkout-form][1]
When i follow this URL, i got these errors lik
declare Razorpay inside polyfills.ts file
// polyfills.ts file
declare global {
interface Window {
Razorpay: any;
}
}
MyComponent.ts file
@Component({...})
class MyComponent {
constructor() {
}
rzp1:any;
options = {
"key": "rzp_test_HTQz79bVMhpN4L",
"amount": "2000",
"name": "Merchant Name",
....
.....
};
public initPay():void {
this.rzp1 = new window.Razorpay(this.options);
this.rzp1.open();
}
}