Skip to content

Commit

Permalink
fix: removed payment data from body
Browse files Browse the repository at this point in the history
  • Loading branch information
prafulkoppalkar committed Jun 4, 2024
1 parent 55c5f18 commit f33f947
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions src/Utilities/PaymentBody.res
Original file line number Diff line number Diff line change
Expand Up @@ -559,27 +559,10 @@ let cryptoBody = (~currency) => [
),
]

let afterpayRedirectionBody = (~fullName, ~email) => [
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",
[
(
"afterpay_clearpay_redirect",
[
("billing_email", email->JSON.Encode.string),
("billing_name", fullName->JSON.Encode.string),
]->Utils.getJsonFromArrayOfJson,
),
]->Utils.getJsonFromArrayOfJson,
),
]->Utils.getJsonFromArrayOfJson,
),
]

let giroPayBody = (~name, ~iban="", ()) => [
Expand Down Expand Up @@ -1064,7 +1047,7 @@ let getPaymentBody = (
~currency,
) =>
switch paymentMethodType {
| "afterpay_clearpay" => afterpayRedirectionBody(~fullName, ~email)
| "afterpay_clearpay" => afterpayRedirectionBody()
| "crypto_currency" => cryptoBody(~currency)
| "sofort" => sofortBody(~country, ~name=fullName, ~email)
| "ideal" => iDealBody(~name=fullName, ~bankName=bank)
Expand Down

0 comments on commit f33f947

Please sign in to comment.