diff --git a/src/Payments/PaymentMethodsRecord.res b/src/Payments/PaymentMethodsRecord.res index 13e7d81b3..d5197e904 100644 --- a/src/Payments/PaymentMethodsRecord.res +++ b/src/Payments/PaymentMethodsRecord.res @@ -48,10 +48,11 @@ let getPaymentMethodsFieldsOrder = paymentMethodField => { | AddressLine2 => 5 | AddressCity => 6 | AddressState => 7 - | AddressCountry(_) => 8 - | AddressPincode => 9 | StateAndCity => 7 + | AddressCountry(_) => 8 | CountryAndPincode(_) => 8 + | AddressPincode => 9 + | CryptoCurrencyNetworks => 10 | InfoElement => 99 | _ => 3 } diff --git a/src/Utilities/PaymentBody.res b/src/Utilities/PaymentBody.res index f66dca742..9e3d6fad3 100644 --- a/src/Utilities/PaymentBody.res +++ b/src/Utilities/PaymentBody.res @@ -547,6 +547,13 @@ let applePayThirdPartySdkBody = (~connectors) => [ ), ] +let cryptoBody = [ + ("payment_method", "crypto"->JSON.Encode.string), + ("payment_method_type", "crypto_currency"->JSON.Encode.string), + ("payment_experience", "redirect_to_url"->JSON.Encode.string), + ("payment_method_data", []->Utils.getJsonFromArrayOfJson), +] + let afterpayRedirectionBody = () => [ ("payment_method", "pay_later"->JSON.Encode.string), ("payment_method_type", "afterpay_clearpay"->JSON.Encode.string), @@ -1046,7 +1053,7 @@ let getPaymentBody = ( ) => switch paymentMethodType { | "afterpay_clearpay" => afterpayRedirectionBody() - | "crypto_currency" => [] + | "crypto_currency" => cryptoBody | "sofort" => sofortBody(~country, ~name=fullName, ~email) | "ideal" => iDealBody(~name=fullName, ~bankName=bank) | "eps" => epsBody(~name=fullName, ~bankName=bank)