Skip to content

Conversation

kashif-m
Copy link
Contributor

Type of Change

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

Description

This PR removes billing details as required fields for Worldpay connector.

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

This change helps in not showing the billing details as required fields on the payment widget.

How did you test it?

Locally, by rendering payment links.

Fetch account payment method list

cURL

curl 'http://localhost:8080/account/payment_methods?client_secret=pay_62mvQc0WyVZ5pe8QxqhR_secret_K6C6bulFCe6jdm6GogvF' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:137.0) Gecko/20100101 Firefox/137.0' -H 'Accept: */*' -H 'Accept-Language: en-US,en;q=0.5' -H 'Accept-Encoding: gzip, deflate, br, zstd' -H 'Referer: http://localhost:9050/' -H 'api-key: pk_dev_36edab4ded2a4a8abdbcffaa254eb7e4' -H 'content-type: application/json' -H 'x-browser-name: Firefox' -H 'x-browser-version: 137.0' -H 'x-client-platform: web' -H 'x-client-version: 0.122.6' -H 'x-payment-confirm-source: sdk' -H 'Origin: http://localhost:9050' -H 'Connection: keep-alive' -H 'Sec-Fetch-Dest: empty' -H 'Sec-Fetch-Mode: cors' -H 'Sec-Fetch-Site: same-site' -H 'Priority: u=4' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache'

Response

{
    "redirect_url": "https://google.com/success",
    "currency": "EUR",
    "payment_methods": [
        {
        "payment_method": "card",
        "payment_method_types": [
            {
            "payment_method_type": "credit",
            "payment_experience": null,
            "card_networks": [
                {
                "card_network": "Visa",
                "surcharge_details": null,
                "eligible_connectors": [
                    "worldpay"
                ]
                }
            ],
            "bank_names": null,
            "bank_debits": null,
            "bank_transfers": null,
            "required_fields": {
                "payment_method_data.card.card_number": {
                "required_field": "payment_method_data.card.card_number",
                "display_name": "card_number",
                "field_type": "user_card_number",
                "value": null
                },
                "payment_method_data.card.card_exp_month": {
                "required_field": "payment_method_data.card.card_exp_month",
                "display_name": "card_exp_month",
                "field_type": "user_card_expiry_month",
                "value": null
                },
                "payment_method_data.card.card_exp_year": {
                "required_field": "payment_method_data.card.card_exp_year",
                "display_name": "card_exp_year",
                "field_type": "user_card_expiry_year",
                "value": null
                }
            },
            "surcharge_details": null,
            "pm_auth_connector": null
            },
            {
            "payment_method_type": "debit",
            "payment_experience": null,
            "card_networks": [
                {
                "card_network": "Visa",
                "surcharge_details": null,
                "eligible_connectors": [
                    "worldpay"
                ]
                }
            ],
            "bank_names": null,
            "bank_debits": null,
            "bank_transfers": null,
            "required_fields": {
                "payment_method_data.card.card_exp_year": {
                "required_field": "payment_method_data.card.card_exp_year",
                "display_name": "card_exp_year",
                "field_type": "user_card_expiry_year",
                "value": null
                },
                "payment_method_data.card.card_number": {
                "required_field": "payment_method_data.card.card_number",
                "display_name": "card_number",
                "field_type": "user_card_number",
                "value": null
                },
                "payment_method_data.card.card_exp_month": {
                "required_field": "payment_method_data.card.card_exp_month",
                "display_name": "card_exp_month",
                "field_type": "user_card_expiry_month",
                "value": null
                }
            },
            "surcharge_details": null,
            "pm_auth_connector": null
            }
        ]
        }
    ],
    "mandate_payment": null,
    "merchant_name": "NewAge Retailer",
    "show_surcharge_breakup_screen": false,
    "payment_type": "normal",
    "request_external_three_ds_authentication": false,
    "collect_shipping_details_from_wallets": false,
    "collect_billing_details_from_wallets": false,
    "is_tax_calculation_enabled": false
    }

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

@kashif-m kashif-m self-assigned this Apr 18, 2025
@kashif-m kashif-m requested a review from a team as a code owner April 18, 2025 11:38
@kashif-m kashif-m linked an issue Apr 18, 2025 that may be closed by this pull request
Copy link

semanticdiff-com bot commented Apr 18, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  crates/payment_methods/src/configs/payment_connector_required_fields.rs  0% smaller

srujanchikke
srujanchikke previously approved these changes Apr 21, 2025
@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Apr 21, 2025
@Gnanasundari24 Gnanasundari24 removed this pull request from the merge queue due to a manual request Apr 21, 2025
…ling-details-are-required-fields-from-worldpay
@kashif-m kashif-m requested a review from a team as a code owner April 21, 2025 11:49
@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Apr 22, 2025
Merged via the queue into main with commit 8a68cc7 Apr 22, 2025
16 of 20 checks passed
@Gnanasundari24 Gnanasundari24 deleted the 7852-chore-remove-billing-details-are-required-fields-from-worldpay branch April 22, 2025 08:46
pixincreate added a commit that referenced this pull request Apr 22, 2025
…acilitapay-pix-pmt

* 'main' of github.com:juspay/hyperswitch:
  fix(connector): revert noon-paypal (#7864)
  refactor(cypress): do not update `card_expiry` while updating card info (#7834)
  feat(vsaas): add processor_merchant_id and created_by column in payment_intents and payments_attempts for v1 (#7768)
  chore(dynamic-fields): remove billing details as required fields for Worldpay connector (#7853)
  feat(dynamic_routing): integration of elimination routing for core flows (#6816)
  chore(version): 2025.04.22.0
  revert: fix(connector): [noon] address `next_action_url` being `null` for cards in 3ds payment (#7859)
  feat(dynamic_routing): add open router integration for success based routing (#7795)
  feat(refunds_v2): Add refund create core flow (#7619)
  fix(core): [CARD TESTING GUARD] Added Card Testing Guard Config response in case of NULL (#7478)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CHORE] remove billing details are required fields from Worldpay
5 participants