ngx-paypal
ngx-paypal copied to clipboard
Callback data should be extended
Hi,
After a successful payment user is redirected to my page and it's not possible to take the "payment id" value (marked green on screenshot), because the data parameter is strongly typed as IClientAuthorizeCallbackData. This type doesn't have payments variable:
data.purchase_units[0].payments (payments is missing)
onClientAuthorization: (data) => { // data prop is typed as IClientAuthorizeCallbackData which doesn't have payments variable in purchase_units console.log( "onClientAuthorization - you should probably inform your server about completed transaction at this point", data ); },
Hi,
could you please update the interface and submit PR? I have very little time to put into this library so it would be very helpful. I can merge & publish afterwards.
@Enngage sure I will create PR for this 👍