@flycoders_sourav wrote:
I’m facing some problem with payment get way. I use rozarpayment get way. payment method is working perfectly but while i tired to save payment details in db data are not saved please give me any suggestion.
pay() { var options = { description: 'Credits towards consultation', image: 'http://xxxx.ca/tssf/append/images/tssf-icon-1024.png', currency: 'INR', key: 'rzp_live_xxxxx',// this key need to chage for every app amount: this.ammout, name: 'TSSF', prefill: { email: this.email, contact: this.number, name: this.name }, theme: { color: '#F37254' }, modal: { ondismiss: function() { alert('dismissed') } } }; alert(JSON.stringify(options)) var successCallback = function(payment_id) { alert('payment_id: ' + payment_id); this.payment_id =payment_id; let paymentRecord={ name:this.name, email:this.eamil, contact:this.contact, payment_id:this.payment_id, user_id:this.user_id, } this.restApi.storepaymentRecord(paymentRecord).subscribe(data=>{ alert(JSON.stringify(data)) this.toasService.show('Your transaction is complete Your payment has been successfully!') },error=>{ alert(JSON.stringify(error)) }) }; var cancelCallback = function(error) { alert(error.description + ' (Error ' + error.code + ')'); this.toasService.show(error.description + error.code) }; RazorpayCheckout.open(options, successCallback, cancelCallback); }
Any help would be highly appreciated
Posts: 1
Participants: 1