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

Callback data should be extended

Open tomaszzmudzinski opened this issue 5 years ago • 2 comments
trafficstars

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)

Zrzut ekranu 2020-07-10 o 18 00 28

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 ); },

tomaszzmudzinski avatar Jul 10 '20 16:07 tomaszzmudzinski

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 avatar Sep 02 '20 09:09 Enngage

@Enngage sure I will create PR for this 👍

tomaszzmudzinski avatar Sep 03 '20 07:09 tomaszzmudzinski