@openreceive/vue 0.4.11 → 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.
- package/package.json +3 -3
- package/skills/integrate-openreceive/SKILL.md +4 -3
- package/skills/integrate-openreceive/references/btcpay.md +65 -36
- package/skills/integrate-openreceive/references/django.md +288 -243
- package/skills/integrate-openreceive/references/fastapi.md +203 -154
- package/skills/integrate-openreceive/references/fastify.md +197 -146
- package/skills/integrate-openreceive/references/laravel.md +291 -233
- package/skills/integrate-openreceive/references/next.md +207 -161
- package/skills/integrate-openreceive/references/node.md +185 -137
- package/skills/integrate-openreceive/references/php.md +245 -192
- package/skills/integrate-openreceive/references/rails.md +259 -217
- package/skills/integrate-openreceive/references/woocommerce.md +66 -51
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenReceive agent directions (WordPress + WooCommerce)
|
|
2
2
|
|
|
3
|
-
These directions describe OpenReceive 0.4.
|
|
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.
|
|
@@ -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
|
-
|
|
88
|
-
|
|
89
|
-
|
|
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+.
|
|
93
|
-
existing WordPress database.
|
|
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
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
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`.
|
|
114
|
-
on `PATH
|
|
115
|
-
WordPress server needs neither Node nor Composer
|
|
116
|
-
|
|
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**.
|
|
121
|
-
|
|
122
|
-
|
|
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
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
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
|
|
135
|
-
page.
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
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
|
-
|
|
142
|
-
once
|
|
143
|
-
status, stock and emails.
|
|
144
|
-
|
|
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
|
-
|
|
147
|
-
engine's shared database gate
|
|
148
|
-
|
|
149
|
-
with little traffic
|
|
150
|
-
|
|
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,
|
|
160
|
-
orders
|
|
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.
|
|
165
|
-
your wallet. Payer swap refunds
|
|
166
|
-
authorized order-pay page
|
|
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
|
-
|
|
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
|
-
|
|
185
|
+
always kept.
|
|
172
186
|
|
|
173
187
|
### Local example
|
|
174
188
|
|
|
175
|
-
The repository's `examples/wordpress` Docker stack builds the plugin
|
|
176
|
-
WooCommerce from the shared button catalog. Run
|
|
177
|
-
|
|
178
|
-
|
|
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.
|