@flycoders_sourav wrote:
Am using razorpay After payment i want to save data into db but am not able to do here is my source code.
pay() { var options = { description: '////', image: 'xxxxxx', currency: 'INR', key: 'rzp_live_xxxxxxx',// this key need to chage for every app amount: this.total_ammount, name: 'demodemo', prefill: { email: this.email, contact: this.mobile, name: this.name }, theme: { color: '#F37254' }, modal: { ondismiss: function() { alert('dismissed') } } }; var successCallback = function(payment_id) { alert('payment_id: ' + payment_id); var savepaymentinfo = function(){ let postParams ={ userid:this.userid, ammount:this.total_ammount, payment_valid:this.payment_valid, } alert(JSON.stringify(postParams)) this.restApi.save_payment_plan(postParams).subscribe((data:any)=>{ alert(JSON.stringify(data)) },(error:any)=>{ alert(JSON.stringify(error)) }) } }; var cancelCallback = function(error) { alert(error.description + ' (Error ' + error.code + ')'); }; RazorpayCheckout.open(options, successCallback,cancelCallback); }
how to can i do that please help me anyone.
Thanks
Posts: 1
Participants: 1