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

PP-11594 Add ‘sandbox’ to ‘isDigitalWalletSupported’ test. #4143

Closed
wants to merge 17 commits into from

Conversation

JFSGDS
Copy link
Contributor

@JFSGDS JFSGDS commented Oct 16, 2023

WHAT

Allow enabling Apple Pay and Google Pay for Sandbox gateway accounts

https://payments-platform.atlassian.net/browse/PP-11594

HOW

  • Extend existing ‘isDigitalWalletsSuported’ test for ‘Stripe’ and ‘Worldpay’ accounts to include ‘sandbox’ accounts
  • Add feature flag ‘ALLOW_ENABLING_DIGITAL_WALLETS_FOR_SANDBOX_ACCOUNT’ as part of test condition
  • Add unit tests for all sandbox feature flag states

JFSGDS and others added 17 commits October 13, 2023 16:12
- Extend existing ‘isDigitalWalletsSuported’ test for ‘Stripe’ and ‘Worldpay’ accounts to include ‘sandbox’ accounts
- Add feature flag ‘ALLOW_ENABLING_DIGITAL_WALLETS_FOR_SANDBOX_ACCOUNT’ as part of test condition
- Add unit tests for all sandbox feature flag states
We want updates for Node 18.x but not 19.x.
Bumps node from 18.17.1-alpine3.18 to 18.18.2-alpine3.18.

---
updated-dependencies:
- dependency-name: node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
…-alpine3.18

Bump node from 18.17.1-alpine3.18 to 18.18.2-alpine3.18
Update ‘Mock card numbers’ template to test for ‘stripe’ account and display UK issued test card.
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.22.10 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
…traverse-7.23.2

Bump @babel/traverse from 7.22.10 to 7.23.2
Update '.secrets.baseline' to include credentials for new cypress 'Pay demo/Mock cards' test.
Add Cypresss test to check 'Mock card' screen shows correct card number for non Stripe accounts.
Add Cypresss test to check 'Mock card' screen shows correct card number for Stripe accounts.
…r-in-stripe-test-accounts

PP-9916 Change test card number in Stripe test accounts
* PP-7843 Stop selecting default option on permission level radios
- Extend existing ‘isDigitalWalletsSuported’ test for ‘Stripe’ and ‘Worldpay’ accounts to include ‘sandbox’ accounts
- Add feature flag ‘ALLOW_ENABLING_DIGITAL_WALLETS_FOR_SANDBOX_ACCOUNT’ as part of test condition
- Add unit tests for all sandbox feature flag states
….com:alphagov/pay-selfservice into PP-11594-enable-apple-gpay-for-sandbox-accts
- Remove ‘apple pay toggle with unsupported payment provider request’ test
- Remove ‘google pay toggle with unsupported payment provider request' test
@JFSGDS JFSGDS marked this pull request as ready for review October 26, 2023 15:57
@nlsteers
Copy link
Collaborator

nlsteers commented Nov 1, 2023

can you squash some of these commits and rebase the branch, there's a bunch of merge commits in here that don't need to be, it's hard to know which are your changes at a glance

Comment on lines 124 to 127
convertedData.isDigitalWalletSupported = paymentProvider === 'worldpay' ||
(paymentProvider === 'sandbox' && process.env.ALLOW_ENABLING_DIGITAL_WALLETS_FOR_SANDBOX_ACCOUNT === 'true') ||
(paymentProvider === 'stripe' && process.env.ALLOW_ENABLING_DIGITAL_WALLETS_FOR_STRIPE_ACCOUNT === 'true') ||
(paymentProvider === 'stripe' && convertedData.isTestGateway === true)
Copy link
Collaborator

Choose a reason for hiding this comment

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

wallet payments for stripe are now live so we can probably remove the env var that toggles this feature

Suggested change
convertedData.isDigitalWalletSupported = paymentProvider === 'worldpay' ||
(paymentProvider === 'sandbox' && process.env.ALLOW_ENABLING_DIGITAL_WALLETS_FOR_SANDBOX_ACCOUNT === 'true') ||
(paymentProvider === 'stripe' && process.env.ALLOW_ENABLING_DIGITAL_WALLETS_FOR_STRIPE_ACCOUNT === 'true') ||
(paymentProvider === 'stripe' && convertedData.isTestGateway === true)
convertedData.isDigitalWalletSupported = paymentProvider === 'worldpay' ||
(paymentProvider === 'sandbox' && process.env.ALLOW_ENABLING_DIGITAL_WALLETS_FOR_SANDBOX_ACCOUNT === 'true') ||
paymentProvider === 'stripe'

Copy link
Collaborator

Choose a reason for hiding this comment

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

might need to update some tests if taking this suggestion

@JFSGDS
Copy link
Contributor Author

JFSGDS commented Nov 3, 2023

This pull request has been superseded by pull request #4153 and can now be closed.

@JFSGDS JFSGDS closed this Nov 3, 2023
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.

4 participants