When event is fired, the event JSON is:
type PaymentUpdateEvent = {
payment : Payment
status : string
transactionId : string
userInfo : PaymentUserInfo
}
( https://www.wix.com/corvid/reference/wix-pay-backend.Events.html#PaymentUpdateEvent )
My problem is that it gives me the details of the Paypal account that the customer paid with (email, first name, last name), but I need the user he signed up/in with.
There is userInfo in both root and in payment member and they are both the same - the Paypal account.
Is this a bug ?
What can I do to workaround this ?
I need to get the customer details (and not Paypal account he paid with) in this onPaymentUpdate function.