#Nyxi - on payment method errors
1 messages · Page 1 of 1 (latest)
I suspect that, in order to trigger this event, the PaymentResponse object must already exist.
handler says it will be called with a PaymentResponse, so when would this be created beforehand, if not here?
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?
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
Yes that is what I would expect as well (in general).
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
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
Nyxi - on payment method errors