Skip to content

inpsyde/paypal-point-of-sale

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

PayPal Point of Sale

Installation

The best way to use this package is through Composer:

$ composer require inpsyde/paypal-point-of-sale

Requirements

  • PHP >= 8.2
  • WordPress >= 6.8
  • WooCommerce >= 10.2

Development

  1. Install Docker and DDEV. Edit the configuration in the .ddev/config.yml file if needed.
  2. Get your packagist token, copy/hardlink your Composer auth.json (from ~/.config/composer/auth.json or ~/.composer/auth.json) to ~/.ddev/homeadditions/.composer/auth.json
  3. Run make setup to setup DDEV and install dependencies. Go to https://paypal-point-of-sale.ddev.site
  4. Run make lint test to 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.

Webhooks

For testing webhooks locally, follow these steps to set up ngrok:

  1. Install ngrok.

  2. Run our wrapper Bash script which will start ddev share and 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.

Tests

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/phpunit

to 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.

Linter

Run this to execute PHP_CodeSniffer and psalm checking code style and quality in all modules:

make lint

You can also run

../../vendor/bin/phpcs .

to execute it only in a single module (after cd to its' directory inside modules.local).

Crafted by Syde

The team at Syde is engineering the Web since 2006.

License

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.

Contributing

All feedback / bug reports / pull requests are welcome.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors