Skip to content

Commit

Permalink
KlarnaWidget to use authorization token onComplete (#2358)
Browse files Browse the repository at this point in the history
  • Loading branch information
longyulongyu authored Oct 16, 2023
1 parent 4f3fedf commit 65c41c3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/cyan-tools-love.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@adyen/adyen-web': patch
---

Improvements: add `authorization_token` in the Klarna widget AdditionalDetails state data, so that we are aligned with the API specs.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ export function KlarnaWidget({ sdkData, paymentMethodType, payButton, ...props }
data: {
paymentData: props.paymentData,
details: {
token: res.authorization_token
// For the backward compatibility we need to pass both 'token' and 'authorization_token'
token: res.authorization_token,
authorization_token: res.authorization_token
}
}
});
Expand Down

0 comments on commit 65c41c3

Please sign in to comment.