Skip to content

feat: allow blocking credit cards for Google Pay#1495

Open
Vani-1107 wants to merge 2 commits intomainfrom
allow-blocking-credit-cards-gpay
Open

feat: allow blocking credit cards for Google Pay#1495
Vani-1107 wants to merge 2 commits intomainfrom
allow-blocking-credit-cards-gpay

Conversation

@Vani-1107
Copy link
Copy Markdown

@Vani-1107 Vani-1107 commented Apr 10, 2026

Type of Change

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

Description

When a merchant wants to block credit cards on Google Pay, the backend sends allow_credit_cards: false in the /session-tokens response. This PR adds support for this by including the allowCreditCards field in the Google Pay parameters type definition in src/Types/GooglePayType.res
Backend PR : juspay/hyperswitch#11758

How did you test it?

Sanity Test for googlepay:

Screen.Recording.2026-04-13.at.10.55.37.AM.mov

Note: In test env. the credit card blocking feature is not working

Checklist

  • I ran npm run re:build
  • I reviewed submitted code
  • I added unit tests for my changes where possible

@semanticdiff-com
Copy link
Copy Markdown

Review changes with  SemanticDiff

@github-actions
Copy link
Copy Markdown
Contributor

🚫 Missing Linked Issue

Hi 👋 This pull request does not appear to be linked to any open issue yet.

Linking your PR to an issue helps keep the project tidy and ensures the issue is closed automatically.

✔️ How to fix this

  • Add a keyword like Fixes #123 or Closes #456 to your PR description or a commit message.
  • Or link it manually using the "Linked issues" panel in the PR sidebar.

Tip: You can link multiple issues.
🚫 Note: If only one issue is linked, it must be open for this check to pass.

Once linked, this check will pass automatically on your next push or when you re-run the workflow.

Thanks for helping maintainers! 🙌

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

🚫 Missing Linked Issue

Hi 👋 This pull request does not appear to be linked to any open issue yet.

Linking your PR to an issue helps keep the project tidy and ensures the issue is closed automatically.

✔️ How to fix this

  • Add a keyword like Fixes #123 or Closes #456 to your PR description or a commit message.
  • Or link it manually using the "Linked issues" panel in the PR sidebar.

Tip: You can link multiple issues.
🚫 Note: If only one issue is linked, it must be open for this check to pass.

Once linked, this check will pass automatically on your next push or when you re-run the workflow.

Thanks for helping maintainers! 🙌

@Vani-1107 Vani-1107 changed the title feat: allow blocking credit cards paramater for GooglePay feat:allow blocking credit cards paramater for GooglePay Apr 10, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🚫 Missing Linked Issue

Hi 👋 This pull request does not appear to be linked to any open issue yet.

Linking your PR to an issue helps keep the project tidy and ensures the issue is closed automatically.

✔️ How to fix this

  • Add a keyword like Fixes #123 or Closes #456 to your PR description or a commit message.
  • Or link it manually using the "Linked issues" panel in the PR sidebar.

Tip: You can link multiple issues.
🚫 Note: If only one issue is linked, it must be open for this check to pass.

Once linked, this check will pass automatically on your next push or when you re-run the workflow.

Thanks for helping maintainers! 🙌

@github-actions github-actions bot added the S-conventions-not-followed Some Github conventions not followed label Apr 10, 2026
@Vani-1107 Vani-1107 linked an issue Apr 10, 2026 that may be closed by this pull request
@Vani-1107 Vani-1107 changed the title feat:allow blocking credit cards paramater for GooglePay feat:allow blocking credit cards for GooglePay Apr 10, 2026
@aritro2002 aritro2002 changed the title feat:allow blocking credit cards for GooglePay feat: allow blocking credit cards for Google Pay Apr 13, 2026
@github-actions github-actions bot removed the S-conventions-not-followed Some Github conventions not followed label Apr 13, 2026
@aritro2002 aritro2002 added the Ready for Review PR with label Ready for Review should only be reviewed. label Apr 13, 2026
gatewayMerchantId: option<string>,
allowedAuthMethods: option<array<string>>,
allowedCardNetworks: option<array<string>>,
allowCreditCards: option<bool>,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

you don't need to add   allowCreditCards: option,  The sdk passes allowed_payment_methods as raw JSON through to the Google Pay API
and arrayJsonToCamelCase transforms the key to allowCreditCards automatically

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready for Review PR with label Ready for Review should only be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat:allow blocking credit cards for GooglePay

2 participants