-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(klarna): Klarna Kustom Checkout Integration #6590
Conversation
384b50f
to
c493852
Compare
da390d3
to
7e0b00e
Compare
918e778
to
1923363
Compare
ad9fc81
to
adb6a46
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dashboard specific changes look fine.
@@ -451,6 +451,7 @@ pub struct PaymentAttempt { | |||
pub status: storage_enums::AttemptStatus, | |||
pub net_amount: NetAmount, | |||
pub currency: Option<storage_enums::Currency>, | |||
pub order_tax_amount: Option<MinorUnit>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove this from here, we already have this in the net_amount field
@@ -791,6 +793,7 @@ pub enum PaymentAttemptUpdate { | |||
}, | |||
ConfirmUpdate { | |||
net_amount: NetAmount, | |||
order_tax_amount: Option<MinorUnit>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should not get this separately, use the one available in net_amount
Type of Change
Description
Klarna Kustom Checkout (KCO) integration
Klarna provides two payment methods:
Any one of the methods can be used at a time and switching between Klarna Payments and Klarna Checkout is been done. Based on the PML got, there will be a switching between Klarna Payments and Klarna Checkout.
The redirect_to_url link from response is used to complete the payment.
Additional Changes
Motivation and Context
How did you test it?
I tested it using postman by hitting the required endpoints. Curl to the postman setup:
Response:
After completing the payment on clicking the redirect_url, PSync response is as follows:
Response:
Checklist
cargo +nightly fmt --all
cargo clippy