- If you don't have PHP 7.4 installed. You can install it using
brew install php@7.4.
- If you have a different version of PHP you can switch using
brew-php-switcher. Install this by running brew install brew-php-switcher, then run brew-php-switcher 7.4
- To install composer run
brew install composer
- switch to server directory
cd server/php
- run
composer install
- add the appropriate publisher test keys to line 65 of step_1_save_card.html
// init collect card details
const stripe = Stripe('');
- add appropriate publisher key to line 25 of step_3_complete.html
const stripe = Stripe(''); // set publisher key
- don't forget to create
.env in the directory server/php file and add STRIPE_SECRET_KEY= variable
- switch to server directory
cd server/php
- run
composer start
- visit http://localhost:4242 in browser to add card
- copy customer id and payment method id and visit http://localhost:4242/admin to test charging later
- Always requires 3DS: 4000 0027 6000 3184
- Requires 3DS once: 4000 0025 0000 3155