From 677edd13869ac984a5e03207f3def44e5d31cf30 Mon Sep 17 00:00:00 2001 From: Praful Koppalkar Date: Tue, 4 Jun 2024 18:06:53 +0530 Subject: [PATCH 1/2] fix: afterpay_body fix --- src/Utilities/PaymentBody.res | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Utilities/PaymentBody.res b/src/Utilities/PaymentBody.res index 0abd823b5..aae80371c 100644 --- a/src/Utilities/PaymentBody.res +++ b/src/Utilities/PaymentBody.res @@ -563,6 +563,10 @@ let afterpayRedirectionBody = () => [ ("payment_method", "pay_later"->JSON.Encode.string), ("payment_method_type", "afterpay_clearpay"->JSON.Encode.string), ("payment_experience", "redirect_to_url"->JSON.Encode.string), + ( + "payment_method_data", + [("pay_later", []->Utils.getJsonFromArrayOfJson)]->Utils.getJsonFromArrayOfJson, + ), ] let giroPayBody = (~name, ~iban="", ()) => [ From 934a240bc56da0a6275eb8bb21e627a9ad8e810c Mon Sep 17 00:00:00 2001 From: Praful Koppalkar Date: Tue, 4 Jun 2024 19:31:50 +0530 Subject: [PATCH 2/2] fix: small changes --- src/Utilities/PaymentBody.res | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Utilities/PaymentBody.res b/src/Utilities/PaymentBody.res index aae80371c..dc6b4c4d3 100644 --- a/src/Utilities/PaymentBody.res +++ b/src/Utilities/PaymentBody.res @@ -565,7 +565,14 @@ let afterpayRedirectionBody = () => [ ("payment_experience", "redirect_to_url"->JSON.Encode.string), ( "payment_method_data", - [("pay_later", []->Utils.getJsonFromArrayOfJson)]->Utils.getJsonFromArrayOfJson, + [ + ( + "pay_later", + [ + ("afterpay_clearpay_redirect", []->Utils.getJsonFromArrayOfJson), + ]->Utils.getJsonFromArrayOfJson, + ), + ]->Utils.getJsonFromArrayOfJson, ), ]