diff --git a/api-reference/v1/openapi_spec_v1.json b/api-reference/v1/openapi_spec_v1.json index ccd6d2e11b..038c3326d7 100644 --- a/api-reference/v1/openapi_spec_v1.json +++ b/api-reference/v1/openapi_spec_v1.json @@ -9373,6 +9373,27 @@ "type": "object" } } + }, + { + "type": "object", + "required": [ + "indonesian_bank_transfer" + ], + "properties": { + "indonesian_bank_transfer": { + "type": "object", + "properties": { + "bank_name": { + "allOf": [ + { + "$ref": "#/components/schemas/BankNames" + } + ], + "nullable": true + } + } + } + } } ] }, @@ -9724,6 +9745,27 @@ "type": "object" } } + }, + { + "type": "object", + "required": [ + "indonesian_bank_transfer" + ], + "properties": { + "indonesian_bank_transfer": { + "type": "object", + "properties": { + "bank_name": { + "allOf": [ + { + "$ref": "#/components/schemas/BankNames" + } + ], + "nullable": true + } + } + } + } } ] }, @@ -20908,7 +20950,6 @@ "ali_pay_hk", "alma", "amazon_pay", - "skrill", "paysera", "apple_pay", "atome", @@ -20978,6 +21019,7 @@ "samsung_pay", "sepa", "sepa_bank_transfer", + "skrill", "sofort", "swish", "touch_n_go", @@ -21003,7 +21045,8 @@ "instant_bank_transfer", "instant_bank_transfer_finland", "instant_bank_transfer_poland", - "revolut_pay" + "revolut_pay", + "indonesian_bank_transfer" ] }, "PaymentMethodUpdate": { diff --git a/api-reference/v2/openapi_spec_v2.json b/api-reference/v2/openapi_spec_v2.json index 5550c859ca..8dc81cdc9a 100644 --- a/api-reference/v2/openapi_spec_v2.json +++ b/api-reference/v2/openapi_spec_v2.json @@ -6305,6 +6305,27 @@ "type": "object" } } + }, + { + "type": "object", + "required": [ + "indonesian_bank_transfer" + ], + "properties": { + "indonesian_bank_transfer": { + "type": "object", + "properties": { + "bank_name": { + "allOf": [ + { + "$ref": "#/components/schemas/BankNames" + } + ], + "nullable": true + } + } + } + } } ] }, @@ -6656,6 +6677,27 @@ "type": "object" } } + }, + { + "type": "object", + "required": [ + "indonesian_bank_transfer" + ], + "properties": { + "indonesian_bank_transfer": { + "type": "object", + "properties": { + "bank_name": { + "allOf": [ + { + "$ref": "#/components/schemas/BankNames" + } + ], + "nullable": true + } + } + } + } } ] }, @@ -17757,7 +17799,6 @@ "ali_pay_hk", "alma", "amazon_pay", - "skrill", "paysera", "apple_pay", "atome", @@ -17827,6 +17868,7 @@ "samsung_pay", "sepa", "sepa_bank_transfer", + "skrill", "sofort", "swish", "touch_n_go", @@ -17852,7 +17894,8 @@ "instant_bank_transfer", "instant_bank_transfer_finland", "instant_bank_transfer_poland", - "revolut_pay" + "revolut_pay", + "indonesian_bank_transfer" ] }, "PaymentMethodUpdate": { diff --git a/config/config.example.toml b/config/config.example.toml index cf514a273d..d90be9cae0 100644 --- a/config/config.example.toml +++ b/config/config.example.toml @@ -601,6 +601,9 @@ klarna = { currency = "EUR, DKK, NOK, PLN, SEK, CHF, GBP, USD, CZK" } trustly = {currency="DKK, EUR, GBP, NOK, PLN, SEK" } blik = { country="PL" , currency = "PLN" } atome = { country = "SG, MY" , currency = "SGD, MYR" } +ideal = { country="NL" , currency = "EUR" } +skrill = { country="AL, DZ, AD, AR, AM, AW, AU, AT, AZ, BS, BD, BE, BJ, BO, BA, BW, BR, BN, BG, KH, CM, CA, CL, CN, CX, CO, CR , HR, CW, CY, CZ, DK, DM, DO, EC, EG, EE , FK, FI, GE, DE, GH, GI, GR, GP, GU, GT, GG, HK, HU, IS, IN, ID , IQ, IE, IM, IL, IT, JE , KZ, KE , KR, KW, KG, LV , LS, LI, LT, LU , MK, MG, MY, MV, MT, MU, YT, MX, MD, MC, MN, ME, MA, NA, NP, NZ, NI, NE, NO, PK , PA, PY, PE, PH, PL, PT, PR, QA, RO , SM , SA, SN , SG, SX, SK, SI, ZA, SS, ES, LK, SE, CH, TW, TZ, TH, TN, AE, GB, UM, UY, VN, VG, VI, US" , currency = "EUR, GBP, USD" } +indonesian_bank_transfer = { country="ID" , currency = "IDR" } [pm_filters.checkout] debit = { country = "AT,BE,BG,HR,CY,CZ,DK,EE,FI,FR,DE,GR,HU,IS,IE,IT,LV,LI,LT,LU,MT,NL,NO,PL,PT,RO,SK,SI,ES,SE,CH,GB,US,AU,HK,SG,SA,AE,BH,MX,AR,CL,CO,PE", currency = "AED,AFN,ALL,AMD,ANG,AOA,AUD,AWG,AZN,BAM,BBD,BDT,BGN,BHD,BIF,BMD,BND,BOB,BRL,BSD,BTN,BWP,BYN,BZD,CAD,CDF,CHF,CLP,CNY,COP,CRC,CUP,CVE,CZK,DJF,DKK,DOP,DZD,EGP,ERN,ETB,EUR,FJD,FKP,GBP,GEL,GHS,GIP,GMD,GNF,GTQ,GYD,HKD,HNL,HRK,HTG,HUF,IDR,ILS,INR,IQD,IRR,ISK,JMD,JOD,JPY,KES,KGS,KHR,KMF,KRW,KWD,KYD,KZT,LAK,LBP,LKR,LRD,LSL,LYD,MAD,MDL,MGA,MKD,MMK,MNT,MOP,MRU,MUR,MVR,MWK,MXN,MYR,MZN,NAD,NGN,NIO,NOK,NPR,NZD,OMR,PAB,PEN,PGK,PHP,PKR,PLN,PYG,QAR,RON,RSD,RUB,RWF,SAR,SBD,SCR,SDG,SEK,SGD,SHP,SLE,SLL,SOS,SRD,SSP,STN,SYP,SZL,THB,TJS,TMT,TND,TOP,TRY,TTD,TWD,TZS,UAH,UGX,USD,UYU,UZS,VES,VND,VUV,WST,XAF,XCD,XOF,XPF,YER,ZAR,ZMW,ZWL" } diff --git a/config/deployments/integration_test.toml b/config/deployments/integration_test.toml index d9194dfa9c..9eb1d54aba 100644 --- a/config/deployments/integration_test.toml +++ b/config/deployments/integration_test.toml @@ -340,6 +340,9 @@ klarna = { currency = "EUR, DKK, NOK, PLN, SEK, CHF, GBP, USD, CZK" } trustly = {currency="DKK, EUR, GBP, NOK, PLN, SEK" } blik = { country="PL" , currency = "PLN" } atome = { country = "SG, MY" , currency = "SGD, MYR" } +ideal = { country="NL" , currency = "EUR" } +skrill = { country="AL, DZ, AD, AR, AM, AW, AU, AT, AZ, BS, BD, BE, BJ, BO, BA, BW, BR, BN, BG, KH, CM, CA, CL, CN, CX, CO, CR , HR, CW, CY, CZ, DK, DM, DO, EC, EG, EE , FK, FI, GE, DE, GH, GI, GR, GP, GU, GT, GG, HK, HU, IS, IN, ID , IQ, IE, IM, IL, IT, JE , KZ, KE , KR, KW, KG, LV , LS, LI, LT, LU , MK, MG, MY, MV, MT, MU, YT, MX, MD, MC, MN, ME, MA, NA, NP, NZ, NI, NE, NO, PK , PA, PY, PE, PH, PL, PT, PR, QA, RO , SM , SA, SN , SG, SX, SK, SI, ZA, SS, ES, LK, SE, CH, TW, TZ, TH, TN, AE, GB, UM, UY, VN, VG, VI, US" , currency = "EUR, GBP, USD" } +indonesian_bank_transfer = { country="ID" , currency = "IDR" } [pm_filters.checkout] debit = { country = "AT,BE,BG,HR,CY,CZ,DK,EE,FI,FR,DE,GR,HU,IS,IE,IT,LV,LI,LT,LU,MT,NL,NO,PL,PT,RO,SK,SI,ES,SE,CH,GB,US,AU,HK,SG,SA,AE,BH,MX,AR,CL,CO,PE", currency = "AED,AFN,ALL,AMD,ANG,AOA,AUD,AWG,AZN,BAM,BBD,BDT,BGN,BHD,BIF,BMD,BND,BOB,BRL,BSD,BTN,BWP,BYN,BZD,CAD,CDF,CHF,CLP,CNY,COP,CRC,CUP,CVE,CZK,DJF,DKK,DOP,DZD,EGP,ERN,ETB,EUR,FJD,FKP,GBP,GEL,GHS,GIP,GMD,GNF,GTQ,GYD,HKD,HNL,HRK,HTG,HUF,IDR,ILS,INR,IQD,IRR,ISK,JMD,JOD,JPY,KES,KGS,KHR,KMF,KRW,KWD,KYD,KZT,LAK,LBP,LKR,LRD,LSL,LYD,MAD,MDL,MGA,MKD,MMK,MNT,MOP,MRU,MUR,MVR,MWK,MXN,MYR,MZN,NAD,NGN,NIO,NOK,NPR,NZD,OMR,PAB,PEN,PGK,PHP,PKR,PLN,PYG,QAR,RON,RSD,RUB,RWF,SAR,SBD,SCR,SDG,SEK,SGD,SHP,SLE,SLL,SOS,SRD,SSP,STN,SYP,SZL,THB,TJS,TMT,TND,TOP,TRY,TTD,TWD,TZS,UAH,UGX,USD,UYU,UZS,VES,VND,VUV,WST,XAF,XCD,XOF,XPF,YER,ZAR,ZMW,ZWL" } diff --git a/config/deployments/production.toml b/config/deployments/production.toml index ca52d4d39f..ca1e41b39a 100644 --- a/config/deployments/production.toml +++ b/config/deployments/production.toml @@ -354,6 +354,9 @@ klarna = { currency = "EUR, DKK, NOK, PLN, SEK, CHF, GBP, USD, CZK" } trustly = {currency="DKK, EUR, GBP, NOK, PLN, SEK" } blik = { country="PL" , currency = "PLN" } atome = { country = "SG, MY" , currency = "SGD, MYR" } +ideal = { country="NL" , currency = "EUR" } +skrill = { country="AL, DZ, AD, AR, AM, AW, AU, AT, AZ, BS, BD, BE, BJ, BO, BA, BW, BR, BN, BG, KH, CM, CA, CL, CN, CX, CO, CR , HR, CW, CY, CZ, DK, DM, DO, EC, EG, EE , FK, FI, GE, DE, GH, GI, GR, GP, GU, GT, GG, HK, HU, IS, IN, ID , IQ, IE, IM, IL, IT, JE , KZ, KE , KR, KW, KG, LV , LS, LI, LT, LU , MK, MG, MY, MV, MT, MU, YT, MX, MD, MC, MN, ME, MA, NA, NP, NZ, NI, NE, NO, PK , PA, PY, PE, PH, PL, PT, PR, QA, RO , SM , SA, SN , SG, SX, SK, SI, ZA, SS, ES, LK, SE, CH, TW, TZ, TH, TN, AE, GB, UM, UY, VN, VG, VI, US" , currency = "EUR, GBP, USD" } +indonesian_bank_transfer = { country="ID" , currency = "IDR" } [pm_filters.checkout] debit = { country = "AT,BE,BG,HR,CY,CZ,DK,EE,FI,FR,DE,GR,HU,IS,IE,IT,LV,LI,LT,LU,MT,NL,NO,PL,PT,RO,SK,SI,ES,SE,CH,GB,US,AU,HK,SG,SA,AE,BH,MX,AR,CL,CO,PE", currency = "AED,AFN,ALL,AMD,ANG,AOA,AUD,AWG,AZN,BAM,BBD,BDT,BGN,BHD,BIF,BMD,BND,BOB,BRL,BSD,BTN,BWP,BYN,BZD,CAD,CDF,CHF,CLP,CNY,COP,CRC,CUP,CVE,CZK,DJF,DKK,DOP,DZD,EGP,ERN,ETB,EUR,FJD,FKP,GBP,GEL,GHS,GIP,GMD,GNF,GTQ,GYD,HKD,HNL,HRK,HTG,HUF,IDR,ILS,INR,IQD,IRR,ISK,JMD,JOD,JPY,KES,KGS,KHR,KMF,KRW,KWD,KYD,KZT,LAK,LBP,LKR,LRD,LSL,LYD,MAD,MDL,MGA,MKD,MMK,MNT,MOP,MRU,MUR,MVR,MWK,MXN,MYR,MZN,NAD,NGN,NIO,NOK,NPR,NZD,OMR,PAB,PEN,PGK,PHP,PKR,PLN,PYG,QAR,RON,RSD,RUB,RWF,SAR,SBD,SCR,SDG,SEK,SGD,SHP,SLE,SLL,SOS,SRD,SSP,STN,SYP,SZL,THB,TJS,TMT,TND,TOP,TRY,TTD,TWD,TZS,UAH,UGX,USD,UYU,UZS,VES,VND,VUV,WST,XAF,XCD,XOF,XPF,YER,ZAR,ZMW,ZWL" } diff --git a/config/deployments/sandbox.toml b/config/deployments/sandbox.toml index c7f3949075..4d369d6cec 100644 --- a/config/deployments/sandbox.toml +++ b/config/deployments/sandbox.toml @@ -363,6 +363,9 @@ klarna = { currency = "EUR, DKK, NOK, PLN, SEK, CHF, GBP, USD, CZK" } trustly = {currency="DKK, EUR, GBP, NOK, PLN, SEK" } blik = { country="PL" , currency = "PLN" } atome = { country = "SG, MY" , currency = "SGD, MYR" } +ideal = { country="NL" , currency = "EUR" } +skrill = { country="AL, DZ, AD, AR, AM, AW, AU, AT, AZ, BS, BD, BE, BJ, BO, BA, BW, BR, BN, BG, KH, CM, CA, CL, CN, CX, CO, CR , HR, CW, CY, CZ, DK, DM, DO, EC, EG, EE , FK, FI, GE, DE, GH, GI, GR, GP, GU, GT, GG, HK, HU, IS, IN, ID , IQ, IE, IM, IL, IT, JE , KZ, KE , KR, KW, KG, LV , LS, LI, LT, LU , MK, MG, MY, MV, MT, MU, YT, MX, MD, MC, MN, ME, MA, NA, NP, NZ, NI, NE, NO, PK , PA, PY, PE, PH, PL, PT, PR, QA, RO , SM , SA, SN , SG, SX, SK, SI, ZA, SS, ES, LK, SE, CH, TW, TZ, TH, TN, AE, GB, UM, UY, VN, VG, VI, US" , currency = "EUR, GBP, USD" } +indonesian_bank_transfer = { country="ID" , currency = "IDR" } [pm_filters.checkout] debit = { country = "AT,BE,BG,HR,CY,CZ,DK,EE,FI,FR,DE,GR,HU,IS,IE,IT,LV,LI,LT,LU,MT,NL,NO,PL,PT,RO,SK,SI,ES,SE,CH,GB,US,AU,HK,SG,SA,AE,BH,MX,AR,CL,CO,PE", currency = "AED,AFN,ALL,AMD,ANG,AOA,AUD,AWG,AZN,BAM,BBD,BDT,BGN,BHD,BIF,BMD,BND,BOB,BRL,BSD,BTN,BWP,BYN,BZD,CAD,CDF,CHF,CLP,CNY,COP,CRC,CUP,CVE,CZK,DJF,DKK,DOP,DZD,EGP,ERN,ETB,EUR,FJD,FKP,GBP,GEL,GHS,GIP,GMD,GNF,GTQ,GYD,HKD,HNL,HRK,HTG,HUF,IDR,ILS,INR,IQD,IRR,ISK,JMD,JOD,JPY,KES,KGS,KHR,KMF,KRW,KWD,KYD,KZT,LAK,LBP,LKR,LRD,LSL,LYD,MAD,MDL,MGA,MKD,MMK,MNT,MOP,MRU,MUR,MVR,MWK,MXN,MYR,MZN,NAD,NGN,NIO,NOK,NPR,NZD,OMR,PAB,PEN,PGK,PHP,PKR,PLN,PYG,QAR,RON,RSD,RUB,RWF,SAR,SBD,SCR,SDG,SEK,SGD,SHP,SLE,SLL,SOS,SRD,SSP,STN,SYP,SZL,THB,TJS,TMT,TND,TOP,TRY,TTD,TWD,TZS,UAH,UGX,USD,UYU,UZS,VES,VND,VUV,WST,XAF,XCD,XOF,XPF,YER,ZAR,ZMW,ZWL" } diff --git a/config/development.toml b/config/development.toml index ab5029f80b..ee66404e63 100644 --- a/config/development.toml +++ b/config/development.toml @@ -526,7 +526,10 @@ paypal = { currency = "AUD,BRL,CAD,CZK,DKK,EUR,HKD,HUF,JPY,MYR,MXN,NOK,NZD,PHP,P klarna = { currency = "EUR, DKK, NOK, PLN, SEK, CHF, GBP, USD, CZK" } trustly = {currency="DKK, EUR, GBP, NOK, PLN, SEK" } blik = { country="PL" , currency = "PLN" } +ideal = { country="NL" , currency = "EUR" } atome = { country = "SG, MY" , currency = "SGD, MYR" } +skrill = { country="AL, DZ, AD, AR, AM, AW, AU, AT, AZ, BS, BD, BE, BJ, BO, BA, BW, BR, BN, BG, KH, CM, CA, CL, CN, CX, CO, CR , HR, CW, CY, CZ, DK, DM, DO, EC, EG, EE , FK, FI, GE, DE, GH, GI, GR, GP, GU, GT, GG, HK, HU, IS, IN, ID , IQ, IE, IM, IL, IT, JE , KZ, KE , KR, KW, KG, LV , LS, LI, LT, LU , MK, MG, MY, MV, MT, MU, YT, MX, MD, MC, MN, ME, MA, NA, NP, NZ, NI, NE, NO, PK , PA, PY, PE, PH, PL, PT, PR, QA, RO , SM , SA, SN , SG, SX, SK, SI, ZA, SS, ES, LK, SE, CH, TW, TZ, TH, TN, AE, GB, UM, UY, VN, VG, VI, US" , currency = "EUR, GBP, USD" } +indonesian_bank_transfer = { country="ID" , currency = "IDR" } [pm_filters.elavon] credit = { country = "US", currency = "AED,AFN,ALL,AMD,ANG,AOA,ARS,AUD,AWG,AZN,BAM,BBD,BDT,BGN,BHD,BIF,BMD,BND,BOB,BRL,BSD,BTN,BWP,BYN,BZD,CAD,CDF,CHF,CLP,CNY,COP,CRC,CUP,CVE,CZK,DJF,DKK,DOP,DZD,EGP,ERN,ETB,EUR,FJD,FKP,GBP,GEL,GHS,GIP,GMD,GNF,GTQ,GYD,HKD,HNL,HRK,HTG,HUF,IDR,ILS,INR,IQD,IRR,ISK,JMD,JOD,JPY,KES,KGS,KHR,KMF,KPW,KRW,KWD,KYD,KZT,LAK,LBP,LKR,LRD,LSL,LYD,MAD,MDL,MGA,MKD,MMK,MNT,MOP,MRU,MUR,MVR,MWK,MXN,MYR,MZN,NAD,NGN,NIO,NOK,NPR,NZD,OMR,PAB,PEN,PGK,PHP,PKR,PLN,PYG,QAR,RON,RSD,RUB,RWF,SAR,SBD,SCR,SDG,SEK,SGD,SHP,SLE,SLL,SOS,SRD,SSP,STN,SVC,SYP,SZL,THB,TJS,TMT,TND,TOP,TRY,TTD,TWD,TZS,UAH,UGX,USD,UYU,UZS,VES,VND,VUV,WST,XAF,XCD,XOF,XPF,YER,ZAR,ZMW,ZWL" } diff --git a/config/docker_compose.toml b/config/docker_compose.toml index 3ef11162a4..e6885ab39a 100644 --- a/config/docker_compose.toml +++ b/config/docker_compose.toml @@ -502,6 +502,9 @@ klarna = { currency = "EUR, DKK, NOK, PLN, SEK, CHF, GBP, USD, CZK" } trustly = {currency="DKK, EUR, GBP, NOK, PLN, SEK" } blik = { country="PL" , currency = "PLN" } atome = { country = "SG, MY" , currency = "SGD, MYR" } +ideal = { country="NL" , currency = "EUR" } +skrill = { country="AL, DZ, AD, AR, AM, AW, AU, AT, AZ, BS, BD, BE, BJ, BO, BA, BW, BR, BN, BG, KH, CM, CA, CL, CN, CX, CO, CR , HR, CW, CY, CZ, DK, DM, DO, EC, EG, EE , FK, FI, GE, DE, GH, GI, GR, GP, GU, GT, GG, HK, HU, IS, IN, ID , IQ, IE, IM, IL, IT, JE , KZ, KE , KR, KW, KG, LV , LS, LI, LT, LU , MK, MG, MY, MV, MT, MU, YT, MX, MD, MC, MN, ME, MA, NA, NP, NZ, NI, NE, NO, PK , PA, PY, PE, PH, PL, PT, PR, QA, RO , SM , SA, SN , SG, SX, SK, SI, ZA, SS, ES, LK, SE, CH, TW, TZ, TH, TN, AE, GB, UM, UY, VN, VG, VI, US" , currency = "EUR, GBP, USD" } +indonesian_bank_transfer = { country="ID" , currency = "IDR" } [pm_filters.checkout] debit = { country = "AT,BE,BG,HR,CY,CZ,DK,EE,FI,FR,DE,GR,HU,IS,IE,IT,LV,LI,LT,LU,MT,NL,NO,PL,PT,RO,SK,SI,ES,SE,CH,GB,US,AU,HK,SG,SA,AE,BH,MX,AR,CL,CO,PE", currency = "AED,AFN,ALL,AMD,ANG,AOA,AUD,AWG,AZN,BAM,BBD,BDT,BGN,BHD,BIF,BMD,BND,BOB,BRL,BSD,BTN,BWP,BYN,BZD,CAD,CDF,CHF,CLP,CNY,COP,CRC,CUP,CVE,CZK,DJF,DKK,DOP,DZD,EGP,ERN,ETB,EUR,FJD,FKP,GBP,GEL,GHS,GIP,GMD,GNF,GTQ,GYD,HKD,HNL,HRK,HTG,HUF,IDR,ILS,INR,IQD,IRR,ISK,JMD,JOD,JPY,KES,KGS,KHR,KMF,KRW,KWD,KYD,KZT,LAK,LBP,LKR,LRD,LSL,LYD,MAD,MDL,MGA,MKD,MMK,MNT,MOP,MRU,MUR,MVR,MWK,MXN,MYR,MZN,NAD,NGN,NIO,NOK,NPR,NZD,OMR,PAB,PEN,PGK,PHP,PKR,PLN,PYG,QAR,RON,RSD,RUB,RWF,SAR,SBD,SCR,SDG,SEK,SGD,SHP,SLE,SLL,SOS,SRD,SSP,STN,SYP,SZL,THB,TJS,TMT,TND,TOP,TRY,TTD,TWD,TZS,UAH,UGX,USD,UYU,UZS,VES,VND,VUV,WST,XAF,XCD,XOF,XPF,YER,ZAR,ZMW,ZWL" } diff --git a/crates/api_models/src/payments.rs b/crates/api_models/src/payments.rs index 59c609a294..6cddf9430b 100644 --- a/crates/api_models/src/payments.rs +++ b/crates/api_models/src/payments.rs @@ -2773,6 +2773,9 @@ impl GetPaymentMethodType for BankTransferData { Self::InstantBankTransferPoland {} => { api_enums::PaymentMethodType::InstantBankTransferPoland } + Self::IndonesianBankTransfer { .. } => { + api_enums::PaymentMethodType::IndonesianBankTransfer + } } } } @@ -3454,6 +3457,10 @@ pub enum BankTransferData { InstantBankTransfer {}, InstantBankTransferFinland {}, InstantBankTransferPoland {}, + IndonesianBankTransfer { + #[schema(value_type = Option, example = "bri")] + bank_name: Option, + }, } #[derive(Eq, PartialEq, Clone, Debug, serde::Deserialize, serde::Serialize, ToSchema)] @@ -3526,6 +3533,7 @@ impl GetAddressFromPaymentMethodData for BankTransferData { | Self::Pse {} | Self::InstantBankTransfer {} | Self::InstantBankTransferFinland {} + | Self::IndonesianBankTransfer { .. } | Self::InstantBankTransferPoland {} => None, } } diff --git a/crates/api_models/src/payments/additional_info.rs b/crates/api_models/src/payments/additional_info.rs index 099e055980..b6600d51d2 100644 --- a/crates/api_models/src/payments/additional_info.rs +++ b/crates/api_models/src/payments/additional_info.rs @@ -154,6 +154,10 @@ pub enum BankTransferAdditionalData { InstantBankTransfer {}, InstantBankTransferFinland {}, InstantBankTransferPoland {}, + IndonesianBankTransfer { + #[schema(value_type = Option, example = "bri")] + bank_name: Option, + }, } #[derive(Eq, PartialEq, Clone, Debug, serde::Deserialize, serde::Serialize, ToSchema)] diff --git a/crates/common_enums/src/enums.rs b/crates/common_enums/src/enums.rs index 9f45c679ed..9ff5fc24ab 100644 --- a/crates/common_enums/src/enums.rs +++ b/crates/common_enums/src/enums.rs @@ -1880,7 +1880,6 @@ pub enum PaymentMethodType { AliPayHk, Alma, AmazonPay, - Skrill, Paysera, ApplePay, Atome, @@ -1953,6 +1952,7 @@ pub enum PaymentMethodType { SamsungPay, Sepa, SepaBankTransfer, + Skrill, Sofort, Swish, TouchNGo, @@ -1980,6 +1980,7 @@ pub enum PaymentMethodType { InstantBankTransferFinland, InstantBankTransferPoland, RevolutPay, + IndonesianBankTransfer, } impl PaymentMethodType { @@ -2000,7 +2001,6 @@ impl PaymentMethodType { Self::AliPayHk => "AlipayHK", Self::Alma => "Alma", Self::AmazonPay => "Amazon Pay", - Self::Skrill => "Skrill", Self::Paysera => "Paysera", Self::ApplePay => "Apple Pay", Self::Atome => "Atome", @@ -2075,6 +2075,7 @@ impl PaymentMethodType { Self::Sepa => "SEPA Direct Debit", Self::SepaBankTransfer => "SEPA Bank Transfer", Self::Sofort => "Sofort", + Self::Skrill => "Skrill", Self::Swish => "Swish", Self::TouchNGo => "Touch 'n Go", Self::Trustly => "Trustly", @@ -2097,6 +2098,7 @@ impl PaymentMethodType { Self::OpenBankingPIS => "Open Banking PIS", Self::DirectCarrierBilling => "Direct Carrier Billing", Self::RevolutPay => "RevolutPay", + Self::IndonesianBankTransfer => "Indonesian Bank Transfer", }; display_name.to_string() } diff --git a/crates/common_enums/src/transformers.rs b/crates/common_enums/src/transformers.rs index b500f8ff14..992ab9e159 100644 --- a/crates/common_enums/src/transformers.rs +++ b/crates/common_enums/src/transformers.rs @@ -1901,6 +1901,7 @@ impl From for PaymentMethod { PaymentMethodType::OpenBankingPIS => Self::OpenBanking, PaymentMethodType::DirectCarrierBilling => Self::MobilePayment, PaymentMethodType::RevolutPay => Self::Wallet, + PaymentMethodType::IndonesianBankTransfer => Self::BankTransfer, } } } diff --git a/crates/connector_configs/toml/development.toml b/crates/connector_configs/toml/development.toml index c614d1c682..d8510f03b1 100644 --- a/crates/connector_configs/toml/development.toml +++ b/crates/connector_configs/toml/development.toml @@ -427,6 +427,20 @@ merchant_secret="Source verification key" payment_method_type = "UnionPay" [[airwallex.wallet]] payment_method_type = "google_pay" +[[airwallex.wallet]] + payment_method_type = "paypal" +[[airwallex.wallet]] + payment_method_type = "skrill" +[[airwallex.bank_redirect]] + payment_method_type = "trustly" +[[airwallex.bank_redirect]] + payment_method_type = "blik" +[[airwallex.bank_redirect]] + payment_method_type = "ideal" +[[airwallex.pay_later]] + payment_method_type = "klarna" +[[airwallex.pay_later]] + payment_method_type = "atome" [airwallex.connector_auth.BodyKey] api_key="API Key" key1="Client ID" diff --git a/crates/connector_configs/toml/production.toml b/crates/connector_configs/toml/production.toml index 972bba8b63..6f487b523e 100644 --- a/crates/connector_configs/toml/production.toml +++ b/crates/connector_configs/toml/production.toml @@ -297,8 +297,24 @@ payment_method_type = "Discover" [[airwallex.debit]] payment_method_type = "CartesBancaires" [[airwallex.debit]] -payment_method_type = "UnionPay" -body_type = "BodyKey" + payment_method_type = "UnionPay" +[[airwallex.wallet]] + payment_method_type = "google_pay" +[[airwallex.wallet]] + payment_method_type = "paypal" +[[airwallex.wallet]] + payment_method_type = "skrill" +[[airwallex.bank_redirect]] + payment_method_type = "trustly" +[[airwallex.bank_redirect]] + payment_method_type = "blik" +[[airwallex.bank_redirect]] + payment_method_type = "ideal" +[[airwallex.pay_later]] + payment_method_type = "klarna" +[[airwallex.pay_later]] + payment_method_type = "atome" +body_type="BodyKey" [airwallex.connector_auth.BodyKey] api_key = "API Key" key1 = "Client ID" diff --git a/crates/connector_configs/toml/sandbox.toml b/crates/connector_configs/toml/sandbox.toml index 47db854880..93f12a8072 100644 --- a/crates/connector_configs/toml/sandbox.toml +++ b/crates/connector_configs/toml/sandbox.toml @@ -425,7 +425,21 @@ payment_method_type = "CartesBancaires" [[airwallex.debit]] payment_method_type = "UnionPay" [[airwallex.wallet]] -payment_method_type = "google_pay" + payment_method_type = "google_pay" +[[airwallex.wallet]] + payment_method_type = "paypal" +[[airwallex.wallet]] + payment_method_type = "skrill" +[[airwallex.bank_redirect]] + payment_method_type = "trustly" +[[airwallex.bank_redirect]] + payment_method_type = "blik" +[[airwallex.bank_redirect]] + payment_method_type = "ideal" +[[airwallex.pay_later]] + payment_method_type = "klarna" +[[airwallex.pay_later]] + payment_method_type = "atome" [airwallex.connector_auth.BodyKey] api_key = "API Key" key1 = "Client ID" diff --git a/crates/euclid/src/frontend/dir/enums.rs b/crates/euclid/src/frontend/dir/enums.rs index 0a8c02295a..ee13b1d456 100644 --- a/crates/euclid/src/frontend/dir/enums.rs +++ b/crates/euclid/src/frontend/dir/enums.rs @@ -223,6 +223,7 @@ pub enum BankTransferType { InstantBankTransfer, InstantBankTransferFinland, InstantBankTransferPoland, + IndonesianBankTransfer, } #[derive( diff --git a/crates/euclid/src/frontend/dir/lowering.rs b/crates/euclid/src/frontend/dir/lowering.rs index 4ee35c65e6..f496226b0a 100644 --- a/crates/euclid/src/frontend/dir/lowering.rs +++ b/crates/euclid/src/frontend/dir/lowering.rs @@ -129,6 +129,7 @@ impl From for global_enums::PaymentMethodType { enums::BankTransferType::InstantBankTransfer => Self::InstantBankTransfer, enums::BankTransferType::InstantBankTransferFinland => Self::InstantBankTransferFinland, enums::BankTransferType::InstantBankTransferPoland => Self::InstantBankTransferPoland, + enums::BankTransferType::IndonesianBankTransfer => Self::IndonesianBankTransfer, } } } diff --git a/crates/euclid/src/frontend/dir/transformers.rs b/crates/euclid/src/frontend/dir/transformers.rs index 97b1bd2e37..a70ddc75cc 100644 --- a/crates/euclid/src/frontend/dir/transformers.rs +++ b/crates/euclid/src/frontend/dir/transformers.rs @@ -198,6 +198,9 @@ impl IntoDirValue for (global_enums::PaymentMethodType, global_enums::PaymentMet Ok(dirval!(MobilePaymentType = DirectCarrierBilling)) } global_enums::PaymentMethodType::Eft => Ok(dirval!(BankRedirectType = Eft)), + global_enums::PaymentMethodType::IndonesianBankTransfer => { + Ok(dirval!(BankTransferType = IndonesianBankTransfer)) + } } } } diff --git a/crates/hyperswitch_connectors/src/connectors/adyen.rs b/crates/hyperswitch_connectors/src/connectors/adyen.rs index 43879ba6c6..d71b252f59 100644 --- a/crates/hyperswitch_connectors/src/connectors/adyen.rs +++ b/crates/hyperswitch_connectors/src/connectors/adyen.rs @@ -208,6 +208,7 @@ impl ConnectorValidation for Adyen { | PaymentMethodType::Sepa | PaymentMethodType::Vipps | PaymentMethodType::Venmo + | PaymentMethodType::Skrill | PaymentMethodType::Paypal => match capture_method { enums::CaptureMethod::Automatic | enums::CaptureMethod::SequentialAutomatic @@ -336,6 +337,7 @@ impl ConnectorValidation for Adyen { | PaymentMethodType::InstantBankTransfer | PaymentMethodType::InstantBankTransferFinland | PaymentMethodType::InstantBankTransferPoland + | PaymentMethodType::IndonesianBankTransfer | PaymentMethodType::SepaBankTransfer | PaymentMethodType::RevolutPay => { capture_method_not_supported!(connector, capture_method, payment_method_type) diff --git a/crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs b/crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs index 5a47dec7cd..5299d43562 100644 --- a/crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs +++ b/crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs @@ -2591,6 +2591,7 @@ impl TryFrom<(&BankTransferData, &PaymentsAuthorizeRouterData)> for AdyenPayment | BankTransferData::InstantBankTransfer {} | BankTransferData::InstantBankTransferFinland {} | BankTransferData::InstantBankTransferPoland {} + | BankTransferData::IndonesianBankTransfer { .. } | BankTransferData::Pse {} => Err(errors::ConnectorError::NotImplemented( utils::get_unimplemented_payment_method_error_message("Adyen"), ) @@ -3257,7 +3258,8 @@ impl | BankTransferData::Pse {} | BankTransferData::InstantBankTransfer {} | BankTransferData::InstantBankTransferFinland {} - | BankTransferData::InstantBankTransferPoland {} => (None, None), + | BankTransferData::InstantBankTransferPoland {} + | BankTransferData::IndonesianBankTransfer { .. } => (None, None), }; let request = AdyenPaymentRequest { diff --git a/crates/hyperswitch_connectors/src/connectors/airwallex.rs b/crates/hyperswitch_connectors/src/connectors/airwallex.rs index 8e64541048..4358402848 100644 --- a/crates/hyperswitch_connectors/src/connectors/airwallex.rs +++ b/crates/hyperswitch_connectors/src/connectors/airwallex.rs @@ -1216,7 +1216,18 @@ static AIRWALLEX_SUPPORTED_PAYMENT_METHODS: LazyLock = PaymentMethodDetails { mandates: enums::FeatureStatus::NotSupported, refunds: enums::FeatureStatus::Supported, - supported_capture_methods: supported_capture_methods.clone(), + supported_capture_methods: supported_capture_methods_redirect.clone(), + specific_features: None, + }, + ); + + airwallex_supported_payment_methods.add( + enums::PaymentMethod::Wallet, + enums::PaymentMethodType::Skrill, + PaymentMethodDetails { + mandates: enums::FeatureStatus::NotSupported, + refunds: enums::FeatureStatus::Supported, + supported_capture_methods: supported_capture_methods_redirect.clone(), specific_features: None, }, ); @@ -1265,6 +1276,28 @@ static AIRWALLEX_SUPPORTED_PAYMENT_METHODS: LazyLock = }, ); + airwallex_supported_payment_methods.add( + enums::PaymentMethod::BankRedirect, + enums::PaymentMethodType::Ideal, + PaymentMethodDetails { + mandates: enums::FeatureStatus::NotSupported, + refunds: enums::FeatureStatus::Supported, + supported_capture_methods: supported_capture_methods_redirect.clone(), + specific_features: None, + }, + ); + + airwallex_supported_payment_methods.add( + enums::PaymentMethod::BankTransfer, + enums::PaymentMethodType::IndonesianBankTransfer, + PaymentMethodDetails { + mandates: enums::FeatureStatus::NotSupported, + refunds: enums::FeatureStatus::NotSupported, + supported_capture_methods: supported_capture_methods_redirect.clone(), + specific_features: None, + }, + ); + airwallex_supported_payment_methods }); diff --git a/crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs b/crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs index 512223a3c3..755e567de2 100644 --- a/crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs +++ b/crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs @@ -7,7 +7,9 @@ use common_utils::{ }; use error_stack::ResultExt; use hyperswitch_domain_models::{ - payment_method_data::{BankRedirectData, PayLaterData, PaymentMethodData, WalletData}, + payment_method_data::{ + BankRedirectData, BankTransferData, PayLaterData, PaymentMethodData, WalletData, + }, router_data::{AccessToken, ConnectorAuthType, RouterData}, router_flow_types::{ refunds::{Execute, RSync}, @@ -224,6 +226,7 @@ pub enum AirwallexPaymentMethod { Wallets(AirwallexWalletData), PayLater(AirwallexPayLaterData), BankRedirect(AirwallexBankRedirectData), + BankTransfer(AirwallexBankTransferData), } #[derive(Debug, Serialize)] @@ -245,6 +248,7 @@ pub struct AirwallexCardDetails { pub enum AirwallexWalletData { GooglePay(GooglePayData), Paypal(PaypalData), + Skrill(SkrillData), } #[derive(Debug, Serialize)] @@ -261,6 +265,13 @@ pub struct PaypalData { payment_method_type: AirwallexPaymentType, } +#[derive(Debug, Serialize)] +pub struct SkrillData { + skrill: SkrillDetails, + #[serde(rename = "type")] + payment_method_type: AirwallexPaymentType, +} + #[derive(Debug, Serialize)] pub struct GooglePayDetails { encrypted_payment_token: Secret, @@ -269,8 +280,15 @@ pub struct GooglePayDetails { #[derive(Debug, Serialize)] pub struct PaypalDetails { - shopper_name: Option>, - country_code: Option, + shopper_name: Secret, + country_code: enums::CountryAlpha2, +} + +#[derive(Debug, Serialize)] +pub struct SkrillDetails { + shopper_name: Secret, + shopper_email: Email, + country_code: enums::CountryAlpha2, } #[derive(Debug, Serialize)] @@ -289,7 +307,7 @@ pub struct KlarnaData { #[derive(Debug, Serialize)] pub struct KlarnaDetails { - country_code: Option, + country_code: enums::CountryAlpha2, language: Option, billing: Billing, } @@ -321,7 +339,28 @@ pub struct AtomeData { #[derive(Debug, Serialize)] pub struct AtomeDetails { - shopper_phone: Option>, + shopper_phone: Secret, +} + +#[derive(Debug, Serialize)] +#[serde(untagged)] +pub enum AirwallexBankTransferData { + IndonesianBankTransfer(IndonesianBankTransferData), +} + +#[derive(Debug, Serialize)] +pub struct IndonesianBankTransferData { + bank_transfer: IndonesianBankTransferDetails, + #[serde(rename = "type")] + payment_method_type: AirwallexPaymentType, +} + +#[derive(Debug, Serialize)] +pub struct IndonesianBankTransferDetails { + shopper_name: Secret, + shopper_email: Email, + bank_name: common_enums::BankNames, + country_code: enums::CountryAlpha2, } #[derive(Debug, Serialize)] @@ -329,6 +368,7 @@ pub struct AtomeDetails { pub enum AirwallexBankRedirectData { Trustly(TrustlyData), Blik(BlikData), + Ideal(IdealData), } #[derive(Debug, Serialize)] @@ -340,8 +380,8 @@ pub struct TrustlyData { #[derive(Debug, Serialize)] pub struct TrustlyDetails { - shopper_name: Option>, - country_code: Option, + shopper_name: Secret, + country_code: enums::CountryAlpha2, } #[derive(Debug, Serialize)] @@ -353,7 +393,19 @@ pub struct BlikData { #[derive(Debug, Serialize)] pub struct BlikDetails { - shopper_name: Option>, + shopper_name: Secret, +} + +#[derive(Debug, Serialize)] +pub struct IdealData { + ideal: IdealDetails, + #[serde(rename = "type")] + payment_method_type: AirwallexPaymentType, +} + +#[derive(Debug, Serialize)] +pub struct IdealDetails { + bank_name: Option, } #[derive(Debug, Serialize)] @@ -366,6 +418,9 @@ pub enum AirwallexPaymentType { Atome, Trustly, Blik, + Ideal, + Skrill, + BankTransfer, } #[derive(Debug, Serialize)] @@ -440,11 +495,13 @@ impl TryFrom<&AirwallexRouterData<&types::PaymentsAuthorizeRouterData>> get_paylater_details(paylater_data, item) } + PaymentMethodData::BankTransfer(ref banktransfer_data) => { + get_banktransfer_details(banktransfer_data, item) + } PaymentMethodData::BankRedirect(ref bankredirect_data) => { get_bankredirect_details(bankredirect_data, item) } PaymentMethodData::BankDebit(_) - | PaymentMethodData::BankTransfer(_) | PaymentMethodData::CardRedirect(_) | PaymentMethodData::Crypto(_) | PaymentMethodData::MandatePayment @@ -466,9 +523,13 @@ impl TryFrom<&AirwallexRouterData<&types::PaymentsAuthorizeRouterData>> let device_data = get_device_data(item.router_data)?; let return_url = match &request.payment_method_data { - PaymentMethodData::Wallet(WalletData::PaypalRedirect(_paypal_details)) => { - item.router_data.request.router_return_url.clone() - } + PaymentMethodData::Wallet(wallet_data) => match wallet_data { + WalletData::PaypalRedirect(_paypal_details) => { + item.router_data.request.router_return_url.clone() + } + WalletData::Skrill(_) => item.router_data.request.router_return_url.clone(), + _ => request.complete_authorize_url.clone(), + }, PaymentMethodData::BankRedirect(_bankredirect_data) => { item.router_data.request.router_return_url.clone() } @@ -525,6 +586,50 @@ fn get_device_data( }) } +fn get_banktransfer_details( + banktransfer_data: &BankTransferData, + item: &AirwallexRouterData<&types::PaymentsAuthorizeRouterData>, +) -> Result { + let _bank_transfer_details = match banktransfer_data { + BankTransferData::IndonesianBankTransfer { bank_name } => { + AirwallexPaymentMethod::BankTransfer(AirwallexBankTransferData::IndonesianBankTransfer( + IndonesianBankTransferData { + bank_transfer: IndonesianBankTransferDetails { + shopper_name: item.router_data.get_billing_full_name().map_err(|_| { + errors::ConnectorError::MissingRequiredField { + field_name: "shopper_name", + } + })?, + shopper_email: item.router_data.get_billing_email().map_err(|_| { + errors::ConnectorError::MissingRequiredField { + field_name: "shopper_email", + } + })?, + bank_name: bank_name.ok_or( + errors::ConnectorError::MissingRequiredField { + field_name: "bank_name", + }, + )?, + country_code: item.router_data.get_billing_country().map_err(|_| { + errors::ConnectorError::MissingRequiredField { + field_name: "country_code", + } + })?, + }, + payment_method_type: AirwallexPaymentType::BankTransfer, + }, + )) + } + _ => Err(errors::ConnectorError::NotImplemented( + utils::get_unimplemented_payment_method_error_message("airwallex"), + ))?, + }; + let not_implemented = Err(errors::ConnectorError::NotImplemented( + utils::get_unimplemented_payment_method_error_message("airwallex"), + ))?; + Ok(not_implemented) +} + fn get_paylater_details( paylater_data: &PayLaterData, item: &AirwallexRouterData<&types::PaymentsAuthorizeRouterData>, @@ -533,7 +638,11 @@ fn get_paylater_details( PayLaterData::KlarnaRedirect {} => { AirwallexPaymentMethod::PayLater(AirwallexPayLaterData::Klarna(Box::new(KlarnaData { klarna: KlarnaDetails { - country_code: item.router_data.get_optional_billing_country(), + country_code: item.router_data.get_billing_country().map_err(|_| { + errors::ConnectorError::MissingRequiredField { + field_name: "country_code", + } + })?, language: item .router_data .request @@ -561,8 +670,13 @@ fn get_paylater_details( shopper_phone: item .router_data .get_billing_phone() - .ok() - .and_then(|phone| phone.get_number_with_country_code().ok()), + .map_err(|_| errors::ConnectorError::MissingRequiredField { + field_name: "shopper_phone", + })? + .get_number_with_country_code() + .map_err(|_| errors::ConnectorError::MissingRequiredField { + field_name: "country_code", + })?, }, payment_method_type: AirwallexPaymentType::Atome, })) @@ -582,8 +696,16 @@ fn get_bankredirect_details( BankRedirectData::Trustly { .. } => { AirwallexPaymentMethod::BankRedirect(AirwallexBankRedirectData::Trustly(TrustlyData { trustly: TrustlyDetails { - shopper_name: item.router_data.get_optional_billing_full_name(), - country_code: item.router_data.get_optional_billing_country(), + shopper_name: item.router_data.get_billing_full_name().map_err(|_| { + errors::ConnectorError::MissingRequiredField { + field_name: "shopper_name", + } + })?, + country_code: item.router_data.get_billing_country().map_err(|_| { + errors::ConnectorError::MissingRequiredField { + field_name: "country_code", + } + })?, }, payment_method_type: AirwallexPaymentType::Trustly, })) @@ -591,11 +713,23 @@ fn get_bankredirect_details( BankRedirectData::Blik { .. } => { AirwallexPaymentMethod::BankRedirect(AirwallexBankRedirectData::Blik(BlikData { blik: BlikDetails { - shopper_name: item.router_data.get_optional_billing_full_name(), + shopper_name: item.router_data.get_billing_full_name().map_err(|_| { + errors::ConnectorError::MissingRequiredField { + field_name: "shopper_name", + } + })?, }, payment_method_type: AirwallexPaymentType::Blik, })) } + BankRedirectData::Ideal { bank_name } => { + AirwallexPaymentMethod::BankRedirect(AirwallexBankRedirectData::Ideal(IdealData { + ideal: IdealDetails { + bank_name: *bank_name, + }, + payment_method_type: AirwallexPaymentType::Ideal, + })) + } _ => Err(errors::ConnectorError::NotImplemented( utils::get_unimplemented_payment_method_error_message("airwallex"), ))?, @@ -622,18 +756,57 @@ fn get_wallet_details( WalletData::PaypalRedirect(_paypal_details) => { AirwallexPaymentMethod::Wallets(AirwallexWalletData::Paypal(PaypalData { paypal: PaypalDetails { - shopper_name: item.router_data.request.customer_name.clone(), - country_code: item.router_data.get_optional_billing_country(), + shopper_name: item + .router_data + .request + .customer_name + .as_ref() + .cloned() + .or_else(|| item.router_data.get_billing_full_name().ok()) + .ok_or(errors::ConnectorError::MissingRequiredField { + field_name: "shopper_name", + })?, + country_code: item.router_data.get_billing_country().map_err(|_| { + errors::ConnectorError::MissingRequiredField { + field_name: "country_code", + } + })?, }, payment_method_type: AirwallexPaymentType::Paypal, })) } + WalletData::Skrill(_skrill_details) => { + AirwallexPaymentMethod::Wallets(AirwallexWalletData::Skrill(SkrillData { + skrill: SkrillDetails { + shopper_name: item + .router_data + .request + .customer_name + .as_ref() + .cloned() + .or_else(|| item.router_data.get_billing_full_name().ok()) + .ok_or(errors::ConnectorError::MissingRequiredField { + field_name: "shopper_name", + })?, + shopper_email: item.router_data.get_billing_email().map_err(|_| { + errors::ConnectorError::MissingRequiredField { + field_name: "shopper_email", + } + })?, + country_code: item.router_data.get_billing_country().map_err(|_| { + errors::ConnectorError::MissingRequiredField { + field_name: "country_code", + } + })?, + }, + payment_method_type: AirwallexPaymentType::Skrill, + })) + } WalletData::AliPayQr(_) | WalletData::AliPayRedirect(_) | WalletData::AliPayHkRedirect(_) | WalletData::AmazonPayRedirect(_) | WalletData::Paysera(_) - | WalletData::Skrill(_) | WalletData::MomoRedirect(_) | WalletData::KakaoPayRedirect(_) | WalletData::GoPayRedirect(_) diff --git a/crates/hyperswitch_connectors/src/connectors/facilitapay/transformers.rs b/crates/hyperswitch_connectors/src/connectors/facilitapay/transformers.rs index 9e7d4a06a2..185624e989 100644 --- a/crates/hyperswitch_connectors/src/connectors/facilitapay/transformers.rs +++ b/crates/hyperswitch_connectors/src/connectors/facilitapay/transformers.rs @@ -112,6 +112,7 @@ impl TryFrom<&FacilitapayRouterData<&types::PaymentsAuthorizeRouterData>> | BankTransferData::InstantBankTransfer {} | BankTransferData::InstantBankTransferFinland {} | BankTransferData::InstantBankTransferPoland {} + | BankTransferData::IndonesianBankTransfer { .. } | BankTransferData::LocalBankTransfer { .. } => { Err(errors::ConnectorError::NotImplemented( "Selected payment method through Facilitapay".to_string(), diff --git a/crates/hyperswitch_connectors/src/connectors/itaubank/transformers.rs b/crates/hyperswitch_connectors/src/connectors/itaubank/transformers.rs index a64746c8cf..5505e27eb8 100644 --- a/crates/hyperswitch_connectors/src/connectors/itaubank/transformers.rs +++ b/crates/hyperswitch_connectors/src/connectors/itaubank/transformers.rs @@ -110,6 +110,7 @@ impl TryFrom<&ItaubankRouterData<&types::PaymentsAuthorizeRouterData>> for Itaub | BankTransferData::InstantBankTransfer {} | BankTransferData::InstantBankTransferFinland {} | BankTransferData::InstantBankTransferPoland {} + | BankTransferData::IndonesianBankTransfer { .. } | BankTransferData::LocalBankTransfer { .. } => { Err(errors::ConnectorError::NotImplemented( "Selected payment method through itaubank".to_string(), diff --git a/crates/hyperswitch_connectors/src/connectors/klarna.rs b/crates/hyperswitch_connectors/src/connectors/klarna.rs index 4dc706c9bc..58909d4881 100644 --- a/crates/hyperswitch_connectors/src/connectors/klarna.rs +++ b/crates/hyperswitch_connectors/src/connectors/klarna.rs @@ -645,7 +645,8 @@ impl ConnectorIntegration Err(error_stack::report!(errors::ConnectorError::NotSupported { message: payment_method_type.to_string(), connector: "klarna", @@ -764,6 +765,8 @@ impl ConnectorIntegration Err(error_stack::report!(errors::ConnectorError::NotSupported { message: payment_method_type.to_string(), @@ -890,6 +893,7 @@ impl ConnectorIntegration Err(error_stack::report!(errors::ConnectorError::NotSupported { message: payment_method_type.to_string(), @@ -1009,7 +1013,9 @@ impl ConnectorIntegration Err(error_stack::report!(errors::ConnectorError::NotSupported { message: payment_method_type.to_string(), connector: "klarna", diff --git a/crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs b/crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs index 4491ac56ad..cc6c7ba3d1 100644 --- a/crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs +++ b/crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs @@ -1263,6 +1263,7 @@ impl TryFrom<&PaypalRouterData<&PaymentsAuthorizeRouterData>> for PaypalPayments | enums::PaymentMethodType::InstantBankTransferPoland | enums::PaymentMethodType::Mifinity | enums::PaymentMethodType::Paze + | enums::PaymentMethodType::IndonesianBankTransfer | enums::PaymentMethodType::RevolutPay => { Err(errors::ConnectorError::NotImplemented( utils::get_unimplemented_payment_method_error_message("paypal"), @@ -1363,6 +1364,7 @@ impl TryFrom<&BankTransferData> for PaypalPaymentsRequest { | BankTransferData::InstantBankTransfer {} | BankTransferData::InstantBankTransferFinland {} | BankTransferData::InstantBankTransferPoland {} + | BankTransferData::IndonesianBankTransfer { .. } | BankTransferData::LocalBankTransfer { .. } => { Err(errors::ConnectorError::NotImplemented( utils::get_unimplemented_payment_method_error_message("Paypal"), diff --git a/crates/hyperswitch_connectors/src/connectors/shift4/transformers.rs b/crates/hyperswitch_connectors/src/connectors/shift4/transformers.rs index b17b832242..5eec6440bd 100644 --- a/crates/hyperswitch_connectors/src/connectors/shift4/transformers.rs +++ b/crates/hyperswitch_connectors/src/connectors/shift4/transformers.rs @@ -453,6 +453,7 @@ impl TryFrom<&BankTransferData> for Shift4PaymentMethod { | BankTransferData::InstantBankTransfer {} | BankTransferData::InstantBankTransferFinland { .. } | BankTransferData::InstantBankTransferPoland { .. } + | BankTransferData::IndonesianBankTransfer { .. } | BankTransferData::LocalBankTransfer { .. } => { Err(errors::ConnectorError::NotImplemented( utils::get_unimplemented_payment_method_error_message("Shift4"), diff --git a/crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs b/crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs index 7a6e89cd91..9f18717025 100644 --- a/crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs +++ b/crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs @@ -832,6 +832,7 @@ impl TryFrom for StripePaymentMethodType { | enums::PaymentMethodType::DuitNow | enums::PaymentMethodType::PromptPay | enums::PaymentMethodType::VietQr + | enums::PaymentMethodType::IndonesianBankTransfer | enums::PaymentMethodType::Mifinity => Err(ConnectorError::NotImplemented( get_unimplemented_payment_method_error_message("stripe"), ) @@ -1352,6 +1353,7 @@ fn create_stripe_payment_method( | payment_method_data::BankTransferData::BriVaBankTransfer { .. } | payment_method_data::BankTransferData::CimbVaBankTransfer { .. } | payment_method_data::BankTransferData::DanamonVaBankTransfer { .. } + | payment_method_data::BankTransferData::IndonesianBankTransfer { .. } | payment_method_data::BankTransferData::MandiriVaBankTransfer { .. } => Err( ConnectorError::NotImplemented(get_unimplemented_payment_method_error_message( "stripe", @@ -4101,6 +4103,7 @@ impl | payment_method_data::BankTransferData::InstantBankTransfer {} | payment_method_data::BankTransferData::InstantBankTransferFinland {} | payment_method_data::BankTransferData::InstantBankTransferPoland {} + | payment_method_data::BankTransferData::IndonesianBankTransfer { .. } | payment_method_data::BankTransferData::MandiriVaBankTransfer { .. } => { Err(ConnectorError::NotImplemented( get_unimplemented_payment_method_error_message("stripe"), diff --git a/crates/hyperswitch_connectors/src/connectors/zen/transformers.rs b/crates/hyperswitch_connectors/src/connectors/zen/transformers.rs index 286f08dd51..b017f4b229 100644 --- a/crates/hyperswitch_connectors/src/connectors/zen/transformers.rs +++ b/crates/hyperswitch_connectors/src/connectors/zen/transformers.rs @@ -349,6 +349,7 @@ impl | BankTransferData::InstantBankTransfer {} | BankTransferData::InstantBankTransferFinland { .. } | BankTransferData::InstantBankTransferPoland { .. } + | BankTransferData::IndonesianBankTransfer { .. } | BankTransferData::MandiriVaBankTransfer { .. } => { Err(errors::ConnectorError::NotImplemented( utils::get_unimplemented_payment_method_error_message("Zen"), diff --git a/crates/hyperswitch_connectors/src/connectors/zsl/transformers.rs b/crates/hyperswitch_connectors/src/connectors/zsl/transformers.rs index 7e5335860c..cf4c45274a 100644 --- a/crates/hyperswitch_connectors/src/connectors/zsl/transformers.rs +++ b/crates/hyperswitch_connectors/src/connectors/zsl/transformers.rs @@ -165,6 +165,7 @@ impl TryFrom<&ZslRouterData<&types::PaymentsAuthorizeRouterData>> for ZslPayment | BankTransferData::Pse {} | BankTransferData::InstantBankTransferFinland {} | BankTransferData::InstantBankTransferPoland {} + | BankTransferData::IndonesianBankTransfer { .. } | BankTransferData::InstantBankTransfer {} => { Err(errors::ConnectorError::NotImplemented( get_unimplemented_payment_method_error_message( diff --git a/crates/hyperswitch_connectors/src/utils.rs b/crates/hyperswitch_connectors/src/utils.rs index 143e7474dd..af78996422 100644 --- a/crates/hyperswitch_connectors/src/utils.rs +++ b/crates/hyperswitch_connectors/src/utils.rs @@ -5544,6 +5544,7 @@ pub enum PaymentMethodDataType { InstantBankTransferFinland, InstantBankTransferPoland, RevolutPay, + IndonesianBankTransfer, } impl From for PaymentMethodDataType { @@ -5701,6 +5702,9 @@ impl From for PaymentMethodDataType { payment_method_data::BankTransferData::InstantBankTransferPoland {} => { Self::InstantBankTransferPoland } + payment_method_data::BankTransferData::IndonesianBankTransfer { .. } => { + Self::IndonesianBankTransfer + } }, PaymentMethodData::Crypto(_) => Self::Crypto, PaymentMethodData::MandatePayment => Self::MandatePayment, diff --git a/crates/hyperswitch_domain_models/src/payment_method_data.rs b/crates/hyperswitch_domain_models/src/payment_method_data.rs index b273ec4569..14b1d3dc87 100644 --- a/crates/hyperswitch_domain_models/src/payment_method_data.rs +++ b/crates/hyperswitch_domain_models/src/payment_method_data.rs @@ -720,6 +720,9 @@ pub enum BankTransferData { InstantBankTransfer {}, InstantBankTransferFinland {}, InstantBankTransferPoland {}, + IndonesianBankTransfer { + bank_name: Option, + }, } #[derive(Debug, Clone, Eq, PartialEq, serde::Deserialize, serde::Serialize)] @@ -1642,6 +1645,9 @@ impl From for BankTransferData { api_models::payments::BankTransferData::InstantBankTransferPoland {} => { Self::InstantBankTransferPoland {} } + api_models::payments::BankTransferData::IndonesianBankTransfer { bank_name } => { + Self::IndonesianBankTransfer { bank_name } + } } } } @@ -1686,6 +1692,9 @@ impl From for api_models::payments::additional_info::BankTrans BankTransferData::InstantBankTransfer {} => Self::InstantBankTransfer {}, BankTransferData::InstantBankTransferFinland {} => Self::InstantBankTransferFinland {}, BankTransferData::InstantBankTransferPoland {} => Self::InstantBankTransferPoland {}, + BankTransferData::IndonesianBankTransfer { bank_name } => { + Self::IndonesianBankTransfer { bank_name } + } } } } @@ -1946,6 +1955,9 @@ impl GetPaymentMethodType for BankTransferData { Self::InstantBankTransferPoland {} => { api_enums::PaymentMethodType::InstantBankTransferPoland } + Self::IndonesianBankTransfer { .. } => { + api_enums::PaymentMethodType::IndonesianBankTransfer + } } } } diff --git a/crates/kgraph_utils/src/mca.rs b/crates/kgraph_utils/src/mca.rs index d835b22806..3eb5b2c904 100644 --- a/crates/kgraph_utils/src/mca.rs +++ b/crates/kgraph_utils/src/mca.rs @@ -138,6 +138,9 @@ fn get_dir_value_payment_method( api_enums::PaymentMethodType::PermataBankTransfer => { Ok(dirval!(BankTransferType = PermataBankTransfer)) } + api_enums::PaymentMethodType::IndonesianBankTransfer => { + Ok(dirval!(BankTransferType = IndonesianBankTransfer)) + } api_enums::PaymentMethodType::PaySafeCard => Ok(dirval!(GiftCardType = PaySafeCard)), api_enums::PaymentMethodType::SevenEleven => Ok(dirval!(VoucherType = SevenEleven)), api_enums::PaymentMethodType::Lawson => Ok(dirval!(VoucherType = Lawson)), diff --git a/crates/kgraph_utils/src/transformers.rs b/crates/kgraph_utils/src/transformers.rs index febdd19639..9928f730a2 100644 --- a/crates/kgraph_utils/src/transformers.rs +++ b/crates/kgraph_utils/src/transformers.rs @@ -316,6 +316,9 @@ impl IntoDirValue for (api_enums::PaymentMethodType, api_enums::PaymentMethod) { api_enums::PaymentMethodType::DirectCarrierBilling => { Ok(dirval!(MobilePaymentType = DirectCarrierBilling)) } + api_enums::PaymentMethodType::IndonesianBankTransfer => { + Ok(dirval!(BankTransferType = IndonesianBankTransfer)) + } } } } diff --git a/crates/payment_methods/src/configs/payment_connector_required_fields.rs b/crates/payment_methods/src/configs/payment_connector_required_fields.rs index 2dd291d16f..4b8ffddd3c 100644 --- a/crates/payment_methods/src/configs/payment_connector_required_fields.rs +++ b/crates/payment_methods/src/configs/payment_connector_required_fields.rs @@ -1577,7 +1577,21 @@ fn get_bank_redirect_required_fields() -> HashMap HashMap HashMap HashMap HashMap HashMap matches!( payment_method_type, diff --git a/crates/router/src/connector/utils.rs b/crates/router/src/connector/utils.rs index 64810bd405..cb0a2cc3d0 100644 --- a/crates/router/src/connector/utils.rs +++ b/crates/router/src/connector/utils.rs @@ -2529,6 +2529,7 @@ pub enum PaymentMethodDataType { InstantBankTransferFinland, InstantBankTransferPoland, RevolutPay, + IndonesianBankTransfer, } impl From for PaymentMethodDataType { @@ -2691,6 +2692,9 @@ impl From for PaymentMethodDataType { domain::payments::BankTransferData::InstantBankTransferPoland {} => { Self::InstantBankTransferPoland } + domain::payments::BankTransferData::IndonesianBankTransfer { .. } => { + Self::IndonesianBankTransfer + } } } domain::payments::PaymentMethodData::Crypto(_) => Self::Crypto, diff --git a/crates/router/src/types/transformers.rs b/crates/router/src/types/transformers.rs index 2ae9798e82..5004186e84 100644 --- a/crates/router/src/types/transformers.rs +++ b/crates/router/src/types/transformers.rs @@ -361,6 +361,7 @@ impl ForeignFrom for api_enums::PaymentMethod { | api_enums::PaymentMethodType::InstantBankTransferFinland | api_enums::PaymentMethodType::InstantBankTransferPoland | api_enums::PaymentMethodType::SepaBankTransfer + | api_enums::PaymentMethodType::IndonesianBankTransfer | api_enums::PaymentMethodType::Pix => Self::BankTransfer, api_enums::PaymentMethodType::Givex | api_enums::PaymentMethodType::PaySafeCard => { Self::GiftCard diff --git a/cypress-tests/cypress/e2e/configs/Payment/Airwallex.js b/cypress-tests/cypress/e2e/configs/Payment/Airwallex.js index a5ae171e23..ba7ccffbae 100644 --- a/cypress-tests/cypress/e2e/configs/Payment/Airwallex.js +++ b/cypress-tests/cypress/e2e/configs/Payment/Airwallex.js @@ -837,5 +837,28 @@ export const connectorDetails = { }, }, }, + Ideal: { + Request: { + payment_method: "bank_redirect", + payment_method_type: "ideal", + payment_method_data: { + bank_redirect: { + ideal: { + billing_details: { + billing_name: "john doe", + email: "abc@gmail.com", + }, + country: "NL", + }, + }, + }, + }, + Response: { + status: 200, + body: { + status: "requires_customer_action", + }, + }, + }, }, }; diff --git a/cypress-tests/cypress/support/redirectionHandler.js b/cypress-tests/cypress/support/redirectionHandler.js index cd1670a931..ed0025a72d 100644 --- a/cypress-tests/cypress/support/redirectionHandler.js +++ b/cypress-tests/cypress/support/redirectionHandler.js @@ -265,6 +265,46 @@ function bankRedirectRedirection( }); verifyUrl = true; + } else if (connectorId === "airwallex" && paymentMethodType === "ideal") { + const airwallexIdealOrigin1 = "https://ext.pay.ideal.nl"; + const airwallexIdealOrigin2 = "https://handler.ext.idealtesttool.nl"; + + cy.origin( + airwallexIdealOrigin1, + { args: { constants: CONSTANTS } }, + ({ constants }) => { + cy.log("Executing on Airwallex iDEAL Origin 1"); + cy.wait(constants.TIMEOUT / 10); // 2 seconds + cy.get("button[data-testid=payment-action-button]").click(); + cy.wait(constants.TIMEOUT / 10); // 2 seconds + cy.get("button[id=bank-item-TESTNL2A]").click(); + } + ); + + cy.log(`Waiting for redirection to ${airwallexIdealOrigin2}`); + cy.location("origin", { timeout: CONSTANTS.TIMEOUT }).should( + "eq", + airwallexIdealOrigin2 + ); + + cy.origin( + airwallexIdealOrigin2, + { args: { constants: CONSTANTS } }, + ({ constants }) => { + cy.log("Executing on Airwallex iDEAL Origin 2"); + + cy.get(".btn.btn-primary.btn-lg") + .contains("Success") + .should("be.visible") + .click(); + + cy.url({ timeout: constants.WAIT_TIME }).should( + "include", + "/loading/SUCCESS" + ); + } + ); + verifyUrl = false; } else { handleFlow( redirectionUrl,