2020-10-08 20:03:07 -03:00
# WooCommerce PayPal Payments
2020-03-19 16:47:08 +01:00
2021-03-09 13:43:24 +02:00
PayPal's latest complete payments processing solution. Accept PayPal, Pay Later, credit/debit cards, alternative digital wallets local payment types and bank accounts. Turn on only PayPal options or process a full suite of payment methods. Enable global transaction with extensive currency and country coverage.
2020-03-19 16:47:08 +01:00
2020-10-08 07:36:52 +03:00
## Requirements
2020-03-19 16:47:08 +01:00
2021-08-18 15:40:55 +02:00
* PHP >= 7.1
2020-10-08 07:36:52 +03:00
* WordPress >=5.3
* WooCommerce >=4.5
2020-03-19 16:47:08 +01:00
2020-10-08 07:36:52 +03:00
## Development
2020-03-19 16:47:08 +01:00
2020-09-03 07:07:16 +03:00
1. Clone repository
2020-10-08 20:03:07 -03:00
2. `$ cd woocommerce-paypal-payments`
2020-09-03 07:07:16 +03:00
3. `$ composer install`
2020-11-05 13:24:14 -03:00
4. `$ yarn run build:dev`
2020-10-08 07:36:52 +03:00
5. Change the `PAYPAL_INTEGRATION_DATE` constant to `gmdate( 'Y-m-d' )` to run the latest PayPal JavaScript SDK
2020-03-19 16:47:08 +01:00
2020-10-08 07:36:52 +03:00
### Unit tests and code style
2020-03-19 16:47:08 +01:00
2020-10-08 07:36:52 +03:00
1. `$ composer install`
2. `$ ./vendor/bin/phpunit`
2021-08-19 10:12:15 +03:00
3. `$ ./vendor/bin/phpcs`
2020-03-19 16:47:08 +01:00
2021-08-19 17:49:54 +03:00
### Docker
You can also use the Docker environment which includes WP, WC and all developments tools.
0. Install Docker and Docker Compose.
1. `$ cp .env.example .env` and edit the configuration in the `.env` file if needed.
2. `$ yarn run docker:build` (or copy the commands from [package.json ](/package.json ) if you do not have `yarn` ).
2021-08-30 16:57:02 +03:00
3. `$ yarn run docker:install`
4. `$ yarn run docker:start`
2021-08-19 17:49:54 +03:00
5. Add `127.0.0.1 wc-pp.myhost` to your `hosts` file and open http://wc-pp.myhost (the default value of `WP_DOMAIN` in `.env` ).
Tests and code style:
- `$ yarn run docker:test`
- `$ yarn run docker:lint`
After some changes in `.env` (such as PHP, WP versions) you may need to rebuild the Docker image:
1. `$ yarn run docker:destroy` (all data will be lost)
2. `$ yarn run docker:build`
See [package.json ](/package.json ) for other useful commands.
2021-08-30 17:21:45 +03:00
## Building a release package
2020-03-19 16:47:08 +01:00
2021-08-30 17:21:45 +03:00
If you want to build a release package
(that can be used for deploying a new version on wordpress.org or manual installation on a WP website via ZIP uploading),
follow these steps:
2020-10-08 07:36:52 +03:00
2021-08-30 17:21:45 +03:00
1. Clone the repository and `cd` into it.
2. Make sure you have the version in the plugin root file updated.
3. Update the PayPal JavaScript SDK integration date by using the current date for the `PAYPAL_INTEGRATION_DATE` constant.
4. The following command should get you a ZIP file ready to be used on a WordPress site:
2020-11-05 13:24:14 -03:00
2020-10-08 07:36:52 +03:00
```
2021-08-30 17:21:45 +03:00
$ yarn run build
2020-10-08 07:36:52 +03:00
```
2020-03-19 16:47:08 +01:00
2020-10-08 07:36:52 +03:00
## License
2020-03-19 16:47:08 +01:00
2020-10-08 07:36:52 +03:00
[GPL-2.0 License ](LICENSE )
2020-03-19 16:47:08 +01:00
## Contributing
2020-10-08 20:03:07 -03:00
All feedback / bug reports / pull requests are welcome.