Changeset 3822775
- Timestamp:
- 11/25/2026 12:21:30 PM (less than one hour ago)
- Location:
- bb84-payments-for-woocommerce/trunk
- Files:
-
- 4 edited
-
bb84-payments.php (modified) (2 diffs)
-
includes/class-bb84-x402.php (modified) (3 diffs)
-
includes/class-wc-gateway-bb84.php (modified) (1 diff)
-
readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
bb84-payments-for-woocommerce/trunk/bb84-payments.php
r3820616 r3822775 4 4 * Plugin URI: https://bb84.com 5 5 * Description: Accept USDC and EURC payments with the bb84 app. Non-custodial: customers pay straight to your bb84 name, orders are marked paid automatically once the payment arrives on-chain. 6 * Version: 1.1. 06 * Version: 1.1.1 7 7 * Author: Hadamard Corporation 8 8 * Author URI: https://hadamard.com … … 19 19 defined( 'ABSPATH' ) || exit; 20 20 21 define( 'BB84_PAYMENTS_VERSION', '1.1. 0' );21 define( 'BB84_PAYMENTS_VERSION', '1.1.1' ); 22 22 define( 'BB84_PAYMENTS_FILE', __FILE__ ); 23 23 define( 'BB84_PAYMENTS_DIR', plugin_dir_path( __FILE__ ) ); -
bb84-payments-for-woocommerce/trunk/includes/class-bb84-x402.php
r3820616 r3822775 160 160 'documentation' => 'https://bb84.com/developers#x402', 161 161 ), 162 'walletConnector' => array( 163 'mcp' => 'https://bb84.com/api/connect/mcp', 164 'tool' => 'pay_and_call', 165 'note' => 'AI assistants connected to the bb84 wallet (remote MCP server, OAuth) pay this shop with pay_and_call({url: <payment_details.x402>, maxAmount: <order total>}); the user confirms the price in the bb84 app or an AI budget pays.', 166 ), 162 167 'orderResource' => array( 163 168 'url' => rest_url( self::NS . '/x402/orders/{order_id}?key={order_key}' ), … … 194 199 'step' => 6, 195 200 'request' => 'GET <payment_details.x402>', 196 'note' => 'Answers 402 with the offer: pay amount (base units, 6 decimals) of asset to payTo on the bb84 chain with extra.memo as the on-chain purpose, then repeat the request with the PAYMENT-SIGNATURE header. With the bb84 wallet connector : pay_and_call({url: <payment_details.x402>, maxAmount: <order total>}).',201 'note' => 'Answers 402 with the offer: pay amount (base units, 6 decimals) of asset to payTo on the bb84 chain with extra.memo as the on-chain purpose, then repeat the request with the PAYMENT-SIGNATURE header. With the bb84 wallet connector (MCP https://bb84.com/api/connect/mcp): pay_and_call({url: <payment_details.x402>, maxAmount: <order total>}).', 197 202 ), 198 203 ), … … 414 419 'order' => self::order_summary( $order ), 415 420 'instructions' => sprintf( 416 'Pay %1$s %2$s (amount %3$s in base units, 6 decimals) to %4$s on the bb84 chain with the purpose "%5$s", then repeat this request with the PAYMENT-SIGNATURE header. With the bb84 wallet connector : pay_and_call({url: <this URL>, maxAmount: "%1$s"}). Humans pay at %6$s.',421 'Pay %1$s %2$s (amount %3$s in base units, 6 decimals) to %4$s on the bb84 chain with the purpose "%5$s", then repeat this request with the PAYMENT-SIGNATURE header. With the bb84 wallet connector (MCP https://bb84.com/api/connect/mcp): pay_and_call({url: <this URL>, maxAmount: "%1$s"}). Humans pay at %6$s.', 417 422 $order->get_meta( '_bb84_amount' ), 418 423 strtoupper( $order->get_meta( '_bb84_asset' ) ), -
bb84-payments-for-woocommerce/trunk/includes/class-wc-gateway-bb84.php
r3820616 r3822775 94 94 'type' => 'checkbox', 95 95 'label' => __( 'Let AI agents and other software pay orders over HTTP 402 (x402)', 'bb84-payments-for-woocommerce' ), 96 'description' => __( 'Software creates the order through the WooCommerce Store API and pays it with the x402 protocol (scheme bb84-prepaid). The bb84 facilitator verifies the payment on-chain before the order is completed; the money goes to your bb84 name as always. Instructions for agents: /wp-json/bb84/v1/x402 ', 'bb84-payments-for-woocommerce' ),96 'description' => __( 'Software creates the order through the WooCommerce Store API and pays it with the x402 protocol (scheme bb84-prepaid). The bb84 facilitator verifies the payment on-chain before the order is completed; the money goes to your bb84 name as always. Instructions for agents: /wp-json/bb84/v1/x402 AI assistants with the bb84 wallet connector (MCP server https://bb84.com/api/connect/mcp) pay with the tool pay_and_call.', 'bb84-payments-for-woocommerce' ), 97 97 'default' => 'yes', 98 98 ), -
bb84-payments-for-woocommerce/trunk/readme.txt
r3820616 r3822775 7 7 WC requires at least: 8.0 8 8 WC tested up to: 11.2 9 Stable tag: 1.1. 09 Stable tag: 1.1.1 10 10 License: GPLv2 or later 11 11 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 30 30 over HTTP 402 with the x402 protocol (scheme `bb84-prepaid`). The bb84 facilitator verifies the payment on-chain before 31 31 the order is completed. Instructions for agents are served at `/wp-json/bb84/v1/x402`; a checkbox in the settings 32 switches it off. 32 switches it off. AI assistants pay through the bb84 wallet connector (MCP server `https://bb84.com/api/connect/mcp`, 33 tool `pay_and_call`). 33 34 34 35 == External services == … … 93 94 answer contains the order's payment resource under `payment_result.payment_details` (key `x402`). That resource answers 94 95 402 with the terms (amount, token, your bb84 address, the order's purpose). The agent pays on the bb84 chain, for example 95 through the bb84 wallet connector's `pay_and_call` tool, and repeats the request with the payment proof. The bb84 96 through the bb84 wallet connector's `pay_and_call` tool (remote MCP server `https://bb84.com/api/connect/mcp`, which 97 users add to Claude or another MCP client), and repeats the request with the payment proof. The bb84 96 98 facilitator checks the transaction on-chain and binds it to the order; only then is the order completed, exactly as for a 97 99 payment from the app. `/wp-json/bb84/v1/x402` describes the steps for agents. Untick "Agent payments (x402)" in the … … 105 107 106 108 == Changelog == 109 110 = 1.1.1 = 111 * The agent instructions (`/wp-json/bb84/v1/x402`), the 402 answers and the settings name the bb84 wallet connector's MCP server (`https://bb84.com/api/connect/mcp`), so AI assistants know where to connect to pay. 107 112 108 113 = 1.1.0 =
Note:
See TracChangeset
for help on using the changeset viewer.