Skip to content

Commit

Permalink
API & related refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHenryIE committed Aug 19, 2023
1 parent 5b02285 commit 7680c4b
Show file tree
Hide file tree
Showing 45 changed files with 4,088 additions and 3,176 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![WordPress tested 6.2](https://img.shields.io/badge/WordPress-v6.2%20tested-0073aa.svg)](https://wordpress.org/plugins/woocommerce-gateway-bitcoin) [![PHPCS WPCS](https://img.shields.io/badge/PHPCS-WordPress%20Coding%20Standards-8892BF.svg)](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards) [![PHPUnit ](.github/coverage.svg)](https://brianhenryie.github.io/bh-wp-bitcoin-gateway/) [![PHPStan ](https://img.shields.io/badge/PHPStan-Level%208-2a5ea7.svg)](https://github.com/szepeviktor/phpstan-wordpress)
[![WordPress tested 6.2](https://img.shields.io/badge/WordPress-v6.2%20tested-0073aa.svg)](https://wordpress.org/plugins/woocommerce-gateway-bitcoin) [![PHPCS WPCS](https://img.shields.io/badge/PHPCS-WordPress%20Coding%20Standards%20❌-8892BF.svg)](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards) [![PHPUnit ](.github/coverage.svg)](https://brianhenryie.github.io/bh-wp-bitcoin-gateway/) [![PHPStan ](https://img.shields.io/badge/PHPStan-Level%208%20❌-2a5ea7.svg)](https://github.com/szepeviktor/phpstan-wordpress)

# Bitcoin Gateway for WooCommerce

Expand Down Expand Up @@ -152,6 +152,7 @@ Pre-select Bitcoin at checkout when sending emails to customers.
* Read the issues and requests of other Bitcoin gateways
* Show current exchange rate on settings page
* Lightning network
* Remove GMP requirement

## How You Can Help

Expand Down Expand Up @@ -185,6 +186,7 @@ I would like to acknowledge plugins similar to this one, who do not have any of
* Crypto Payments Woo _by Idan Neeman_[WordPress.org](https://wordpress.org/plugins/crypto-payments-woo/) | [GitHub](https://github.com/Idan-Neeman/Crypto-Payments-Woo)
* Cryptocurrency Checkout _by Nimiq_[WordPress.org](https://wordpress.org/plugins/woo-nimiq-gateway/) | [GitHub](https://github.com/nimiq/woocommerce-gateway-nimiq)
* Decentralized Bitcoin CryptoDEC Payment Gateway for WooCommerce _by ITLS_[WordPress.org](https://wordpress.org/plugins/decentralized-bitcoin-cryptodec-payment-gateway-for-woocommerce/)
* https://github.com/gesman/bitcoin-payments-for-woocommerce

WooCommerce are themselves (officially) encouraging the use of crypto (see [It’s Time to Start Accepting Cryptocurrency](https://woocommerce.com/posts/start-accepting-cryptocurrency/), woocommerce.com, 2022-11-02) but the [plugins listed on their site](https://woocommerce.com/cryptocurrency/) are all by venture-capital backed companies.

Expand Down
10 changes: 3 additions & 7 deletions codeception.dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,7 @@ coverage:
- /scratch/*
- /wordpress/*
- /vendor-prefixed/*
- /*/interface-*.*
- /*/index.php
- /*/*.txt
- autoload.php
- autoload-classmap.php
- /*/*.css
- /*/*.js
- /autoload.php
# - /*/interface-*.*
# - /*/index.php
bootstrap: bootstrap.php
36 changes: 26 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
"process-timeout": 0,
"sort-packages": true,
"allow-plugins": {
"cweagans/composer-patches": true,
"composer/installers": true,
"cweagans/composer-patches": true,
"dealerdirect/phpcodesniffer-composer-installer": true,
"phpstan/extension-installer": true,
"johnpbloch/wordpress-core-installer": true
"johnpbloch/wordpress-core-installer": true,
"phpstan/extension-installer": true
}
},
"repositories": {
Expand All @@ -43,6 +43,10 @@
"url": "https://github.com/BrianHenryIE/bh-wp-private-uploads",
"type": "git"
},
"brianhenryie/bh-php-blockchain-info":{
"type": "path",
"url": "../bh-php-blockchain-info/"
},
"bitwasp/bitcoin-php":{
"url": "https://github.com/BrianHenryIE/bitcoin-php",
"type": "git"
Expand Down Expand Up @@ -111,7 +115,7 @@
"type": "package",
"package": {
"name": "woocommerce/woocommerce-gateway-dummy",
"version": "1.0.4",
"version": "1.0.5",
"dist": {
"url": "https://github.com/woocommerce/woocommerce-gateway-dummy/releases/latest/download/woocommerce-gateway-dummy.zip",
"type": "zip"
Expand All @@ -126,11 +130,16 @@
"ext-gmp": "*",
"ext-json": "*",
"alleyinteractive/wordpress-autoloader": "^1.1",
"art4/requests-psr18-adapter": "^1.0",
"bitwasp/bitcoin": "dev-Allow-updating-lastguest/murmurhash-php-package-version",
"brianhenryie/bh-php-blockchain-info": "dev-main",
"brianhenryie/bh-wp-logger": "dev-master",
"chillerlan/php-qrcode": "^4.3",
"json-mapper/json-mapper": "^2.18",
"phpseclib/bcmath_compat": "^2.0",
"phpseclib/mcrypt_compat": "^2.0"
"phpseclib/mcrypt_compat": "^2.0",
"psr/http-client": "^1.0.0",
"psr/http-factory": "^1.0.0"
},
"require-dev": {
"10up/wp_mock": "*",
Expand All @@ -147,7 +156,6 @@
"codeception/util-universalframework": "^1.0",
"cweagans/composer-patches": "*",
"dealerdirect/phpcodesniffer-composer-installer": "*",
"ext-xdebug": "*",
"impress-org/givewp-example-gateway": "dev-master",
"impress-org/give-next-gen": "0.2.0",
"jaschilz/php-coverage-badger": "^2.0",
Expand Down Expand Up @@ -198,13 +206,20 @@
"namespace_replacement_patterns": {
"~BrianHenryIE\\\\(.*)~" : "BrianHenryIE\\WP_Bitcoin_Gateway\\\\$1"
},
"exclude_from_copy": {
"packages": [
"rmccue/requests"
]
},
"exclude_from_prefix": {
"packages": [
"phpseclib/bcmath_compat",
"phpseclib/mcrypt_compat"
],
"file_patterns": [
"/^psr.*$/"
"/^psr.*$/",
"#symfony/polyfill-php80/Resources/stubs/Stringable.php#",
"#myclabs/php-enum/stubs/Stringable.php#"
]
}
},
Expand Down Expand Up @@ -265,9 +280,10 @@
"restore-acceptance-database": [
"export $(grep -v '^#' .env.testing | xargs); mysql $TEST_SITE_DB_NAME < tests/_data/dump.sql"
],
"coverage-tests": [
"codecept run unit --coverage unit.cov",
"codecept run wpunit --coverage wpunit.cov",
"test-coverage": [
"rm tests/_output/*.cov || true; rm tests/_output/clover.xml || true",
"vendor/bin/codecept run unit --coverage unit.cov",
"vendor/bin/codecept run wpunit --coverage wpunit.cov",
"phpcov merge --clover tests/_output/clover.xml --html tests/_output/html tests/_output;",
"open tests/_output/html/index.html"
],
Expand Down
Loading

0 comments on commit 7680c4b

Please sign in to comment.