#Nyxi - on payment method errors

1 messages · Page 1 of 1 (latest)

lean oakBOT
fair glade
#

I suspect that, in order to trigger this event, the PaymentResponse object must already exist.

fallow swan
#

handler says it will be called with a PaymentResponse, so when would this be created beforehand, if not here?

fair glade
#

A callback function that will be called with a PaymentResponse object when the event is fired. The PaymentResponse object will contain a paymentMethod field.

#

So basically you are wondering where the error will get thrown in the life cycle of the PRB?

fallow swan
#

Okay so it just doesn't call it if an error occurs?

#

Yeah I guess

#

normally callbacks for anything networked contain either an error or the expected object

fair glade
#

Yes that is what I would expect as well (in general).

fallow swan
#

I suppose since this is a listener, it just doesn't call it until there is an object to pass

#

But then I would expect paymentRequest.on('error', handler) to also exist

fair glade
#

Okay got some clarification (sorry for the delay). So the events only fire when a Token/Payment Method is created. I'm still asking about what happens if there is an error during PM creation

fickle night
#

Nyxi - on payment method errors

fallow swan
#

Cool

#

Let me know

fair glade
#

Sorry to leave you hanging but I'm not getting any further info on the Payment Request potential error states

#

Follow up: Tokenization errors will be handled by the respective Wallets.