I am working on integrating Razorpay into my Angular application.
I am trying to retrieve the value of the days variable from the handler function, but I am getting an error stating that the property days does not exist.
This is a reference to the options object in the code.
days: any;
options = {
"key": "rzp_test_1234567890",
"amount": "",
"currency": "INR",
"name": "Acme Corp",
"description": "Test Transaction",
"image": "https://example.com/your_logo",
"order_id": "",
"handler": function (response:any){
SubscriptionPlanComponent.update_payment_to_paid(response,this.days); *****HERE*****
},
"prefill": {
"name": "Gaurav Kumar",
"email": "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d6b1b7a3a4b7a0f8bda3bbb7a496b3aeb7bba6bab3f8b5b9bb">[email protected]</a>",
"contact": "9999999999"
},
"notes": {
"address": "Razorpay Corporate Office"
},
"theme": {
"color": "#3399cc"
}
};
update_payment_to_paid(resp:any,days:any)
{
... ..
}