The best way to use this package is through Composer:
$ composer require inpsyde/paypal-point-of-sale- PHP >= 8.2
- WordPress >= 6.8
- WooCommerce >= 10.2
- Install Docker and DDEV. Edit the configuration in the
.ddev/config.ymlfile if needed. - Get your packagist token,
copy/hardlink your Composer
auth.json(from~/.config/composer/auth.jsonor~/.composer/auth.json) to~/.ddev/homeadditions/.composer/auth.json - Run
make setupto setup DDEV and install dependencies. Go to https://paypal-point-of-sale.ddev.site - Run
make lint testto run linter and tests.
Use make reset for reinstallation (will destroy all site data).
You may also need make restart to apply the config changes.
See Makefile for other useful commands.
For Windows users: make is not included out-of-the-box but you can simply copy the commands from Makefile to cmd,
e.g. ddev exec phpcs, ddev exec psalm instead of make lint.
For testing webhooks locally, follow these steps to set up ngrok:
-
Install ngrok.
-
Run our wrapper Bash script which will start
ddev shareand replace the URLs in the WP database:make ngrok
For other environments, you can instead run ngrok http -host-header=rewrite zettle.myhost
and set NGROK_HOST env variable to the host that you got from ngrok, like abcd1234.ngrok.io.
In this case, ngrok will be used only for the webhook listening URL (zettle.webhook.listener.url service).
The URLs displayed on the WordPress pages, used in redirects, etc. will still remain local.
Set the API key in .env.phpunit and run this to execute all tests in all modules:
make test
You can also run
vendor/bin/phpunitto execute tests only in a single module (after cd to its' directory inside modules.local),
or to execute only integration/acceptance tests in the repository root.
Run this to execute PHP_CodeSniffer and psalm checking code style and quality in all modules:
make lintYou can also run
../../vendor/bin/phpcs .to execute it only in a single module (after cd to its' directory inside modules.local).
The team at Syde is engineering the Web since 2006.
Copyright (c) 2025 Syde
Good news, this plugin is free for everyone! Since it's released under the GPL-2.0 License you can use it free of charge on your personal or commercial website.
All feedback / bug reports / pull requests are welcome.