@openreceive/angular 0.4.10 → 0.4.12

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.10.
3
+ These directions describe OpenReceive 0.4.12.
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.
@@ -73,6 +73,8 @@ flows; a receive-only NWC wallet cannot send payments.
73
73
  - [Agent Directions: BTCPay Server](https://openreceive.org/guides/agent-directions-btcpay.md)
74
74
  - [WordPress + WooCommerce Quickstart](https://openreceive.org/guides/quickstart-woocommerce.md)
75
75
 
76
+ - https://openreceive.org/guides/payment-safety-upgrade.md — coordinated upgrades and reviewed repair of existing attempts
77
+
76
78
  ---
77
79
 
78
80
  ## The quickstart, in full
@@ -82,21 +84,22 @@ passes. The page it comes from is https://openreceive.org/guides/quickstart-wooc
82
84
 
83
85
  ## WordPress + WooCommerce quickstart
84
86
 
85
- Install the built OpenReceive plugin zip through **Plugins → Add New → Upload
86
- Plugin**, with WooCommerce already active. The source directory needs a build;
87
- 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.
88
91
 
89
92
  Requirements: WordPress 6.6+, WooCommerce 9+, 64-bit PHP 8.2+ with GMP and sodium,
90
- and MySQL 8 or MariaDB 10.5+. Activation creates payment-attempt tables in the
91
- 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.
92
96
 
93
97
  ### Get the installable archive
94
98
 
95
- Use `openreceive-wordpress-<version>.zip` from the selected
96
- [OpenReceive GitHub release](https://github.com/OpenReceive/openreceive/releases)
97
- when that asset is listed. A GitHub source-code zip is not the plugin archive.
98
- If the release does not yet provide a built zip, build it on a development
99
- 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:
100
103
 
101
104
  ```sh
102
105
  git clone https://github.com/OpenReceive/openreceive.git
@@ -108,44 +111,56 @@ composer install --working-dir=packages/php/wordpress
108
111
  npm run release:wordpress:build
109
112
  ```
110
113
 
111
- Upload the resulting `dist/openreceive-wordpress-<version>.zip`. WP-CLI must be
112
- on `PATH`, or set `OPENRECEIVE_WP_CLI` to the absolute path of its phar. The
113
- WordPress server needs neither Node nor Composer: dependencies and checkout
114
- 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.
115
118
 
116
119
  ### Configure the wallet
117
120
 
118
- Open **WooCommerce → Settings → Payments → OpenReceive**. Enter a receive-only
119
- NWC code, save, then enable the gateway. Saving verifies receive permissions
120
- and fails closed on a spend-capable wallet unless the explicit override is set.
121
- The password fields never show saved credentials. Values are encrypted using
122
- keys derived from WordPress's authentication keys; re-enter them after rotating
123
- those keys.
121
+ 1. Open **WooCommerce → Settings → Payments → OpenReceive**.
122
+ 2. Enter a receive-only NWC code and save.
123
+ 3. Enable the gateway.
124
+
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.
124
130
 
125
- For managed deployments, configure `OPENRECEIVE_NWC_URI` in `wp-config.php` from
126
- your server's secret environment. It takes precedence over the settings field.
127
- Optional `OPENRECEIVE_LSC_URI_PRIMARY` and `OPENRECEIVE_LSC_URI_BACKUP` constants
128
- configure swap providers. Never put these values in browser code or logs.
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.
129
136
 
130
137
  ### Checkout and settlement
131
138
 
132
- Both WooCommerce checkout blocks and classic checkout redirect to the order-pay
133
- page. The plugin reads the amount from `WC_Order`, serves the bundled checkout,
134
- and authorizes the customer through their account, checkout session or an
135
- expiring signed cookie issued after verifying the order-pay key. Keep that
136
- order-pay URL available to customers returning to a pending payment or swap
137
- 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.
138
150
 
139
- Payment attempts persist before invoice instructions appear. Settlement commits
140
- once in the payment transaction. WooCommerce's `payment_complete` then handles
141
- status, stock and emails. A durable order marker lets subsequent requests and
142
- 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.
143
157
 
144
- The checkout polling drives opportunistic reconciliation through the PHP
145
- engine's shared database gate. Action Scheduler adds a recurring one-minute
146
- safety net. Configure a system cron to run WordPress scheduled work on stores
147
- with little traffic; no page visits means WP-Cron alone cannot guarantee prompt
148
- 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:
149
164
 
150
165
  ```sh
151
166
  wp openreceive doctor
@@ -154,23 +169,25 @@ wp openreceive notifications
154
169
  ```
155
170
 
156
171
  The notifications command runs as a separate process. The Doctor panel in the
157
- gateway settings reports schema, credential presence, scheduling and attention
158
- 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.
159
175
 
160
176
  ### Refunds and removal
161
177
 
162
- The receive-only wallet cannot send merchant refunds. Make those manually from
163
- your wallet. Payer swap refunds use the configured provider through the same
164
- 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
165
181
  that recovery path available. See [swap refunds](https://openreceive.org/guides/swap-refunds.md).
166
182
 
167
- Deactivation preserves payment records. Deleting the plugin drops its two
183
+ Deactivating the plugin keeps payment records. Deleting the plugin drops its two
168
184
  tables only if **Remove data on uninstall** was enabled. WooCommerce orders are
169
- retained.
185
+ always kept.
170
186
 
171
187
  ### Local example
172
188
 
173
- The repository's `examples/wordpress` Docker stack builds the plugin and seeds
174
- WooCommerce from the shared button catalog. Run `npm run demo wordpress` for
175
- the real-wallet mode, or use its documented `compose.testkit.yml` override for
176
- 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.