=== Bcon Global Crypto Payments ===
Contributors: bconglobal
Tags: woocommerce, cryptocurrency, crypto payments, payment gateway, non-custodial
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 8.2
Requires Plugins: woocommerce
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Accept cryptocurrency payments in WooCommerce using Bcon Global.

== Description ==

Bcon Global enables WooCommerce stores to accept cryptocurrency payments directly to their own wallets through a non-custodial payment gateway.

The plugin connects your WooCommerce store to the Bcon Global API to create payment addresses, monitor blockchain transactions, track confirmations, and automatically update WooCommerce order statuses.

Bcon Global supports payments across multiple blockchain networks, including Bitcoin, Ethereum, BNB Smart Chain, Solana, and TRON, with support for popular cryptocurrencies and stablecoins such as BTC, ETH, BNB, SOL, TRX, USDT, USDC, USDS, and TUSD.

The payment process is automated. When a customer places an order, the plugin creates a payment request and displays the required payment details and QR code at checkout. The Bcon Global API monitors the blockchain for the payment and sends status updates back to the store.

The plugin supports custom WooCommerce order statuses, allowing merchants to configure how orders are updated as payments are detected, confirmed, partially received, or completed.

Bcon Global does not require merchants to deposit customer funds into a third-party custodial account. Cryptocurrency payments are sent directly to the wallet address configured by the merchant.

== Important Notice ==

This plugin does not store or custody any funds.

Bcon Global does not hold merchant or customer cryptocurrency. Payments are processed on the blockchain and sent directly to the merchant's wallet.

== Features ==

* Non-custodial cryptocurrency payment gateway for WooCommerce
* Direct-to-wallet cryptocurrency payments
* Support for Bitcoin, Ethereum, BNB Smart Chain, Solana, and TRON
* Support for BTC, ETH, BNB, SOL, TRX, USDT, USDC, USDS, and TUSD
* Automatic payment address generation
* Automatic blockchain transaction monitoring
* Payment confirmation tracking
* Automatic WooCommerce order status updates
* Support for partially confirmed and confirmed payments
* QR code payment checkout
* Custom WooCommerce order status configuration
* Payment callback support
* Dedicated database table for payment and transaction tracking
* No cryptocurrency custody by the plugin

== Installation ==

1. Upload plugin to `/wp-content/plugins/`
2. Activate via WordPress admin
3. Ensure WooCommerce is active
4. Go to WooCommerce → Settings → Payments
5. Enable Bcon Global
6. Configure API keys

== Configuration ==

* Set API keys per blockchain
* Configure callback URL
* Adjust confirmation settings
* Customize order statuses

== Database ==

This plugin creates a custom table:

`wp_bcon_orders`

This table is used for storing transaction-related data.

The table is automatically removed when the plugin is uninstalled.

== Callback ==

Set your callback URL in Bcon dashboard:

`https://your-site.com/wc-api/WC_Gateway_Bcon?secret=YOUR_SECRET`

== External services ==

This plugin requires external services to create cryptocurrency payment addresses, retrieve supported currencies and exchange rates, register the store callback URL, and monitor payment status.

=== Bcon Global API ===

The plugin connects to the Bcon Global API at `https://external-api.bcon.global` when the administrator tests or saves the payment setup and when a customer creates or monitors a payment.

The plugin sends the configured API key in the authorization header. Depending on the operation, it also sends the payment currency, blockchain network, order amount and currency, an order reference, the store callback URL, and the wallet/xpub value associated with the merchant's Bcon store configuration. The API returns supported currencies, rates, payment addresses, memos, callback configuration, and payment-related responses required to complete the order.

Terms of use and privacy policy: https://bcon.global/privacy-policy-and-terms/

=== Pusher ===

When JavaScript checkout mode is enabled, the plugin loads Pusher from `https://js.pusher.com/7.2/pusher.min.js` and uses the Pusher service to receive real-time payment status events. The customer browser connects to Pusher during the payment checkout and subscribes to a channel containing the payment address and, where applicable, the payment memo. Pusher may process connection and traffic data such as the visitor IP address as described in its privacy statement.

Terms of use: https://bird.com/en-us/legal/terms

Privacy policy: https://bird.com/en-us/legal/privacy

== Third-party libraries ==

* QRious 4.0.2 — local QR code generation library, GPLv3. Source and license: https://github.com/neocotic/qrious

* PHP QR Code library — used for QR code generation. Portions include code from Kreative Software (https://github.com/kreativekorp/barcode) and Donald Becker (https://github.com/psyon/php-qrcode). Licensed under the MIT License.

== Frequently Asked Questions ==

= Does this plugin hold funds? =

No. Funds are never stored or controlled by this plugin.

= Is WooCommerce required? =

Yes.

= What data is stored? =

Payment-related metadata and transaction tracking data in a dedicated database table.

== Changelog ==

= 1.0.1 =

* Fix: enqueue JavaScript and CSS through WordPress APIs.
* Fix: require administrator capability when regenerating the callback secret.
* Fix: make public branding an explicit administrator opt-in.
* Fix: document Bcon Global and Pusher external services.
* Fix: remove checkout Pusher test code.

== Security ==

* Input sanitization
* Output escaping
* Nonce verification
* Secure API communication

== License ==

GPLv2 or later

== Support ==

https://bcon.global/
