Skip to content

feat(connector): [Barclaycard] Add Google Pay Payment Method #8786

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

Merged
merged 7 commits into from
Aug 6, 2025
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions config/config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,11 @@ google_pay = { currency = "ARS, AUD, CAD, CLP, COP, EUR, HKD, INR, KWD, MYR, MXN
samsung_pay = { currency = "USD,GBP,EUR,SEK" }
paze = { currency = "USD,SEK" }

[pm_filters.barclaycard]
credit = { currency = "USD,GBP,EUR,PLN,SEK" }
debit = { currency = "USD,GBP,EUR,PLN,SEK" }
google_pay = { currency = "ARS, AUD, CAD, CLP, COP, EUR, HKD, INR, KWD, MYR, MXN, NZD, PEN, QAR, SAR, SGD, ZAR, UAH, AED, GBP, USD, PLN, SEK" }

[pm_filters.globepay]
ali_pay = { country = "GB",currency = "GBP" }
we_chat_pay = { country = "GB",currency = "GBP" }
Expand Down
5 changes: 5 additions & 0 deletions config/deployments/integration_test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,11 @@ google_pay = { currency = "ARS, AUD, CAD, CLP, COP, EUR, HKD, INR, KWD, MYR, MXN
samsung_pay = { currency = "USD,GBP,EUR,SEK" }
paze = { currency = "USD,SEK" }

[pm_filters.barclaycard]
credit = { currency = "USD,GBP,EUR,PLN,SEK" }
debit = { currency = "USD,GBP,EUR,PLN,SEK" }
google_pay = { currency = "ARS, AUD, CAD, CLP, COP, EUR, HKD, INR, KWD, MYR, MXN, NZD, PEN, QAR, SAR, SGD, ZAR, UAH, AED, GBP, USD, PLN, SEK" }

[pm_filters.itaubank]
pix = { country = "BR", currency = "BRL" }

Expand Down
5 changes: 5 additions & 0 deletions config/deployments/production.toml
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,11 @@ google_pay = { currency = "ARS, AUD, CAD, CLP, COP, EUR, HKD, INR, KWD, MYR, MXN
samsung_pay = { currency = "USD,GBP,EUR,SEK" }
paze = { currency = "USD,SEK" }

[pm_filters.barclaycard]
credit = { currency = "USD,GBP,EUR,PLN,SEK" }
debit = { currency = "USD,GBP,EUR,PLN,SEK" }
google_pay = { currency = "ARS, AUD, CAD, CLP, COP, EUR, HKD, INR, KWD, MYR, MXN, NZD, PEN, QAR, SAR, SGD, ZAR, UAH, AED, GBP, USD, PLN, SEK" }

[pm_filters.itaubank]
pix = { country = "BR", currency = "BRL" }

Expand Down
5 changes: 5 additions & 0 deletions config/deployments/sandbox.toml
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,11 @@ google_pay = { currency = "ARS, AUD, CAD, CLP, COP, EUR, HKD, INR, KWD, MYR, MXN
samsung_pay = { currency = "USD,GBP,EUR,SEK" }
paze = { currency = "USD,SEK" }

[pm_filters.barclaycard]
credit = { currency = "USD,GBP,EUR,PLN,SEK" }
debit = { currency = "USD,GBP,EUR,PLN,SEK" }
google_pay = { currency = "ARS, AUD, CAD, CLP, COP, EUR, HKD, INR, KWD, MYR, MXN, NZD, PEN, QAR, SAR, SGD, ZAR, UAH, AED, GBP, USD, PLN, SEK" }

[pm_filters.nexixpay]
credit = { country = "AT,BE,CY,EE,FI,FR,DE,GR,IE,IT,LV,LT,LU,MT,NL,PT,SK,SI,ES,BG,HR,DK,GB,NO,PL,CZ,RO,SE,CH,HU,AU,BR,US", currency = "ARS,AUD,BHD,CAD,CLP,CNY,COP,HRK,CZK,DKK,HKD,HUF,INR,JPY,KZT,JOD,KRW,KWD,MYR,MXN,NGN,NOK,PHP,QAR,RUB,SAR,SGD,VND,ZAR,SEK,CHF,THB,AED,EGP,GBP,USD,TWD,BYN,RSD,AZN,RON,TRY,AOA,BGN,EUR,UAH,PLN,BRL" }
debit = { country = "AT,BE,CY,EE,FI,FR,DE,GR,IE,IT,LV,LT,LU,MT,NL,PT,SK,SI,ES,BG,HR,DK,GB,NO,PL,CZ,RO,SE,CH,HU,AU,BR,US", currency = "ARS,AUD,BHD,CAD,CLP,CNY,COP,HRK,CZK,DKK,HKD,HUF,INR,JPY,KZT,JOD,KRW,KWD,MYR,MXN,NGN,NOK,PHP,QAR,RUB,SAR,SGD,VND,ZAR,SEK,CHF,THB,AED,EGP,GBP,USD,TWD,BYN,RSD,AZN,RON,TRY,AOA,BGN,EUR,UAH,PLN,BRL" }
Expand Down
5 changes: 5 additions & 0 deletions config/development.toml
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,11 @@ google_pay = { currency = "ARS, AUD, CAD, CLP, COP, EUR, HKD, INR, KWD, MYR, MXN
samsung_pay = { currency = "USD,GBP,EUR,SEK" }
paze = { currency = "USD,SEK" }

[pm_filters.barclaycard]
credit = { currency = "USD,GBP,EUR,PLN,SEK" }
debit = { currency = "USD,GBP,EUR,PLN,SEK" }
google_pay = { currency = "ARS, AUD, CAD, CLP, COP, EUR, HKD, INR, KWD, MYR, MXN, NZD, PEN, QAR, SAR, SGD, ZAR, UAH, AED, GBP, USD, PLN, SEK" }


[pm_filters.globepay]
ali_pay = { country = "GB",currency = "GBP,CNY" }
Expand Down
5 changes: 5 additions & 0 deletions config/docker_compose.toml
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,11 @@ google_pay = { currency = "ARS, AUD, CAD, CLP, COP, EUR, HKD, INR, KWD, MYR, MXN
samsung_pay = { currency = "USD,GBP,EUR,SEK" }
paze = { currency = "USD,SEK" }

[pm_filters.barclaycard]
credit = { currency = "USD,GBP,EUR,PLN,SEK" }
debit = { currency = "USD,GBP,EUR,PLN,SEK" }
google_pay = { currency = "ARS, AUD, CAD, CLP, COP, EUR, HKD, INR, KWD, MYR, MXN, NZD, PEN, QAR, SAR, SGD, ZAR, UAH, AED, GBP, USD, PLN, SEK" }

[pm_filters.globepay]
ali_pay = { country = "GB",currency = "GBP,CNY" }
we_chat_pay = { country = "GB",currency = "GBP,CNY" }
Expand Down
72 changes: 72 additions & 0 deletions crates/connector_configs/toml/development.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1026,11 +1026,83 @@ options=["visa","masterCard","amex","discover"]
payment_method_type = "CartesBancaires"
[[barclaycard.debit]]
payment_method_type = "UnionPay"
[[barclaycard.wallet]]
payment_method_type = "google_pay"
[barclaycard.connector_auth.SignatureKey]
api_key="Key"
key1="Merchant ID"
api_secret="Shared Secret"

[[barclaycard.metadata.google_pay]]
name = "merchant_name"
label = "Google Pay Merchant Name"
placeholder = "Enter Google Pay Merchant Name"
required = true
type = "Text"
[[barclaycard.metadata.google_pay]]
name = "merchant_id"
label = "Google Pay Merchant Id"
placeholder = "Enter Google Pay Merchant Id"
required = true
type = "Text"
[[barclaycard.metadata.google_pay]]
name = "gateway_merchant_id"
label = "Google Pay Merchant Key"
placeholder = "Enter Google Pay Merchant Key"
required = true
type = "Text"
[[barclaycard.metadata.google_pay]]
name = "allowed_auth_methods"
label = "Allowed Auth Methods"
placeholder = "Enter Allowed Auth Methods"
required = true
type = "MultiSelect"
options = ["PAN_ONLY", "CRYPTOGRAM_3DS"]

[[barclaycard.connector_wallets_details.google_pay]]
name = "merchant_name"
label = "Google Pay Merchant Name"
placeholder = "Enter Google Pay Merchant Name"
required = true
type = "Text"
[[barclaycard.connector_wallets_details.google_pay]]
name = "merchant_id"
label = "Google Pay Merchant Id"
placeholder = "Enter Google Pay Merchant Id"
required = true
type = "Text"
[[barclaycard.connector_wallets_details.google_pay]]
name = "gateway_merchant_id"
label = "Google Pay Merchant Key"
placeholder = "Enter Google Pay Merchant Key"
required = true
type = "Text"
[[barclaycard.connector_wallets_details.google_pay]]
name = "public_key"
label = "Google Pay Public Key"
placeholder = "Enter Google Pay Public Key"
required = true
type = "Text"
[[barclaycard.connector_wallets_details.google_pay]]
name = "private_key"
label = "Google Pay Private Key"
placeholder = "Enter Google Pay Private Key"
required = true
type = "Text"
[[barclaycard.connector_wallets_details.google_pay]]
name = "recipient_id"
label = "Recipient Id"
placeholder = "Enter Recipient Id"
required = true
type = "Text"
[[barclaycard.connector_wallets_details.google_pay]]
name = "allowed_auth_methods"
label = "Allowed Auth Methods"
placeholder = "Enter Allowed Auth Methods"
required = true
type = "MultiSelect"
options = ["PAN_ONLY", "CRYPTOGRAM_3DS"]

[bitpay]
[[bitpay.crypto]]
payment_method_type = "crypto_currency"
Expand Down
72 changes: 72 additions & 0 deletions crates/connector_configs/toml/production.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1028,11 +1028,83 @@ payment_method_type = "DinersClub"
payment_method_type = "CartesBancaires"
[[barclaycard.debit]]
payment_method_type = "UnionPay"
[[barclaycard.wallet]]
payment_method_type = "google_pay"
[barclaycard.connector_auth.SignatureKey]
api_key = "Key"
key1 = "Merchant ID"
api_secret = "Shared Secret"

[[barclaycard.metadata.google_pay]]
name = "merchant_name"
label = "Google Pay Merchant Name"
placeholder = "Enter Google Pay Merchant Name"
required = true
type = "Text"
[[barclaycard.metadata.google_pay]]
name = "merchant_id"
label = "Google Pay Merchant Id"
placeholder = "Enter Google Pay Merchant Id"
required = true
type = "Text"
[[barclaycard.metadata.google_pay]]
name = "gateway_merchant_id"
label = "Google Pay Merchant Key"
placeholder = "Enter Google Pay Merchant Key"
required = true
type = "Text"
[[barclaycard.metadata.google_pay]]
name = "allowed_auth_methods"
label = "Allowed Auth Methods"
placeholder = "Enter Allowed Auth Methods"
required = true
type = "MultiSelect"
options = ["PAN_ONLY", "CRYPTOGRAM_3DS"]

[[barclaycard.connector_wallets_details.google_pay]]
name = "merchant_name"
label = "Google Pay Merchant Name"
placeholder = "Enter Google Pay Merchant Name"
required = true
type = "Text"
[[barclaycard.connector_wallets_details.google_pay]]
name = "merchant_id"
label = "Google Pay Merchant Id"
placeholder = "Enter Google Pay Merchant Id"
required = true
type = "Text"
[[barclaycard.connector_wallets_details.google_pay]]
name = "gateway_merchant_id"
label = "Google Pay Merchant Key"
placeholder = "Enter Google Pay Merchant Key"
required = true
type = "Text"
[[barclaycard.connector_wallets_details.google_pay]]
name = "public_key"
label = "Google Pay Public Key"
placeholder = "Enter Google Pay Public Key"
required = true
type = "Text"
[[barclaycard.connector_wallets_details.google_pay]]
name = "private_key"
label = "Google Pay Private Key"
placeholder = "Enter Google Pay Private Key"
required = true
type = "Text"
[[barclaycard.connector_wallets_details.google_pay]]
name = "recipient_id"
label = "Recipient Id"
placeholder = "Enter Recipient Id"
required = true
type = "Text"
[[barclaycard.connector_wallets_details.google_pay]]
name = "allowed_auth_methods"
label = "Allowed Auth Methods"
placeholder = "Enter Allowed Auth Methods"
required = true
type = "MultiSelect"
options = ["PAN_ONLY", "CRYPTOGRAM_3DS"]

[cashtocode]
[[cashtocode.reward]]
payment_method_type = "classic"
Expand Down
72 changes: 72 additions & 0 deletions crates/connector_configs/toml/sandbox.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1026,11 +1026,83 @@ payment_method_type = "DinersClub"
payment_method_type = "CartesBancaires"
[[barclaycard.debit]]
payment_method_type = "UnionPay"
[[barclaycard.wallet]]
payment_method_type = "google_pay"
[barclaycard.connector_auth.SignatureKey]
api_key = "Key"
key1 = "Merchant ID"
api_secret = "Shared Secret"

[[barclaycard.metadata.google_pay]]
name = "merchant_name"
label = "Google Pay Merchant Name"
placeholder = "Enter Google Pay Merchant Name"
required = true
type = "Text"
[[barclaycard.metadata.google_pay]]
name = "merchant_id"
label = "Google Pay Merchant Id"
placeholder = "Enter Google Pay Merchant Id"
required = true
type = "Text"
[[barclaycard.metadata.google_pay]]
name = "gateway_merchant_id"
label = "Google Pay Merchant Key"
placeholder = "Enter Google Pay Merchant Key"
required = true
type = "Text"
[[barclaycard.metadata.google_pay]]
name = "allowed_auth_methods"
label = "Allowed Auth Methods"
placeholder = "Enter Allowed Auth Methods"
required = true
type = "MultiSelect"
options = ["PAN_ONLY", "CRYPTOGRAM_3DS"]

[[barclaycard.connector_wallets_details.google_pay]]
name = "merchant_name"
label = "Google Pay Merchant Name"
placeholder = "Enter Google Pay Merchant Name"
required = true
type = "Text"
[[barclaycard.connector_wallets_details.google_pay]]
name = "merchant_id"
label = "Google Pay Merchant Id"
placeholder = "Enter Google Pay Merchant Id"
required = true
type = "Text"
[[barclaycard.connector_wallets_details.google_pay]]
name = "gateway_merchant_id"
label = "Google Pay Merchant Key"
placeholder = "Enter Google Pay Merchant Key"
required = true
type = "Text"
[[barclaycard.connector_wallets_details.google_pay]]
name = "public_key"
label = "Google Pay Public Key"
placeholder = "Enter Google Pay Public Key"
required = true
type = "Text"
[[barclaycard.connector_wallets_details.google_pay]]
name = "private_key"
label = "Google Pay Private Key"
placeholder = "Enter Google Pay Private Key"
required = true
type = "Text"
[[barclaycard.connector_wallets_details.google_pay]]
name = "recipient_id"
label = "Recipient Id"
placeholder = "Enter Recipient Id"
required = true
type = "Text"
[[barclaycard.connector_wallets_details.google_pay]]
name = "allowed_auth_methods"
label = "Allowed Auth Methods"
placeholder = "Enter Allowed Auth Methods"
required = true
type = "MultiSelect"
options = ["PAN_ONLY", "CRYPTOGRAM_3DS"]

[bitpay]
[[bitpay.crypto]]
payment_method_type = "crypto_currency"
Expand Down
15 changes: 13 additions & 2 deletions crates/hyperswitch_connectors/src/connectors/barclaycard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1003,19 +1003,30 @@ static BARCLAYCARD_SUPPORTED_PAYMENT_METHODS: LazyLock<SupportedPaymentMethods>
PaymentMethodDetails {
mandates: enums::FeatureStatus::NotSupported,
refunds: enums::FeatureStatus::Supported,
supported_capture_methods,
supported_capture_methods: supported_capture_methods.clone(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Dashboard changes for google pay via barclays?

specific_features: Some(
api_models::feature_matrix::PaymentMethodSpecificFeatures::Card({
api_models::feature_matrix::CardSpecificFeatures {
three_ds: common_enums::FeatureStatus::NotSupported,
no_three_ds: common_enums::FeatureStatus::Supported,
supported_card_networks: supported_card_network,
supported_card_networks: supported_card_network.clone(),
}
}),
),
},
);

barclaycard_supported_payment_methods.add(
enums::PaymentMethod::Wallet,
enums::PaymentMethodType::GooglePay,
PaymentMethodDetails {
mandates: enums::FeatureStatus::NotSupported,
refunds: enums::FeatureStatus::Supported,
supported_capture_methods,
specific_features: None,
},
);

barclaycard_supported_payment_methods
});

Expand Down
Loading
Loading