Merge pull request #55 from woocommerce/issue-54-readme

Update README, remove unnecessary files
This commit is contained in:
David Remer 2020-10-08 07:41:45 +03:00 committed by GitHub
commit a8c36bc260
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 58 additions and 197 deletions

View file

@ -1,35 +1,73 @@
# Inpsyde WooCommerce PayPal Commerce Gateway
# PayPal Payments for WooCommerce
PayPal Commerce Platform for WooCommerce
PayPal's latest complete payments processing solution. Accept PayPal, PayPal Credit, 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.
## Table Of Contents
## Requirements
* [Installation](#installation)
* [Usage](#usage)
* [Crafted by Inpsyde](#crafted-by-inpsyde)
* [License](#license)
* [Contributing](#contributing)
* PHP >= 7.0
* WordPress >=5.3
* WooCommerce >=4.5
## Installation
## Development
1. Clone repository
2. `$ cd paypal-for-woocommerce`
3. `$ composer install`
4. `$ yarn run build`
4. `$ yarn run dev`
5. Change the `PAYPAL_INTEGRATION_DATE` constant to `gmdate( 'Y-m-d' )` to run the latest PayPal JavaScript SDK
## Usage
Note: PHPUnit needs at least PHP 7.3.
`// Todo`
### Unit tests and code style
## Crafted by Inpsyde
1. `$ composer install`
2. `$ ./vendor/bin/phpunit`
3. `$ ./vendor/bin/phpcs src modules woocommerce-paypal-commerce-gateway.php --extensions=php`
The team at [Inpsyde](https://inpsyde.com) is engineering the Web since 2006.
## Preparation for wordpress.org release
If you want to deploy a new version, you need to do some preparation:
### Clone
Clone the repository and `cd` into it
### Build
Build the plugin and remove unnecessary files:
```
composer install --no-dev
yarn run build
rm ./tests -rf
rm ./.git -rf
rm ./.github -rf
rm ./.gitignore
rm ./.phpunit.result.cache
rm ./.travis
rm ./composer.json
rm ./composer.lock
rm ./package.json
rm ./phpcs.xml.dist
rm ./phpunit.xml.dist
rm ./yarn.lock
rm ./modules/ppcp-button/node_modules/ -rf
rm ./modules/ppcp-button/.babelrc
rm ./modules/ppcp-button/package.json
rm ./modules/ppcp-button/webpack.config.js
rm ./modules/ppcp-button/yarn.lock
```
### Update version
Make sure you have the version in the plugin root file updated.
### Fixate integration date
Fix the PayPal JavaScript SDK integration date by using the current date for the `PAYPAL_INTEGRATION_DATE` constant.
## License
Copyright (c) 2020 Jane Doe, Inpsyde
Good news, this plugin is free for everyone! Since it's released under the [GPL-2.0 License](LICENSE) you can use it free of charge on your personal or commercial website.
[GPL-2.0 License](LICENSE)
## Contributing

View file

@ -1,3 +0,0 @@
#PPCP Admin Notices
Renders current notices in the admin.

View file

@ -1,3 +0,0 @@
vendor/
build/
composer.lock

View file

@ -1,3 +0,0 @@
# PPCP API Client
This module takes care of the api client for the woocommerce-paypal-commerce-gateway.

View file

@ -1,21 +0,0 @@
<?xml version="1.0"?>
<ruleset name="WooCommerce Coding Standards">
<description>My projects ruleset.</description>
<!-- Configs -->
<config name="minimum_supported_wp_version" value="4.7" />
<config name="testVersion" value="7.2-" />
<!-- Rules -->
<rule ref="WooCommerce-Core" />
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array" value="woocommerce-paypal-commerce-gateway" />
</properties>
</rule>
<rule ref="PHPCompatibility">
<exclude-pattern>tests/</exclude-pattern>
</rule>
</ruleset>

View file

@ -1 +0,0 @@
/node_modules/

View file

@ -1,8 +0,0 @@
{
"name": "inpsyde/ppcp-button",
"type": "inpsyde-module",
"require": {
"dhii/module-interface": "0.2.x-dev",
"inpsyde/ppcp-api-client": "dev-master"
}
}

View file

@ -693,8 +693,7 @@ class SmartButton implements SmartButtonInterface {
'client-id' => $this->client_id,
'currency' => get_woocommerce_currency(),
'locale' => get_user_locale(),
// ToDo: Update date on releases.
'integration-date' => gmdate( 'Y-m-d' ),
'integration-date' => PAYPAL_INTEGRATION_DATE,
'components' => implode( ',', $this->components() ),
'vault' => $this->can_save_vault_token() ?
'true' : 'false',

View file

@ -1,5 +0,0 @@
{
"plugins": [
"babel-plugin-transform-object-rest-spread"
]
}

View file

@ -1 +0,0 @@
/node_modules/

View file

@ -1,14 +0,0 @@
{
"name": "inpsyde/ppcp-onboarding",
"type": "inpsyde-module",
"require": {
"dhii/module-interface": "0.2.x-dev"
},
"require-dev": {
"phpunit/phpunit": "^9.1",
"brain/monkey": "^2.4",
"inpsyde/php-coding-standards": "^1"
},
"minimum-stability": "dev",
"prefer-stable": true
}

View file

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
bootstrap="vendor/autoload.php"
backupGlobals="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./src</directory>
</whitelist>
</filter>
<testsuites>
<testsuite name="unit">
<directory suffix="Test.php">./tests/PHPUnit</directory>
</testsuite>
</testsuites>
</phpunit>

View file

@ -1,8 +0,0 @@
{
"name": "inpsyde/ppcp-subscription",
"type": "inpsyde-module",
"require": {
"dhii/module-interface": "0.2.x-dev",
"inpsyde/ppcp-api-client": "dev-master"
}
}

View file

@ -1,2 +0,0 @@
vendor
build

View file

@ -1,20 +0,0 @@
{
"name": "inpsyde/ppcp-wc-gateway",
"type": "inpsyde-module",
"require": {
"dhii/module-interface": "0.2.x-dev",
"inpsyde/ppcp-session": "dev-master",
"inpsyde/ppcp-admin-notices": "dev-master",
"inpsyde/ppcp-api-client": "dev-master"
},
"scripts": {
"unit": "./vendor/bin/phpunit --coverage-html build/coverage-report"
},
"require-dev": {
"phpunit/phpunit": "^9.1",
"brain/monkey": "^2.4",
"inpsyde/php-coding-standards": "^1"
},
"minimum-stability": "dev",
"prefer-stable": true
}

View file

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
bootstrap="vendor/autoload.php"
backupGlobals="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./src</directory>
</whitelist>
</filter>
<testsuites>
<testsuite name="unit">
<directory suffix="Test.php">./tests/PHPUnit</directory>
</testsuite>
</testsuites>
</phpunit>

View file

@ -1,17 +0,0 @@
{
"name": "inpsyde/ppcp-webhooks",
"type": "inpsyde-module",
"require": {
"dhii/module-interface": "0.2.x-dev"
},
"scripts": {
"unit": "./vendor/bin/phpunit --coverage-html build/coverage-report"
},
"require-dev": {
"phpunit/phpunit": "^9.1",
"brain/monkey": "^2.4",
"inpsyde/php-coding-standards": "^1"
},
"minimum-stability": "dev",
"prefer-stable": true
}

View file

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
bootstrap="vendor/autoload.php"
backupGlobals="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./src</directory>
</whitelist>
</filter>
<testsuites>
<testsuite name="unit">
<directory suffix="Test.php">./tests/PHPUnit</directory>
</testsuite>
</testsuites>
</phpunit>

View file

@ -1,4 +0,0 @@
/vendor/
composer.lock
phpunit.xml
.phpunit.result.cache

View file

@ -1,8 +0,0 @@
{
"name": "inpsyde/woocommerce-logging",
"type": "inpsyde-module",
"require": {
"dhii/module-interface": "0.2.x-dev",
"psr/log": "^1.1"
}
}

View file

@ -24,6 +24,8 @@ use Dhii\Modular\Module\ModuleInterface;
define( 'PAYPAL_API_URL', 'https://api.paypal.com' );
define( 'PAYPAL_SANDBOX_API_URL', 'https://api.sandbox.paypal.com' );
// @ToDo: Update date on releases.
define( 'PAYPAL_INTEGRATION_DATE', gmdate( 'Y-m-d' ) );
// @ToDo: Real connect.woocommerce.com production link.
define( 'CONNECT_WOO_URL', 'http://connect-woo.wpcust.com/ppc' );