diff --git a/lib/recurly/amazon/amazon-pay.js b/lib/recurly/amazon/amazon-pay.js index bd938895f..10c75fa1c 100644 --- a/lib/recurly/amazon/amazon-pay.js +++ b/lib/recurly/amazon/amazon-pay.js @@ -17,10 +17,9 @@ class AmazonPay extends Emitter { path: `/amazon_pay/start?region=${this.region}`, type: Frame.TYPES.WINDOW, defaultEventName - }).on('error', cause => console.log(cause)) - .on('done', results => { - this.emit('token', results); - }); + }) + .on('error', cause => this.emit('error', cause)) + .on('done', results => this.emit('token', results)); } }