Test users - guardian/support-frontend GitHub Wiki
It is possible to go through any of the checkouts on the site as a test user which will allow you to use a test credit card or PayPal account
- Go to https://support.theguardian.com/test-users (requires you to be signed in with your Guardian Gmail account) - this will set a cookie called
_test_usernamewhich will put the site into test mode for the next 48hrs (or until you delete the cookie).
In order for users you create to be recognised as test users in other systems (such as members-data-api or manage.theguardian.com) you will also need to checkout with particular details described below, if you are only testing support.theguardian.com you can safely ignore these instructions.
On the test user page you should see a test user key which will look something like r2aIEKAaWmPpxaVndcc
-
Go to the checkout you want to test and enter the following details:
- first name - [test user key eg. r2aIEKAaWmPpxaVndcc]
- last name - [test user key eg. r2aIEKAaWmPpxaVndcc]
- email address
- if you don't want registration/thank you emails - [email protected]
- if you do want emails - [email protected]
- NOTE: if you use your guardian or theguardian email, you will automatically get staff digital access
-
Now checkout using one of the following...
-
Credit Card
Card Number: 4242 4242 4242 4242 Expiry: any future date CVC: any three digit numberthere are numerous other test cards at https://stripe.com/docs/testing#cards
-
Direct Debit (UK only currently)
Account Name: anything Account Number: 55779911 Sort Code: 200000ref: https://developer.gocardless.com/getting-started/developer-tools/test-bank-details/
-
PayPal
For credentials see the following entries in parameter store (AWS membership access required): https://eu-west-1.console.aws.amazon.com/systems-manager/parameters/payPalTestUserEmail and https://eu-west-1.console.aws.amazon.com/systems-manager/parameters/payPalTestUserPassword
-
Apple pay
Username: [email protected]
-
- log in to the above account with your System Settings=>Apple ID (you can ask around for the password, or reset it if necessary)
- Do not set up 2FA (click Other options and Not Now)
- go to System Settings=>Wallet and Apple Pay
- if there's no valid card, add one from https://developer.apple.com/apple-pay/sandbox-testing/
- open safari and visit the /test-users page and then the checkout The payment request button should be present and working.
- Visit the relevant checkout in
- Google pay We are not sure how to test google pay, as the guardian organisation doesn't allow adding cards. If you try harder and find a way, add the details here. So far people have been using their personal accounts as a test user (which doesn't actually charge you)