Skip to content

Commit

Permalink
Transform result action from string to JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
douglaslise committed Jul 25, 2023
1 parent 83b11a2 commit 3937f99
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ class AlternativePaymentMethods extends Emitter {
}

async handleAction (paymentResponse) {
if (typeof(paymentResponse) === 'string') {
paymentResponse = JSON.parse(paymentResponse);
}

try {
this.gatewayStrategy.handleAction(paymentResponse);
} catch (err) {
Expand Down

0 comments on commit 3937f99

Please sign in to comment.