Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(connector): [JPMORGAN, PAYU, DIGITALVIRGO] added in feature matrix api #7148

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bsayak03
Copy link
Contributor

@bsayak03 bsayak03 commented Jan 30, 2025

Type of Change

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

Fixes juspay/hyperswitch-cloud#8276

Description

Added details feature api details for Jpmorgan, Payu, Digital Virgo.

Additional Changes

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

Motivation and Context

How did you test it?

Request :

curl --location 'http://localhost:8080/feature_matrix' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_vE*****DCUv82mKkL'

Response :

{
    "connector_count": 6,
    "connectors": [
        {
            "name": "BAMBORA",
            "description": "Bambora is a leading online payment provider in Canada and United States.",
            "category": "payment_gateway",
            "supported_payment_methods": [
                {
                    "payment_method": "card",
                    "payment_method_type": "credit",
                    "mandates": "not_supported",
                    "refunds": "supported",
                    "supported_capture_methods": [
                        "automatic",
                        "manual",
                        "sequential_automatic"
                    ],
                    "three_ds": "supported",
                    "non_three_ds": "supported",
                    "supported_card_networks": [
                        "Visa",
                        "Mastercard",
                        "AmericanExpress",
                        "Discover",
                        "JCB",
                        "DinersClub"
                    ],
                    "supported_countries": [
                        "CA",
                        "US"
                    ],
                    "supported_currencies": [
                        "USD"
                    ]
                }
            ],
            "supported_webhook_flows": []
        },
        {
            "name": "DEUTSCHEBANK",
            "description": "Deutsche Bank is a German multinational investment bank and financial services company ",
            "category": "bank_acquirer",
            "supported_payment_methods": [
                {
                    "payment_method": "bank_debit",
                    "payment_method_type": "sepa",
                    "mandates": "supported",
                    "refunds": "supported",
                    "supported_capture_methods": [
                        "automatic",
                        "manual",
                        "sequential_automatic"
                    ],
                    "supported_countries": null,
                    "supported_currencies": null
                },
                {
                    "payment_method": "card",
                    "payment_method_type": "credit",
                    "mandates": "not_supported",
                    "refunds": "supported",
                    "supported_capture_methods": [
                        "automatic",
                        "manual",
                        "sequential_automatic"
                    ],
                    "three_ds": "supported",
                    "non_three_ds": "not_supported",
                    "supported_card_networks": [
                        "Visa",
                        "Mastercard"
                    ],
                    "supported_countries": null,
                    "supported_currencies": null
                }
            ],
            "supported_webhook_flows": []
        },
        {
            "name": "DIGITALVIRGO",
            "description": "Digital Virgo is an alternative payment provider specializing in carrier billing and mobile payments ",
            "category": "alternative_payment_method",
            "supported_payment_methods": [
                {
                    "payment_method": "mobile_payment",
                    "payment_method_type": "direct_carrier_billing",
                    "mandates": "not_supported",
                    "refunds": "supported",
                    "supported_capture_methods": [
                        "automatic",
                        "sequential_automatic"
                    ],
                    "supported_countries": null,
                    "supported_currencies": null
                }
            ],
            "supported_webhook_flows": []
        },
        {
            "name": "JPMORGAN",
            "description": "J.P. Morgan is a global financial services firm and investment bank, offering banking, asset management, and payment processing solutions",
            "category": "bank_acquirer",
            "supported_payment_methods": [
                {
                    "payment_method": "card",
                    "payment_method_type": "debit",
                    "mandates": "not_supported",
                    "refunds": "not_supported",
                    "supported_capture_methods": [
                        "automatic",
                        "manual"
                    ],
                    "three_ds": "not_supported",
                    "non_three_ds": "supported",
                    "supported_card_networks": [
                        "AmericanExpress",
                        "DinersClub",
                        "Discover",
                        "JCB",
                        "Mastercard",
                        "UnionPay",
                        "Visa"
                    ],
                    "supported_countries": [
                        "GR",
                        "DK",
                        "ES",
                        "BG",
                        "AT",
                        "FI",
                        "IT",
                        "SK",
                        "IE",
                        "CY",
                        "NL",
                        "HR",
                        "PL",
                        "MT",
                        "SI",
                        "PT",
                        "CA",
                        "CZ",
                        "EE",
                        "BE",
                        "SE",
                        "DE",
                        "HU",
                        "GB",
                        "LU",
                        "RO",
                        "US",
                        "FR",
                        "LV",
                        "LT"
                    ],
                    "supported_currencies": [
                        "RSD",
                        "DJF",
                        "JPY",
                        "LSL",
                        "RON",
                        "MUR",
                        "BIF",
                        "KES",
                        "IDR",
                        "PEN",
                        "ZAR",
                        "MZN",
                        "SEK",
                        "SZL",
                        "BYN",
                        "QAR",
                        "AOA",
                        "MAD",
                        "AED",
                        "DZD",
                        "CZK",
                        "TJS",
                        "UYU",
                        "SBD",
                        "XAF",
                        "KZT",
                        "USD",
                        "KHR",
                        "PHP",
                        "BOB",
                        "BDT",
                        "NAD",
                        "NIO",
                        "CHF",
                        "SAR",
                        "UAH",
                        "SOS",
                        "MMK",
                        "DOP",
                        "KYD",
                        "SCR",
                        "CNY",
                        "UGX",
                        "JMD",
                        "YER",
                        "BRL",
                        "GEL",
                        "PYG",
                        "GHS",
                        "MWK",
                        "BTN",
                        "PAB",
                        "TRY",
                        "FJD",
                        "HKD",
                        "COP",
                        "MRU",
                        "STN",
                        "TTD",
                        "HUF",
                        "HTG",
                        "RWF",
                        "AUD",
                        "AFN",
                        "CVE",
                        "CAD",
                        "AWG",
                        "AZN",
                        "MGA",
                        "MNT",
                        "XOF",
                        "HRK",
                        "NZD",
                        "BWP",
                        "MVR",
                        "XPF",
                        "UZS",
                        "BGN",
                        "PKR",
                        "ANG",
                        "WST",
                        "NPR",
                        "BMD",
                        "TZS",
                        "VND",
                        "GBP",
                        "INR",
                        "KMF",
                        "FKP",
                        "ARS",
                        "LAK",
                        "GTQ",
                        "GYD",
                        "ALL",
                        "HNL",
                        "DKK",
                        "MYR",
                        "NGN",
                        "LRD",
                        "BSD",
                        "MOP",
                        "XCD",
                        "SHP",
                        "SGD",
                        "KRW",
                        "NOK",
                        "TOP",
                        "SRD",
                        "CRC",
                        "BAM",
                        "EGP",
                        "MDL",
                        "LKR",
                        "ILS",
                        "TWD",
                        "ETB",
                        "GMD",
                        "MXN",
                        "CDF",
                        "THB",
                        "GIP",
                        "ISK",
                        "VUV",
                        "PLN",
                        "SLL",
                        "BZD",
                        "BBD",
                        "BND",
                        "ZMW",
                        "LBP",
                        "EUR",
                        "PGK",
                        "CLP",
                        "MKD",
                        "AMD"
                    ]
                },
                {
                    "payment_method": "card",
                    "payment_method_type": "credit",
                    "mandates": "not_supported",
                    "refunds": "not_supported",
                    "supported_capture_methods": [
                        "automatic",
                        "manual"
                    ],
                    "three_ds": "not_supported",
                    "non_three_ds": "supported",
                    "supported_card_networks": [
                        "AmericanExpress",
                        "DinersClub",
                        "Discover",
                        "JCB",
                        "Mastercard",
                        "UnionPay",
                        "Visa"
                    ],
                    "supported_countries": [
                        "SK",
                        "AT",
                        "FI",
                        "EE",
                        "PT",
                        "BE",
                        "CY",
                        "GR",
                        "CZ",
                        "HR",
                        "DK",
                        "GB",
                        "BG",
                        "US",
                        "LV",
                        "IE",
                        "FR",
                        "SI",
                        "LT",
                        "DE",
                        "IT",
                        "ES",
                        "SE",
                        "NL",
                        "PL",
                        "RO",
                        "MT",
                        "CA",
                        "LU",
                        "HU"
                    ],
                    "supported_currencies": [
                        "KRW",
                        "DJF",
                        "UYU",
                        "PEN",
                        "CVE",
                        "SCR",
                        "NZD",
                        "GTQ",
                        "SZL",
                        "ANG",
                        "MNT",
                        "BTN",
                        "KHR",
                        "RSD",
                        "MAD",
                        "BND",
                        "SEK",
                        "CZK",
                        "ILS",
                        "PHP",
                        "GHS",
                        "PYG",
                        "GEL",
                        "USD",
                        "STN",
                        "TJS",
                        "SLL",
                        "MGA",
                        "AZN",
                        "TZS",
                        "CRC",
                        "RON",
                        "PAB",
                        "KYD",
                        "BRL",
                        "BOB",
                        "GBP",
                        "WST",
                        "BMD",
                        "YER",
                        "EUR",
                        "CNY",
                        "ARS",
                        "JPY",
                        "LAK",
                        "MOP",
                        "RWF",
                        "XAF",
                        "UGX",
                        "NIO",
                        "ZAR",
                        "HNL",
                        "TTD",
                        "AUD",
                        "MYR",
                        "ETB",
                        "GIP",
                        "IDR",
                        "HTG",
                        "BGN",
                        "MRU",
                        "BSD",
                        "QAR",
                        "UZS",
                        "NAD",
                        "KZT",
                        "VUV",
                        "MMK",
                        "BDT",
                        "PKR",
                        "LRD",
                        "UAH",
                        "HKD",
                        "DZD",
                        "TWD",
                        "LSL",
                        "NPR",
                        "MKD",
                        "VND",
                        "AMD",
                        "AOA",
                        "CHF",
                        "BWP",
                        "XCD",
                        "SHP",
                        "DKK",
                        "NOK",
                        "COP",
                        "BBD",
                        "TOP",
                        "BAM",
                        "JMD",
                        "AWG",
                        "BYN",
                        "DOP",
                        "MVR",
                        "MXN",
                        "MWK",
                        "CLP",
                        "CDF",
                        "TRY",
                        "NGN",
                        "SAR",
                        "ZMW",
                        "LBP",
                        "SGD",
                        "SOS",
                        "GMD",
                        "INR",
                        "PGK",
                        "AFN",
                        "GYD",
                        "EGP",
                        "HRK",
                        "BZD",
                        "SBD",
                        "HUF",
                        "AED",
                        "KES",
                        "KMF",
                        "FJD",
                        "MUR",
                        "FKP",
                        "ALL",
                        "SRD",
                        "THB",
                        "BIF",
                        "LKR",
                        "CAD",
                        "MZN",
                        "ISK",
                        "MDL",
                        "XOF",
                        "XPF",
                        "PLN"
                    ]
                }
            ],
            "supported_webhook_flows": []
        },
        {
            "name": "PAYU",
            "description": "PayU is a global fintech company providing online payment solutions, including card processing, UPI, wallets, and BNPL services across multiple markets ",
            "category": "payment_gateway",
            "supported_payment_methods": [
                {
                    "payment_method": "card",
                    "payment_method_type": "debit",
                    "mandates": "not_supported",
                    "refunds": "supported",
                    "supported_capture_methods": [
                        "automatic",
                        "manual",
                        "sequential_automatic"
                    ],
                    "three_ds": "not_supported",
                    "non_three_ds": "supported",
                    "supported_card_networks": [
                        "Visa",
                        "Mastercard",
                        "Interac",
                        "AmericanExpress",
                        "JCB",
                        "DinersClub",
                        "Discover",
                        "CartesBancaires",
                        "UnionPay"
                    ],
                    "supported_countries": [
                        "RO",
                        "HU",
                        "PL",
                        "CZ"
                    ],
                    "supported_currencies": [
                        "RON",
                        "USD",
                        "DKK",
                        "GBP",
                        "HUF",
                        "PLN",
                        "NOK",
                        "SEK",
                        "CHF",
                        "CZK",
                        "EUR"
                    ]
                },
                {
                    "payment_method": "card",
                    "payment_method_type": "credit",
                    "mandates": "not_supported",
                    "refunds": "supported",
                    "supported_capture_methods": [
                        "automatic",
                        "manual",
                        "sequential_automatic"
                    ],
                    "three_ds": "not_supported",
                    "non_three_ds": "supported",
                    "supported_card_networks": [
                        "Visa",
                        "Mastercard",
                        "Interac",
                        "AmericanExpress",
                        "JCB",
                        "DinersClub",
                        "Discover",
                        "CartesBancaires",
                        "UnionPay"
                    ],
                    "supported_countries": [
                        "CZ",
                        "PL",
                        "RO",
                        "HU"
                    ],
                    "supported_currencies": [
                        "CHF",
                        "SEK",
                        "USD",
                        "PLN",
                        "EUR",
                        "DKK",
                        "CZK",
                        "RON",
                        "HUF",
                        "NOK",
                        "GBP"
                    ]
                },
                {
                    "payment_method": "wallet",
                    "payment_method_type": "google_pay",
                    "mandates": "not_supported",
                    "refunds": "supported",
                    "supported_capture_methods": [
                        "automatic",
                        "manual",
                        "sequential_automatic"
                    ],
                    "supported_countries": [
                        "CZ",
                        "PL",
                        "HU",
                        "RO"
                    ],
                    "supported_currencies": [
                        "HUF",
                        "CZK",
                        "PLN",
                        "USD",
                        "NOK",
                        "RON",
                        "SEK",
                        "DKK",
                        "GBP",
                        "EUR",
                        "CHF"
                    ]
                }
            ],
            "supported_webhook_flows": []
        },
        {
            "name": "ZSL",
            "description": "Zsl is a payment gateway operating in China, specializing in facilitating local bank transfers",
            "category": "payment_gateway",
            "supported_payment_methods": [
                {
                    "payment_method": "bank_transfer",
                    "payment_method_type": "local_bank_transfer",
                    "mandates": "not_supported",
                    "refunds": "not_supported",
                    "supported_capture_methods": [
                        "automatic"
                    ],
                    "supported_countries": [
                        "CN"
                    ],
                    "supported_currencies": [
                        "CNY"
                    ]
                }
            ],
            "supported_webhook_flows": []
        }
    ]
}

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

@bsayak03 bsayak03 self-assigned this Jan 30, 2025
@bsayak03 bsayak03 requested review from a team as code owners January 30, 2025 19:41
Copy link

semanticdiff-com bot commented Jan 30, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  crates/hyperswitch_connectors/src/connectors/digitalvirgo.rs  15% smaller
  crates/hyperswitch_connectors/src/connectors/jpmorgan.rs  9% smaller
  crates/hyperswitch_connectors/src/connectors/payu.rs  8% smaller
  config/config.example.toml Unsupported file format
  config/deployments/integration_test.toml Unsupported file format
  config/deployments/production.toml Unsupported file format
  config/deployments/sandbox.toml Unsupported file format
  config/development.toml Unsupported file format
  config/docker_compose.toml Unsupported file format

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove validate_connector_against_payment_request()

specific_features: Some(
api_models::feature_matrix::PaymentMethodSpecificFeatures::Card({
api_models::feature_matrix::CardSpecificFeatures {
three_ds: common_enums::FeatureStatus::NotSupported, // but docs has support
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we adding this comment ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can ignore this, removing the comment

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove validate_connector_against_payment_request()

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove validate_connector_against_payment_request()

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.

2 participants