Skip to content

Conversation

AkshayaFoiger
Copy link
Contributor

@AkshayaFoiger AkshayaFoiger commented Aug 21, 2024

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Prevent partial submission of billing address to Adyen

How did you test it?

  1. Create a payment connector accounts with adyen, stripe , bambora and cybersource with following payment methods enabled.
"payment_methods_enabled":[
    {
        "payment_method": "voucher",
        "payment_method_types": [
            {
                "payment_method_type": "boleto",
                "payment_experience": "redirect_to_url",
                "card_networks": null,
                "accepted_currencies": null,
                "accepted_countries": null,
                "minimum_amount": 0,
                "maximum_amount": 68607706,
                "recurring_enabled": true,
                "installment_payment_enabled": false
            }
        ]
    },
    {
        "payment_method": "wallet",
        "payment_method_types": [
            {
                "payment_method_type": "paypal",
                "payment_experience": "redirect_to_url",
                "card_networks": null,
                "accepted_currencies": null,
                "accepted_countries": null,
                "minimum_amount": 0,
                "maximum_amount": 68607706,
                "recurring_enabled": true,
                "installment_payment_enabled": false
            },
            {
                "payment_method_type": "ali_pay_hk",
                "payment_experience": "redirect_to_url",
                "card_networks": null,
                "accepted_currencies": null,
                "accepted_countries": null,
                "minimum_amount": 0,
                "maximum_amount": 68607706,
                "recurring_enabled": true,
                "installment_payment_enabled": false
            },
            {
                "payment_method_type": "we_chat_pay",
                "payment_experience": "redirect_to_url",
                "card_networks": null,
                "accepted_currencies": null,
                "accepted_countries": null,
                "minimum_amount": 0,
                "maximum_amount": 68607706,
                "recurring_enabled": true,
                "installment_payment_enabled": false
            }
        ]
    },
    {
        "payment_method": "bank_redirect",
        "payment_method_types": [
            {
                "payment_method_type": "ideal",
                "payment_experience": null,
                "card_networks": null,
                "accepted_currencies": null,
                "accepted_countries": null,
                "minimum_amount": 0,
                "maximum_amount": 68607706,
                "recurring_enabled": true,
                "installment_payment_enabled": false
            },
            {
                "payment_method_type": "giropay",
                "payment_experience": null,
                "card_networks": null,
                "accepted_currencies": null,
                "accepted_countries": null,
                "minimum_amount": 0,
                "maximum_amount": 68607706,
                "recurring_enabled": true,
                "installment_payment_enabled": false
            },
            {
                "payment_method_type": "sofort",
                "payment_experience": null,
                "card_networks": null,
                "accepted_currencies": null,
                "accepted_countries": null,
                "minimum_amount": 0,
                "maximum_amount": 68607706,
                "recurring_enabled": true,
                "installment_payment_enabled": false
            }
        ]
    },
    {
        "payment_method": "bank_debit",
        "payment_method_types": [
            {
                "payment_method_type": "sepa",
                "payment_experience": "redirect_to_url",
                "card_networks": null,
                "accepted_currencies": null,
                "accepted_countries": null,
                "minimum_amount": 0,
                "maximum_amount": 68607706,
                "recurring_enabled": true,
                "installment_payment_enabled": false
            }
        ]
    },
    {
        "payment_method": "pay_later",
        "payment_method_types": [
            {
                "payment_method_type": "afterpay_clearpay",
                "payment_experience": "redirect_to_url",
                "card_networks": null,
                "accepted_currencies": null,
                "accepted_countries": null,
                "minimum_amount": 0,
                "maximum_amount": 68607706,
                "recurring_enabled": true,
                "installment_payment_enabled": false
            }
        ]
    },
    {
        "payment_method": "card",
        "payment_method_types": [
            {
                "payment_method_type": "debit",
                "payment_experience": null,
                "card_networks": [
                    "Mastercard"
                ],
                "accepted_currencies": null,
                "accepted_countries": null,
                "minimum_amount": 0,
                "maximum_amount": 68607706,
                "recurring_enabled": true,
                "installment_payment_enabled": false
            },
            {
                "payment_method_type": "debit",
                "payment_experience": null,
                "card_networks": [
                    "Visa"
                ],
                "accepted_currencies": null,
                "accepted_countries": null,
                "minimum_amount": 0,
                "maximum_amount": 68607706,
                "recurring_enabled": true,
                "installment_payment_enabled": false
            },
            {
                "payment_method_type": "debit",
                "payment_experience": null,
                "card_networks": [
                    "Interac"
                ],
                "accepted_currencies": null,
                "accepted_countries": null,
                "minimum_amount": 0,
                "maximum_amount": 68607706,
                "recurring_enabled": true,
                "installment_payment_enabled": false
            },
            {
                "payment_method_type": "debit",
                "payment_experience": null,
                "card_networks": [
                    "AmericanExpress"
                ],
                "accepted_currencies": null,
                "accepted_countries": null,
                "minimum_amount": 0,
                "maximum_amount": 68607706,
                "recurring_enabled": true,
                "installment_payment_enabled": false
            },
            {
                "payment_method_type": "debit",
                "payment_experience": null,
                "card_networks": [
                    "JCB"
                ],
                "accepted_currencies": null,
                "accepted_countries": null,
                "minimum_amount": 0,
                "maximum_amount": 68607706,
                "recurring_enabled": true,
                "installment_payment_enabled": false
            },
            {
                "payment_method_type": "debit",
                "payment_experience": null,
                "card_networks": [
                    "DinersClub"
                ],
                "accepted_currencies": null,
                "accepted_countries": null,
                "minimum_amount": 0,
                "maximum_amount": 68607706,
                "recurring_enabled": true,
                "installment_payment_enabled": false
            },
            {
                "payment_method_type": "debit",
                "payment_experience": null,
                "card_networks": [
                    "Discover"
                ],
                "accepted_currencies": null,
                "accepted_countries": null,
                "minimum_amount": 0,
                "maximum_amount": 68607706,
                "recurring_enabled": true,
                "installment_payment_enabled": false
            },
            {
                "payment_method_type": "debit",
                "payment_experience": null,
                "card_networks": [
                    "CartesBancaires"
                ],
                "accepted_currencies": null,
                "accepted_countries": null,
                "minimum_amount": 0,
                "maximum_amount": 68607706,
                "recurring_enabled": true,
                "installment_payment_enabled": false
            },
            {
                "payment_method_type": "debit",
                "payment_experience": null,
                "card_networks": [
                    "UnionPay"
                ],
                "accepted_currencies": null,
                "accepted_countries": null,
                "minimum_amount": 0,
                "maximum_amount": 68607706,
                "recurring_enabled": true,
                "installment_payment_enabled": false
            },
            {
                "payment_method_type": "credit",
                "payment_experience": null,
                "card_networks": [
                    "Mastercard"
                ],
                "accepted_currencies": null,
                "accepted_countries": null,
                "minimum_amount": 0,
                "maximum_amount": 68607706,
                "recurring_enabled": true,
                "installment_payment_enabled": false
            },
            {
                "payment_method_type": "credit",
                "payment_experience": null,
                "card_networks": [
                    "Visa"
                ],
                "accepted_currencies": null,
                "accepted_countries": null,
                "minimum_amount": 0,
                "maximum_amount": 68607706,
                "recurring_enabled": true,
                "installment_payment_enabled": false
            },
            {
                "payment_method_type": "credit",
                "payment_experience": null,
                "card_networks": [
                    "Interac"
                ],
                "accepted_currencies": null,
                "accepted_countries": null,
                "minimum_amount": 0,
                "maximum_amount": 68607706,
                "recurring_enabled": true,
                "installment_payment_enabled": false
            },
            {
                "payment_method_type": "credit",
                "payment_experience": null,
                "card_networks": [
                    "AmericanExpress"
                ],
                "accepted_currencies": null,
                "accepted_countries": null,
                "minimum_amount": 0,
                "maximum_amount": 68607706,
                "recurring_enabled": true,
                "installment_payment_enabled": false
            },
            {
                "payment_method_type": "credit",
                "payment_experience": null,
                "card_networks": [
                    "JCB"
                ],
                "accepted_currencies": null,
                "accepted_countries": null,
                "minimum_amount": 0,
                "maximum_amount": 68607706,
                "recurring_enabled": true,
                "installment_payment_enabled": false
            },
            {
                "payment_method_type": "credit",
                "payment_experience": null,
                "card_networks": [
                    "DinersClub"
                ],
                "accepted_currencies": null,
                "accepted_countries": null,
                "minimum_amount": 0,
                "maximum_amount": 68607706,
                "recurring_enabled": true,
                "installment_payment_enabled": false
            },
            {
                "payment_method_type": "credit",
                "payment_experience": null,
                "card_networks": [
                    "Discover"
                ],
                "accepted_currencies": null,
                "accepted_countries": null,
                "minimum_amount": 0,
                "maximum_amount": 68607706,
                "recurring_enabled": true,
                "installment_payment_enabled": false
            },
            {
                "payment_method_type": "credit",
                "payment_experience": null,
                "card_networks": [
                    "CartesBancaires"
                ],
                "accepted_currencies": null,
                "accepted_countries": null,
                "minimum_amount": 0,
                "maximum_amount": 68607706,
                "recurring_enabled": true,
                "installment_payment_enabled": false
            },
            {
                "payment_method_type": "credit",
                "payment_experience": null,
                "card_networks": [
                    "UnionPay"
                ],
                "accepted_currencies": null,
                "accepted_countries": null,
                "minimum_amount": 0,
                "maximum_amount": 68607706,
                "recurring_enabled": true,
                "installment_payment_enabled": false
            }
        ]
    }
]
  1. Do a payment with confirm false with each of the payment method in the above list
Cards
PayPal
Klarna
SEPA debit
Boleto
iDEAL
Afterpay
Sofort
Giropay
Alipay HK
Wechat pay (HKD currency)

3 . Do a payment method list call and get the required fields for each of them

curl --location 'http://localhost:8080/account/payment_methods?client_secret=pay_VLJtmbAYFhGAmnSo0efF_secret_dZzLzreIiIeXPNEzwMkt' \
--header 'Accept: application/json' \
--header 'api-key: {{publishable_key}}' \
--data ''
  1. Pass these required fields in the payment create with confirm true.
  • cards
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept-Language: zh' \
--header 'api-key: snd_eROPM0wmKWSJ7kQFo7VPuxl5SApVOnMN9gxDJYQ3rl5jJBWgbVzksxRLbXvIkT0a' \
--data-raw '{
    "amount": 300,
    "currency": "USD",
    "confirm": true,
    "payment_link": false,
    "capture_on": "2029-09-10T10:11:12Z",
    "amount_to_capture": 300,
    "name": "John Doe",
    "phone": "999999999",
    "email" :"[email protected]",
    "phone_country_code": "+1",
    "description": "Its my first payment request",
    "authentication_type": "three_ds",
    "return_url": "https://google.com",
    "payment_method_data": {
        "card": {
            "card_number": "4111 1111 4555 1142",
            "card_exp_month": "03",
            "card_exp_year": "25",
            "card_cvc": "7377"     
        },
        "billing": {
            "address": {
                "line1": "1467",
                "line2": "CA",
                
                "city": "San Fransico",
                "state": "California",
                "zip": "94122",
                "country": "US",
                "first_name": "joseph",
                "last_name": "Doe"
            }
        }
    },
    "payment_method": "card",
    "payment_method_type": "credit",
    "profile_id": "pro_0rbqCtlLkyxT20XZqmfD",
    "browser_info": {
        "color_depth": 24,
        "java_enabled": true,
        "java_script_enabled": true,
        "language": "en-GB",
        "screen_height": 720,
        "screen_width": 1280,
        "time_zone": -330,
        "ip_address": "208.127.127.193",
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
    },
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    },
    
    "order_details": [
        {
            "product_name": "Tea",
            "quantity": 1,
            "amount": 110,
            "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg"
        },
        {
            "product_name": "Tea",
            "quantity": 1,
            "amount": 110,
            "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg"
        },
        {
            "product_name": "Tea",
            "quantity": 1,
            "amount": 110,
            "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg"
        }
    ]
}
'

Paypal

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_aAQFDPzzDWOfCcPY75LVpQkAns3h36qsJ12I6FeZSPdVD7z3gil5BLuc1L7j6Kl1' \
--data-raw '{
    "amount": 300,
    "currency": "USD",
    "confirm": true,
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "amount_to_capture": 300,
    "customer_id": "StripeCustomer",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+1",
    "description": "Its my first payment request",
    "authentication_type": "no_three_ds",
    "return_url": "https://google.com",
    "payment_method": "wallet",
    "payment_method_type": "paypal",
    "payment_method_data": {
        "wallet": {
            "paypal_redirect": {}
        },
        "billing": {
            "address": {
                "line1": "1467",
                "line2": "Harrison Street",
                "line3": "Harrison Street",
                "city": "San Fransico",
                "state": "California",
                "zip": "94122",
                "country": "DE",
                "first_name": "joseph",
                "last_name": "Doe"
            },
            "email":"[email protected]",
            "phone": {
                "number": "8056594427",
                "country_code": "+91"
            }
        }
    },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    }
}'

SEPA debit

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'User-Agent: Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion' \
--header 'api-key: dev_aAQFDPzzDWOfCcPY75LVpQkAns3h36qsJ12I6FeZSPdVD7z3gil5BLuc1L7j6Kl1' \
--data '{
    "amount": 6540,
    "currency": "EUR",
    "confirm": true,
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "amount_to_capture": 6540,
    "customer_id": "StripeCustomer",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+1",
    "description": "Its my first payment request",
    "authentication_type": "three_ds",
    "return_url": "https://google.com",
    "payment_method": "bank_debit",
    "payment_method_type": "sepa",
    "payment_method_data": {
        "bank_debit": {
            "sepa_bank_debit": {
                "iban": "AT611904300234573201"
            }
        },
        "billing": {
            "address": {    
                "first_name": "joseph",
                "last_name": "Doe"
            }  
        }
    },
    "browser_info": {
        "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36",
        "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8",
        "language": "nl-NL",
        "color_depth": 24,
        "screen_height": 723,
        "screen_width": 1536,
        "time_zone": 0,
        "java_enabled": true,
        "java_script_enabled": true,
        "ip_address": "127.0.0.1"
    },
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    }
}'

alipay_hk :

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_32n9KOsGwkLZUGiJwMPTdgRShHHRHmvBwYdE76M79iDh6LWid1k7xxhZuhdD6TSA' \
--data '{
    "amount": 300,
    "currency": "HKD",
    "confirm": true,
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "amount_to_capture": 300,
    "customer_id": "StripeCustomer",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+1",
    "description": "Its my first payment request",
    "authentication_type": "no_three_ds",
    "return_url": "https://google.com",
    "payment_method": "wallet",
  "payment_method_type": "ali_pay_hk",
  "payment_method_data": {
    "wallet": {
      "ali_pay_hk_redirect": {}
    }
  },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    }
}'

wechatpay

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_32n9KOsGwkLZUGiJwMPTdgRShHHRHmvBwYdE76M79iDh6LWid1k7xxhZuhdD6TSA' \
--data '{
    "amount": 300,
    "currency": "HKD",
    "confirm": true,
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "amount_to_capture": 300,
    "customer_id": "StripeCustomer",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+1",
    "description": "Its my first payment request",
    "authentication_type": "no_three_ds",
    "return_url": "https://google.com",
    "payment_method": "wallet",
  "payment_method_type": "we_chat_pay",
  "payment_method_data": {
    "wallet": {
      "we_chat_pay_redirect": {}
    }
  },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    }
}'

afterpay

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_32n9KOsGwkLZUGiJwMPTdgRShHHRHmvBwYdE76M79iDh6LWid1k7xxhZuhdD6TSA' \
--data-raw '{
    "amount": 6540,
    "currency": "GBP",
    "confirm": true,
    "capture_method": "automatic",
    "amount_to_capture": 6540,
    "customer_id": "StripeCustomer",
    "description": "Its my first payment request",
    "payment_method": "pay_later",
    "payment_method_type": "afterpay_clearpay",
    "payment_experience": "redirect_to_url",
    "payment_method_data": {
        "pay_later": {
            "afterpay_clearpay_redirect": {
                "billing_email": "[email protected]"
            }
        },
         "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "GB",
            "first_name": "joseph",
            "last_name": "Doe"
        }
    }
    },
    "shipping": {
        "address": {
            "line1": "1467",
            "line2": "CA",
            "line3": "CA",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "GB",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        }
    }
}'

Boleto :

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'User-Agent: Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion' \
--header 'api-key: dev_32n9KOsGwkLZUGiJwMPTdgRShHHRHmvBwYdE76M79iDh6LWid1k7xxhZuhdD6TSA' \
--data '{
    "amount": 6540,
    "currency": "BRL",
    "confirm": true,
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "amount_to_capture": 6540,
    "customer_id": "StripeCustomer",
    
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+1",
    "description": "Its my first payment request",
    "authentication_type": "three_ds",
    "return_url": "https://google.com",
    "payment_method": "voucher",
    "payment_method_type": "boleto",
    "payment_experience": "redirect_to_url",
    "payment_method_data": {
        "voucher": {
            "boleto": {
                "social_security_number": "56861752509"
            }
        },
        "billing": {
            "address": {
                "line1": "1467",
                "line2": "Harrison Street",
                
                "city": "São Paulo",
                "state": "SP",
                "zip": "04386040",
                "country": "BR",
                "first_name": "joseph",
                "last_name": "Doe"
            }
        }
    },
    "browser_info": {
        "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36",
        "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8",
        "language": "nl-NL",
        "color_depth": 24,
        "screen_height": 723,
        "screen_width": 1536,
        "time_zone": 0,
        "java_enabled": true,
        "java_script_enabled": true,
        "ip_address": "127.0.0.1"
    },
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    }
}'

ideal :

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_aAQFDPzzDWOfCcPY75LVpQkAns3h36qsJ12I6FeZSPdVD7z3gil5BLuc1L7j6Kl1' \
--data '{
    "amount": 70,
    "currency": "EUR",
    "confirm": true,
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "amount_to_capture": 70,
    "customer_id": "StripeCustomer",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+1",
    "description": "Its my first payment request",
    "authentication_type": "no_three_ds",
    "return_url": "https://google.com",
    "payment_method": "bank_redirect",
    "profile_id" : "pro_RoqxZnPCMlMSmFyzUIL7",
    "payment_link" : false,
    "payment_method_type": "ideal",
    "payment_method_data": {
        "bank_redirect": {
            "ideal": {
                "bank_name": "abn_amro"          
            }
        }
    },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "browser_info": {
        "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36",
        "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8",
        "language": "nl-NL",
        "color_depth": 24,
        "screen_height": 723,
        "screen_width": 1536,
        "time_zone": 0,
        "java_enabled": true,
        "java_script_enabled": true,
        "ip_address": "127.0.0.1"
    },
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    }   
}
'

sofort :

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_aAQFDPzzDWOfCcPY75LVpQkAns3h36qsJ12I6FeZSPdVD7z3gil5BLuc1L7j6Kl1' \
--data '{
    "amount": 6540,
    "currency": "EUR",
    "confirm": true,
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "amount_to_capture": 6540,
    "customer_id": "StripeCustomer",
    
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+1",
    "description": "Its my first payment request",
    "authentication_type": "three_ds",
    "return_url": "https://google.com",
    "payment_method": "bank_redirect",
    "payment_method_type": "sofort",
    "payment_method_data": {
        "bank_redirect": {
            "sofort": { 
            }
        }
    },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "browser_info": {
        "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36",
        "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8",
        "language": "nl-NL",
        "color_depth": 24,
        "screen_height": 723,
        "screen_width": 1536,
        "time_zone": 0,
        "java_enabled": true,
        "java_script_enabled": true,
        "ip_address": "127.0.0.1"
    },
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    }
}'

5 . the above curls should go through adyen and should not throw a missing field error.

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

@AkshayaFoiger AkshayaFoiger requested review from a team as code owners August 21, 2024 18:39
@AkshayaFoiger AkshayaFoiger self-assigned this Aug 21, 2024
@AkshayaFoiger AkshayaFoiger added A-connector-compatibility Area: Connector compatibility A-connector-integration Area: Connector integration labels Aug 21, 2024
@AkshayaFoiger AkshayaFoiger changed the title fix(router): [Adyen] prevent partial submission of billing address and add required fields for all payments fix(router): [Adyen] prevent partial submission of billing address and add required fields for all payment methods Aug 22, 2024
swangi-kumari
swangi-kumari previously approved these changes Aug 22, 2024
SamraatBansal
SamraatBansal previously approved these changes Aug 22, 2024
SanchithHegde
SanchithHegde previously approved these changes Aug 22, 2024
@likhinbopanna likhinbopanna added this pull request to the merge queue Aug 22, 2024
Merged via the queue into main with commit 6d60617 Aug 22, 2024
14 checks passed
@likhinbopanna likhinbopanna deleted the add-dynamic-fields branch August 22, 2024 13:47
pixincreate added a commit that referenced this pull request Aug 23, 2024
* 'main' of github.com:juspay/hyperswitch:
  feat(connector): [Adyen] add dispute flows for adyen connector (#5514)
  chore(version): 2024.08.23.0
  feat(router): [cybersource] add disable_avs and disable_cvn flag in connector metadata  (#5667)
  feat(customer_v2): add route for customer retrieve v2  (#5516)
  chore(version): 2024.08.22.1
  fix(router): [Adyen]  prevent partial submission of billing address and add required fields for all payment methods (#5660)
  docs(README): Adding Contributors guide (#5184)
  Docs: Adding redirect url details (#5507)
  feat(global_id): create a `GlobalId` domain type (#5644)
  feat(router): collect customer address details based on business profile config regardless of connector required fields (#5418)
  feat: add new routes for profile level list apis (#5589)
  refactor(core):  Refactor fallback routing behaviour in payments for v2 (#5642)
  refactor(router): add connector_transaction_id, send response body and use admin_api_auth_with_merchant_id for payments manual update flow (#5658)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-connector-compatibility Area: Connector compatibility A-connector-integration Area: Connector integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants