ngx-paypal icon indicating copy to clipboard operation
ngx-paypal copied to clipboard

onApprove - actions.order.get() not working

Open emilevirus opened this issue 5 years ago • 0 comments

I'd like to verify the PayPal's details against the details I have on file. actions.order.get() does not seem to work. It works with PayPal JS though. actions.order.get() is supposed to have payer's information, but it's null here. onApprove: (data, actions) => { var o = actions.order.get(); console.log(o); if (!this.clientsdetails['fullname'].includes(o.value.payer.name.surname) || this.clientsdetails['country'] != o.value.payer.address.country_code){ this.toastr.error('Your PayPal details don\'t match the details we have'); return; } actions.order.capture(); },

emilevirus avatar Feb 01 '20 21:02 emilevirus