@openreceive/vue 0.4.11 → 0.4.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  # OpenReceive agent directions (WordPress + WooCommerce)
2
2
 
3
- These directions describe OpenReceive 0.4.11.
3
+ These directions describe OpenReceive 0.4.13.
4
4
 
5
5
  Install and configure the OpenReceive gateway in the existing WooCommerce
6
6
  store. Preserve its theme, checkout, customer accounts, order model and prices.
@@ -84,21 +84,22 @@ passes. The page it comes from is https://openreceive.org/guides/quickstart-wooc
84
84
 
85
85
  ## WordPress + WooCommerce quickstart
86
86
 
87
- Install the built OpenReceive plugin zip through **Plugins → Add New → Upload
88
- Plugin**, with WooCommerce already active. The source directory needs a build;
89
- it cannot be uploaded as-is. WordPress.org submission is still pending.
87
+ Activate WooCommerce first. Then install the built OpenReceive plugin zip
88
+ through **Plugins → Add New → Upload Plugin**. You cannot upload the source
89
+ directory as-is. It needs a build first. The plugin is not yet submitted to
90
+ WordPress.org.
90
91
 
91
92
  Requirements: WordPress 6.6+, WooCommerce 9+, 64-bit PHP 8.2+ with GMP and sodium,
92
- and MySQL 8 or MariaDB 10.5+. Activation creates payment-attempt tables in the
93
- existing WordPress database. No separate database or application is required.
93
+ and MySQL 8 or MariaDB 10.5+. When you activate the plugin, it creates tables for
94
+ payment attempts in your existing WordPress database. You do not need a separate
95
+ database or application.
94
96
 
95
97
  ### Get the installable archive
96
98
 
97
- Use `openreceive-wordpress-<version>.zip` from the selected
98
- [OpenReceive GitHub release](https://github.com/OpenReceive/openreceive/releases)
99
- when that asset is listed. A GitHub source-code zip is not the plugin archive.
100
- If the release does not yet provide a built zip, build it on a development
101
- machine with Node 22+, PHP 8.2+, Composer and WP-CLI:
99
+ If the [OpenReceive GitHub release](https://github.com/OpenReceive/openreceive/releases)
100
+ you picked lists `openreceive-wordpress-<version>.zip`, use that file. The GitHub
101
+ source-code zip is not the plugin archive. If the release has no built zip yet,
102
+ build one on a development machine with Node 22+, PHP 8.2+, Composer and WP-CLI:
102
103
 
103
104
  ```sh
104
105
  git clone https://github.com/OpenReceive/openreceive.git
@@ -110,44 +111,56 @@ composer install --working-dir=packages/php/wordpress
110
111
  npm run release:wordpress:build
111
112
  ```
112
113
 
113
- Upload the resulting `dist/openreceive-wordpress-<version>.zip`. WP-CLI must be
114
- on `PATH`, or set `OPENRECEIVE_WP_CLI` to the absolute path of its phar. The
115
- WordPress server needs neither Node nor Composer: dependencies and checkout
116
- assets are bundled inside the built plugin.
114
+ Upload the resulting `dist/openreceive-wordpress-<version>.zip`. The build
115
+ needs WP-CLI on `PATH`. Otherwise, set `OPENRECEIVE_WP_CLI` to the absolute path
116
+ of its phar. Your WordPress server needs neither Node nor Composer. The built
117
+ plugin already bundles its dependencies and checkout assets.
117
118
 
118
119
  ### Configure the wallet
119
120
 
120
- Open **WooCommerce → Settings → Payments → OpenReceive**. Enter a receive-only
121
- NWC code, save, then enable the gateway. Saving verifies receive permissions
122
- and fails closed on a spend-capable wallet unless the explicit override is set.
123
- The password fields never show saved credentials. Values are encrypted using
124
- keys derived from WordPress's authentication keys; re-enter them after rotating
125
- those keys.
121
+ 1. Open **WooCommerce → Settings → Payments → OpenReceive**.
122
+ 2. Enter a receive-only NWC code and save.
123
+ 3. Enable the gateway.
126
124
 
127
- For managed deployments, configure `OPENRECEIVE_NWC_URI` in `wp-config.php` from
128
- your server's secret environment. It takes precedence over the settings field.
129
- Optional `OPENRECEIVE_LSC_URI_PRIMARY` and `OPENRECEIVE_LSC_URI_BACKUP` constants
130
- configure swap providers. Never put these values in browser code or logs.
125
+ When you save, the plugin checks that the wallet can receive. It refuses to save
126
+ a wallet that can spend, unless you set the explicit override. The password
127
+ fields never show saved credentials. The plugin encrypts these values with keys
128
+ derived from WordPress's authentication keys. If you change those keys, enter
129
+ the values again.
130
+
131
+ For managed deployments, set `OPENRECEIVE_NWC_URI` in `wp-config.php` from your
132
+ server's secret environment. It overrides the settings field. To configure swap
133
+ providers, you can also set the `OPENRECEIVE_LSC_URI_PRIMARY` and
134
+ `OPENRECEIVE_LSC_URI_BACKUP` constants. Never put these values in browser code
135
+ or logs.
131
136
 
132
137
  ### Checkout and settlement
133
138
 
134
- Both WooCommerce checkout blocks and classic checkout redirect to the order-pay
135
- page. The plugin reads the amount from `WC_Order`, serves the bundled checkout,
136
- and authorizes the customer through their account, checkout session or an
137
- expiring signed cookie issued after verifying the order-pay key. Keep that
138
- order-pay URL available to customers returning to a pending payment or swap
139
- refund. The plugin verifies that each requested payment hash belongs to the order.
139
+ Both WooCommerce checkout blocks and classic checkout send the customer to the
140
+ order-pay page. There, the plugin reads the amount from `WC_Order` and serves
141
+ the bundled checkout. It lets the customer in through one of:
142
+
143
+ - their account
144
+ - their checkout session
145
+ - an expiring signed cookie, issued after it verifies the order-pay key
146
+
147
+ Keep that order-pay URL available. Customers use it to return to a pending
148
+ payment or a swap refund. The plugin checks that each requested payment hash
149
+ belongs to the order.
140
150
 
141
- Payment attempts persist before invoice instructions appear. Settlement commits
142
- once in the payment transaction. WooCommerce's `payment_complete` then handles
143
- status, stock and emails. A durable order marker lets subsequent requests and
144
- scheduled passes repair an interruption between settlement and order completion.
151
+ The plugin saves each payment attempt before it shows invoice instructions. It
152
+ records settlement exactly once, inside the payment's database transaction.
153
+ WooCommerce's `payment_complete` then handles order status, stock and emails.
154
+ The plugin also keeps a durable marker on the order. If something interrupts the
155
+ step between settlement and order completion, later requests and scheduled runs
156
+ use that marker to finish it.
145
157
 
146
- The checkout polling drives opportunistic reconciliation through the PHP
147
- engine's shared database gate. Action Scheduler adds a recurring one-minute
148
- safety net. Configure a system cron to run WordPress scheduled work on stores
149
- with little traffic; no page visits means WP-Cron alone cannot guarantee prompt
150
- settlement. Optional process-manager commands:
158
+ While the checkout polls for status, it also asks the PHP engine to check the
159
+ wallet for payments. The engine's shared database gate keeps these checks from
160
+ running too often. Action Scheduler adds a safety net that runs every minute.
161
+ On stores with little traffic, set up a system cron to run WordPress scheduled
162
+ work. WP-Cron only runs on page visits, so on its own it cannot guarantee
163
+ prompt settlement. You can also run these commands under a process manager:
151
164
 
152
165
  ```sh
153
166
  wp openreceive doctor
@@ -156,23 +169,25 @@ wp openreceive notifications
156
169
  ```
157
170
 
158
171
  The notifications command runs as a separate process. The Doctor panel in the
159
- gateway settings reports schema, credential presence, scheduling and attention
160
- orders. A currency without a usable price feed makes the gateway unavailable.
172
+ gateway settings reports on the schema, whether credentials are present,
173
+ scheduling, and orders that need attention. If the store currency has no usable
174
+ price feed, the gateway is unavailable.
161
175
 
162
176
  ### Refunds and removal
163
177
 
164
- The receive-only wallet cannot send merchant refunds. Make those manually from
165
- your wallet. Payer swap refunds use the configured provider through the same
166
- authorized order-pay page; enabling LSC payments commits the shop to keeping
178
+ The receive-only wallet cannot send merchant refunds. Send those yourself from
179
+ your wallet. Payer swap refunds go through the configured provider, on the same
180
+ authorized order-pay page. If you turn on LSC payments, you commit to keeping
167
181
  that recovery path available. See [swap refunds](https://openreceive.org/guides/swap-refunds.md).
168
182
 
169
- Deactivation preserves payment records. Deleting the plugin drops its two
183
+ Deactivating the plugin keeps payment records. Deleting the plugin drops its two
170
184
  tables only if **Remove data on uninstall** was enabled. WooCommerce orders are
171
- retained.
185
+ always kept.
172
186
 
173
187
  ### Local example
174
188
 
175
- The repository's `examples/wordpress` Docker stack builds the plugin and seeds
176
- WooCommerce from the shared button catalog. Run `npm run demo wordpress` for
177
- the real-wallet mode, or use its documented `compose.testkit.yml` override for
178
- a disposable fake-wallet shop. No testkit routes are registered by default.
189
+ The repository's `examples/wordpress` Docker stack builds the plugin. It fills
190
+ WooCommerce with products from the shared button catalog. Run
191
+ `npm run demo wordpress` to use a real wallet. For a throwaway shop with a fake
192
+ wallet, use the stack's documented `compose.testkit.yml` override. No testkit
193
+ routes are registered by default.