Skip to content

Commit

Permalink
Emit/forward 'error' event on AmazonPay frame errors
Browse files Browse the repository at this point in the history
  • Loading branch information
douglaslise committed Sep 26, 2023
1 parent e675bb0 commit 2d6b9fa
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/recurly/amazon/amazon-pay.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

Expand Down

0 comments on commit 2d6b9fa

Please sign in to comment.