openreceive 0.4.31 → 0.4.33
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/openreceive/nwc_ruby.rb +27 -0
- data/lib/openreceive/version.rb +1 -1
- data/skills/debug-openreceive-payment/SKILL.md +1 -0
- data/skills/integrate-openreceive/references/astro.md +35 -12
- data/skills/integrate-openreceive/references/bolt.md +3 -3
- data/skills/integrate-openreceive/references/btcpay.md +2 -1
- data/skills/integrate-openreceive/references/django.md +28 -8
- data/skills/integrate-openreceive/references/edd.md +12 -10
- data/skills/integrate-openreceive/references/fastapi.md +54 -30
- data/skills/integrate-openreceive/references/fastify.md +39 -13
- data/skills/integrate-openreceive/references/flask.md +38 -12
- data/skills/integrate-openreceive/references/fossbilling.md +25 -15
- data/skills/integrate-openreceive/references/laravel.md +36 -7
- data/skills/integrate-openreceive/references/lovable.md +2 -2
- data/skills/integrate-openreceive/references/medusa.md +2 -1
- data/skills/integrate-openreceive/references/mobile.md +2 -1
- data/skills/integrate-openreceive/references/nestjs.md +36 -12
- data/skills/integrate-openreceive/references/next.md +55 -29
- data/skills/integrate-openreceive/references/node.md +46 -14
- data/skills/integrate-openreceive/references/nuxt.md +35 -12
- data/skills/integrate-openreceive/references/odoo.md +13 -12
- data/skills/integrate-openreceive/references/paymenter.md +11 -7
- data/skills/integrate-openreceive/references/php.md +35 -10
- data/skills/integrate-openreceive/references/prestashop.md +28 -18
- data/skills/integrate-openreceive/references/rails.md +44 -13
- data/skills/integrate-openreceive/references/react-router.md +35 -12
- data/skills/integrate-openreceive/references/sveltekit.md +43 -14
- data/skills/integrate-openreceive/references/tanstack-start.md +35 -12
- data/skills/integrate-openreceive/references/vendure.md +2 -1
- data/skills/integrate-openreceive/references/woocommerce.md +17 -11
- metadata +1 -1
|
@@ -3,8 +3,9 @@ This is the full file; follow it from Step 0.
|
|
|
3
3
|
# OpenReceive agent directions (SvelteKit)
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
|
-
# READ THIS FIRST: this file is
|
|
6
|
+
# READ THIS FIRST: this file is 38 KB and a summary drops required steps. Download it whole:
|
|
7
7
|
curl -fsSL https://openreceive.org/agent-directions/sveltekit/full.md
|
|
8
|
+
# If your tool cuts long output, save it and read it in parts: curl -fsSL -o /tmp/openreceive-directions.md https://openreceive.org/agent-directions/sveltekit/full.md
|
|
8
9
|
# Skip the download only if you already have all of it: pasted, read from disk or fetched raw.
|
|
9
10
|
```
|
|
10
11
|
|
|
@@ -17,7 +18,7 @@ curl -fsSL https://openreceive.org/agent-directions/sveltekit/full.md
|
|
|
17
18
|
- Do not suggest rotating or revoking a code because it was pasted here.
|
|
18
19
|
- Start the quickstart only once the NWC code is saved, and the LSC code is saved or the user said "Bitcoin only".
|
|
19
20
|
|
|
20
|
-
These directions describe OpenReceive 0.4.
|
|
21
|
+
These directions describe OpenReceive 0.4.33.
|
|
21
22
|
|
|
22
23
|
Add OpenReceive to a SvelteKit application — the app you are already working
|
|
23
24
|
in, on `@sveltejs/adapter-node`. OpenReceive ships no SvelteKit package: the
|
|
@@ -64,8 +65,9 @@ Before anything else, check one file: the project's `.env`, if it exists.
|
|
|
64
65
|
`grep -E '^(NWC_URI|LSC_URI_PRIMARY)=.' .env | cut -d= -f1` names the codes
|
|
65
66
|
it sets without printing them. Check with that, here and after each write,
|
|
66
67
|
not by reading the file, and never print the values. A code that is already
|
|
67
|
-
set is not asked for again; if both are set,
|
|
68
|
-
|
|
68
|
+
set is not asked for again; if both are set, make sure `.gitignore` covers
|
|
69
|
+
`.env` (and `.dockerignore`, if the app has one), then skip to step 5
|
|
70
|
+
(making the server load the file), then the quickstart.
|
|
69
71
|
|
|
70
72
|
On a hosted builder (v0, Vercel, Replit, Lovable), the user may say instead
|
|
71
73
|
that both codes are already set as the project's environment variables or
|
|
@@ -199,11 +201,16 @@ itself, and they hold for every integration.
|
|
|
199
201
|
and not a Prisma/Drizzle relation to `openreceive_payments`.
|
|
200
202
|
- Keep `NWC_URI` / `LSC_URI_*` server-only. Never put them in browser code,
|
|
201
203
|
logs, or assets.
|
|
204
|
+
- After a production build, run `npx openreceive doctor --scan-build build/client`. Never grep a build for a code.
|
|
202
205
|
- Do not suggest rotating, revoking or replacing a code because it was pasted
|
|
203
206
|
into this chat; that is the supported path.
|
|
204
207
|
- Work only in this application. Never read or run anything from another
|
|
205
208
|
project on this machine (its `node_modules`, tools or source), for any
|
|
206
209
|
reason. A browser and Playwright are not part of setup.
|
|
210
|
+
- The project's own rules (its `AGENTS.md`, contributing guide) win over these
|
|
211
|
+
directions. If one forbids a step here, such as running migrations, ask the
|
|
212
|
+
owner and wait for the answer, even if doctor cannot pass yet. Do not move
|
|
213
|
+
the step somewhere the rule does not name, such as app startup.
|
|
207
214
|
- Restart only this app's server, on the port it already uses: stop the
|
|
208
215
|
process you started, or the one listening on that port, by its pid (or
|
|
209
216
|
restart its Compose service). Never `pkill` or `killall` by name: that
|
|
@@ -220,7 +227,8 @@ itself, and they hold for every integration.
|
|
|
220
227
|
environment (`printenv`, `env`, `docker compose config`), even filtered to
|
|
221
228
|
names.
|
|
222
229
|
- The host owns the price. `amountFor` reads it from your own data; reject
|
|
223
|
-
payer-supplied amounts.
|
|
230
|
+
payer-supplied amounts. A donation is no exception: its amount is saved
|
|
231
|
+
by your own route first (Donations, below).
|
|
224
232
|
- `authorize` runs on every request, and the `resource` it receives is a CLAIM
|
|
225
233
|
the payer made, not proof. Read a framework session; never trust a body field.
|
|
226
234
|
- `onPaid` must be idempotent. Its database fulfillment commits once per `reference` — your order id, one
|
|
@@ -245,21 +253,25 @@ itself, and they hold for every integration.
|
|
|
245
253
|
(`POST /swaps`) re-serves the committed attempt — but only while it is live,
|
|
246
254
|
and the shadow invoice behind a swap lasts about half an hour, after which the
|
|
247
255
|
same click mints a NEW deposit address and the refund is off-screen. Keep the
|
|
248
|
-
`payment_hash`
|
|
249
|
-
|
|
250
|
-
|
|
256
|
+
`payment_hash` on your order row, not in browser storage, and reopen the
|
|
257
|
+
attempt with `POST /swaps/status`, which has no such window. On the
|
|
258
|
+
drop-ins: `resumePaymentHash`, fed from `onState`, on `<Checkout>`; the
|
|
259
|
+
`resume-payment-hash` attribute, fed from the
|
|
251
260
|
`openreceive-state` event (`event.detail.state.payment_hash`), on
|
|
252
261
|
`<openreceive-checkout>`.
|
|
253
262
|
That visit can come hours later, and `authorize` must still know the payer:
|
|
254
263
|
a session that expired in between answers 403 and strands the deposit. On a
|
|
255
|
-
guest shop, tie the order to a long-lived signed
|
|
256
|
-
|
|
264
|
+
guest shop, tie the order to a long-lived cookie signed with the app's own
|
|
265
|
+
secret (such as `SESSION_SECRET`, never a wallet or swap code), or put a
|
|
266
|
+
secret per-order token in its URL that your page trades for that cookie.
|
|
257
267
|
https://openreceive.org/guides/swap-refunds.md
|
|
258
268
|
- Show the payer WHAT THEY ARE BUYING. Return an optional `description` beside
|
|
259
269
|
the price from `amountFor` and both drop-ins render it above the amount.
|
|
260
270
|
Without it the checkout is a QR and "$1.00" with no sign of what the dollar
|
|
261
271
|
is for.
|
|
262
|
-
- Show the payer the transaction record: `createTransactionDetails(...)` rows
|
|
272
|
+
- Show the payer the transaction record: `createTransactionDetails(...)` rows
|
|
273
|
+
(with no bundler use `renderTransactionDetailsHtml`: the standalone file has
|
|
274
|
+
no `createTransactionDetails`, and one bad import stops the whole page),
|
|
263
275
|
collapsed behind a caret, on the live checkout AND on the receipt. A payment
|
|
264
276
|
hash and a deposit txid are the only evidence a payer has that they paid you.
|
|
265
277
|
`<Checkout>` / `<openreceive-checkout>` already render this panel and the
|
|
@@ -285,8 +297,14 @@ itself, and they hold for every integration.
|
|
|
285
297
|
`ADDRESS_HEADER` and `XFF_DEPTH`, or every payer shares the proxy's address.
|
|
286
298
|
- `<Checkout>` comes from `@openreceive/svelte/checkout.svelte`, with
|
|
287
299
|
`@openreceive/svelte/styles.css`, on the order's own page: its resumable
|
|
288
|
-
URL. SvelteKit's CSRF check
|
|
289
|
-
|
|
300
|
+
URL. The checkout posts JSON, which SvelteKit's CSRF check lets through.
|
|
301
|
+
SvelteKit 3 checks a form's Origin against `paths.origin`, else `https://`
|
|
302
|
+
plus the Host header (`ORIGIN` is SvelteKit 2's). If the shop's own forms
|
|
303
|
+
answer 403 (plain HTTP, no proxy), set
|
|
304
|
+
`paths: { origin: process.env.ORIGIN || undefined }` and pass the deploy's
|
|
305
|
+
public URL as `ORIGIN` at `vite build`, never a literal host:port. Never
|
|
306
|
+
widen the check (`trustedOrigins: ['*']`, `checkOrigin: false`); replace a
|
|
307
|
+
widening the app has with that origin.
|
|
290
308
|
- HTTP JSON is snake_case; TypeScript APIs are camelCase.
|
|
291
309
|
- Money is integers or decimal strings — never binary floats.
|
|
292
310
|
|
|
@@ -311,6 +329,15 @@ products, and you do not join them.
|
|
|
311
329
|
live catalog lookup that could re-price a cart already placed. Return
|
|
312
330
|
`{ currency, value }` as a decimal STRING, plus a `description` of what they
|
|
313
331
|
are buying.
|
|
332
|
+
- **Donations and pay-what-you-want are fine.** The amount is the payer's
|
|
333
|
+
choice, so it enters through YOUR route, never OpenReceive's: the donate form
|
|
334
|
+
posts it to your own handler, which checks it and saves it on a new donation
|
|
335
|
+
row, made like an order. That row's id is the `reference`, and `amountFor`
|
|
336
|
+
reads the amount from the row, as it does for an order. Check it in that
|
|
337
|
+
handler: a floor and a cap ($1 and $10,000 unless the owner gave others) and
|
|
338
|
+
at most two decimal places. Refuse an amount outside them with a message;
|
|
339
|
+
never round it. Small amounts may be Lightning-only for some coins: the
|
|
340
|
+
checkout says which coins an amount is too small for.
|
|
314
341
|
- **Users own the order; OpenReceive never sees them.** `authorize` uses the
|
|
315
342
|
same ownership check this app already uses on the order show / pay page —
|
|
316
343
|
`event.locals.user`, `event.cookies`, whatever it is. `native` is the request's
|
|
@@ -378,7 +405,9 @@ components.
|
|
|
378
405
|
are on `@openreceive/browser`, not `/headless`.
|
|
379
406
|
- A refund replaces the deposit panel. On `refund_required` also drop
|
|
380
407
|
"switch payment method".
|
|
381
|
-
- No "Open wallet" button
|
|
408
|
+
- No "Open wallet" or "Pay in wallet" button, and no `lightning:` link. Cash
|
|
409
|
+
App cancels an invoice opened from a link and pays the same invoice scanned
|
|
410
|
+
or pasted. Show the QR code and a Copy invoice button.
|
|
382
411
|
- Wallet suggestions: `getPaymentWizardRoutes()` +
|
|
383
412
|
`createWizardRouteDisplays`. Lightning only. Logos are data URIs; tutorial
|
|
384
413
|
images load from a JavaScript chunk. For a custom headless UI, load it when
|
|
@@ -3,8 +3,9 @@ This is the full file; follow it from Step 0.
|
|
|
3
3
|
# OpenReceive agent directions (TanStack Start)
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
|
-
# READ THIS FIRST: this file is
|
|
6
|
+
# READ THIS FIRST: this file is 41 KB and a summary drops required steps. Download it whole:
|
|
7
7
|
curl -fsSL https://openreceive.org/agent-directions/tanstack-start/full.md
|
|
8
|
+
# If your tool cuts long output, save it and read it in parts: curl -fsSL -o /tmp/openreceive-directions.md https://openreceive.org/agent-directions/tanstack-start/full.md
|
|
8
9
|
# Skip the download only if you already have all of it: pasted, read from disk or fetched raw.
|
|
9
10
|
```
|
|
10
11
|
|
|
@@ -17,7 +18,7 @@ curl -fsSL https://openreceive.org/agent-directions/tanstack-start/full.md
|
|
|
17
18
|
- Do not suggest rotating or revoking a code because it was pasted here.
|
|
18
19
|
- Start the quickstart only once the NWC code is saved, and the LSC code is saved or the user said "Bitcoin only".
|
|
19
20
|
|
|
20
|
-
These directions describe OpenReceive 0.4.
|
|
21
|
+
These directions describe OpenReceive 0.4.33.
|
|
21
22
|
|
|
22
23
|
Add OpenReceive to a TanStack Start application on Node — the app you are
|
|
23
24
|
already working in, with its own Postgres. OpenReceive ships no TanStack
|
|
@@ -68,8 +69,9 @@ Before anything else, check one file: the project's `.env`, if it exists.
|
|
|
68
69
|
`grep -E '^(NWC_URI|LSC_URI_PRIMARY)=.' .env | cut -d= -f1` names the codes
|
|
69
70
|
it sets without printing them. Check with that, here and after each write,
|
|
70
71
|
not by reading the file, and never print the values. A code that is already
|
|
71
|
-
set is not asked for again; if both are set,
|
|
72
|
-
|
|
72
|
+
set is not asked for again; if both are set, make sure `.gitignore` covers
|
|
73
|
+
`.env` (and `.dockerignore`, if the app has one), then skip to step 5
|
|
74
|
+
(making the server load the file), then the quickstart.
|
|
73
75
|
|
|
74
76
|
On a hosted builder (v0, Vercel, Replit, Lovable), the user may say instead
|
|
75
77
|
that both codes are already set as the project's environment variables or
|
|
@@ -201,11 +203,16 @@ itself, and they hold for every integration.
|
|
|
201
203
|
and not a Prisma/Drizzle relation to `openreceive_payments`.
|
|
202
204
|
- Keep `NWC_URI` / `LSC_URI_*` server-only. Never put them in browser code,
|
|
203
205
|
logs, or assets.
|
|
206
|
+
- After a production build, run `npx openreceive doctor --scan-build .output/public`. Never grep a build for a code.
|
|
204
207
|
- Do not suggest rotating, revoking or replacing a code because it was pasted
|
|
205
208
|
into this chat; that is the supported path.
|
|
206
209
|
- Work only in this application. Never read or run anything from another
|
|
207
210
|
project on this machine (its `node_modules`, tools or source), for any
|
|
208
211
|
reason. A browser and Playwright are not part of setup.
|
|
212
|
+
- The project's own rules (its `AGENTS.md`, contributing guide) win over these
|
|
213
|
+
directions. If one forbids a step here, such as running migrations, ask the
|
|
214
|
+
owner and wait for the answer, even if doctor cannot pass yet. Do not move
|
|
215
|
+
the step somewhere the rule does not name, such as app startup.
|
|
209
216
|
- Restart only this app's server, on the port it already uses: stop the
|
|
210
217
|
process you started, or the one listening on that port, by its pid (or
|
|
211
218
|
restart its Compose service). Never `pkill` or `killall` by name: that
|
|
@@ -222,7 +229,8 @@ itself, and they hold for every integration.
|
|
|
222
229
|
environment (`printenv`, `env`, `docker compose config`), even filtered to
|
|
223
230
|
names.
|
|
224
231
|
- The host owns the price. `amountFor` reads it from your own data; reject
|
|
225
|
-
payer-supplied amounts.
|
|
232
|
+
payer-supplied amounts. A donation is no exception: its amount is saved
|
|
233
|
+
by your own route first (Donations, below).
|
|
226
234
|
- `authorize` runs on every request, and the `resource` it receives is a CLAIM
|
|
227
235
|
the payer made, not proof. Read a framework session; never trust a body field.
|
|
228
236
|
- `onPaid` must be idempotent. Its database fulfillment commits once per `reference` — your order id, one
|
|
@@ -247,21 +255,25 @@ itself, and they hold for every integration.
|
|
|
247
255
|
(`POST /swaps`) re-serves the committed attempt — but only while it is live,
|
|
248
256
|
and the shadow invoice behind a swap lasts about half an hour, after which the
|
|
249
257
|
same click mints a NEW deposit address and the refund is off-screen. Keep the
|
|
250
|
-
`payment_hash`
|
|
251
|
-
|
|
252
|
-
|
|
258
|
+
`payment_hash` on your order row, not in browser storage, and reopen the
|
|
259
|
+
attempt with `POST /swaps/status`, which has no such window. On the
|
|
260
|
+
drop-ins: `resumePaymentHash`, fed from `onState`, on `<Checkout>`; the
|
|
261
|
+
`resume-payment-hash` attribute, fed from the
|
|
253
262
|
`openreceive-state` event (`event.detail.state.payment_hash`), on
|
|
254
263
|
`<openreceive-checkout>`.
|
|
255
264
|
That visit can come hours later, and `authorize` must still know the payer:
|
|
256
265
|
a session that expired in between answers 403 and strands the deposit. On a
|
|
257
|
-
guest shop, tie the order to a long-lived signed
|
|
258
|
-
|
|
266
|
+
guest shop, tie the order to a long-lived cookie signed with the app's own
|
|
267
|
+
secret (such as `SESSION_SECRET`, never a wallet or swap code), or put a
|
|
268
|
+
secret per-order token in its URL that your page trades for that cookie.
|
|
259
269
|
https://openreceive.org/guides/swap-refunds.md
|
|
260
270
|
- Show the payer WHAT THEY ARE BUYING. Return an optional `description` beside
|
|
261
271
|
the price from `amountFor` and both drop-ins render it above the amount.
|
|
262
272
|
Without it the checkout is a QR and "$1.00" with no sign of what the dollar
|
|
263
273
|
is for.
|
|
264
|
-
- Show the payer the transaction record: `createTransactionDetails(...)` rows
|
|
274
|
+
- Show the payer the transaction record: `createTransactionDetails(...)` rows
|
|
275
|
+
(with no bundler use `renderTransactionDetailsHtml`: the standalone file has
|
|
276
|
+
no `createTransactionDetails`, and one bad import stops the whole page),
|
|
265
277
|
collapsed behind a caret, on the live checkout AND on the receipt. A payment
|
|
266
278
|
hash and a deposit txid are the only evidence a payer has that they paid you.
|
|
267
279
|
`<Checkout>` / `<openreceive-checkout>` already render this panel and the
|
|
@@ -332,6 +344,15 @@ products, and you do not join them.
|
|
|
332
344
|
live catalog lookup that could re-price a cart already placed. Return
|
|
333
345
|
`{ currency, value }` as a decimal STRING, plus a `description` of what they
|
|
334
346
|
are buying.
|
|
347
|
+
- **Donations and pay-what-you-want are fine.** The amount is the payer's
|
|
348
|
+
choice, so it enters through YOUR route, never OpenReceive's: the donate form
|
|
349
|
+
posts it to your own handler, which checks it and saves it on a new donation
|
|
350
|
+
row, made like an order. That row's id is the `reference`, and `amountFor`
|
|
351
|
+
reads the amount from the row, as it does for an order. Check it in that
|
|
352
|
+
handler: a floor and a cap ($1 and $10,000 unless the owner gave others) and
|
|
353
|
+
at most two decimal places. Refuse an amount outside them with a message;
|
|
354
|
+
never round it. Small amounts may be Lightning-only for some coins: the
|
|
355
|
+
checkout says which coins an amount is too small for.
|
|
335
356
|
- **Users own the order; OpenReceive never sees them.** `authorize` uses the
|
|
336
357
|
same ownership check this app already uses on the order show / pay page —
|
|
337
358
|
the cookie or session helper its server functions use, given the incoming
|
|
@@ -423,7 +444,9 @@ components.
|
|
|
423
444
|
are on `@openreceive/browser`, not `/headless`.
|
|
424
445
|
- A refund replaces the deposit panel. On `refund_required` also drop
|
|
425
446
|
"switch payment method".
|
|
426
|
-
- No "Open wallet" button
|
|
447
|
+
- No "Open wallet" or "Pay in wallet" button, and no `lightning:` link. Cash
|
|
448
|
+
App cancels an invoice opened from a link and pays the same invoice scanned
|
|
449
|
+
or pasted. Show the QR code and a Copy invoice button.
|
|
427
450
|
- Wallet suggestions: `getPaymentWizardRoutes()` +
|
|
428
451
|
`createWizardRouteDisplays`. Lightning only. Logos are data URIs; tutorial
|
|
429
452
|
images load from a JavaScript chunk. For a custom headless UI, load it when
|
|
@@ -5,6 +5,7 @@ This is the full file; follow it from Step 0.
|
|
|
5
5
|
```sh
|
|
6
6
|
# READ THIS FIRST: this file is 25 KB and a summary drops required steps. Download it whole:
|
|
7
7
|
curl -fsSL https://openreceive.org/agent-directions/vendure/full.md
|
|
8
|
+
# If your tool cuts long output, save it and read it in parts: curl -fsSL -o /tmp/openreceive-directions.md https://openreceive.org/agent-directions/vendure/full.md
|
|
8
9
|
# Skip the download only if you already have all of it: pasted, read from disk or fetched raw.
|
|
9
10
|
```
|
|
10
11
|
|
|
@@ -17,7 +18,7 @@ curl -fsSL https://openreceive.org/agent-directions/vendure/full.md
|
|
|
17
18
|
- Do not suggest rotating or revoking a code because it was pasted here.
|
|
18
19
|
- Start the quickstart only once the NWC code is saved, and the LSC code is saved or the user said "Bitcoin only".
|
|
19
20
|
|
|
20
|
-
These directions describe OpenReceive 0.4.
|
|
21
|
+
These directions describe OpenReceive 0.4.33.
|
|
21
22
|
|
|
22
23
|
Add OpenReceive to the Vendure shop you are working in: a Vendure server with
|
|
23
24
|
its worker, and usually a storefront in its own project (Vendure's Next.js
|
|
@@ -3,8 +3,9 @@ This is the full file; follow it from Step 0.
|
|
|
3
3
|
# OpenReceive agent directions (WordPress + WooCommerce)
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
|
-
# READ THIS FIRST: this file is
|
|
6
|
+
# READ THIS FIRST: this file is 24 KB and a summary drops required steps. Download it whole:
|
|
7
7
|
curl -fsSL https://openreceive.org/agent-directions/woocommerce/full.md
|
|
8
|
+
# If your tool cuts long output, save it and read it in parts: curl -fsSL -o /tmp/openreceive-directions.md https://openreceive.org/agent-directions/woocommerce/full.md
|
|
8
9
|
# Skip the download only if you already have all of it: pasted, read from disk or fetched raw.
|
|
9
10
|
```
|
|
10
11
|
|
|
@@ -17,7 +18,7 @@ curl -fsSL https://openreceive.org/agent-directions/woocommerce/full.md
|
|
|
17
18
|
- Do not suggest rotating or revoking a code because it was pasted here.
|
|
18
19
|
- Setup is done only when the NWC code is saved, and the LSC code is saved or the user said "Bitcoin only".
|
|
19
20
|
|
|
20
|
-
These directions describe OpenReceive 0.4.
|
|
21
|
+
These directions describe OpenReceive 0.4.33.
|
|
21
22
|
|
|
22
23
|
Install and configure the OpenReceive payment gateway in the WooCommerce store
|
|
23
24
|
you are working in. Preserve its theme, checkout, customer accounts, order
|
|
@@ -42,7 +43,8 @@ the user through the quickstart's admin screens instead.
|
|
|
42
43
|
## Step 0 — ask for the two codes, one question at a time
|
|
43
44
|
|
|
44
45
|
Before anything else, check one thing: whether OpenReceive is already
|
|
45
|
-
installed (`wp plugin is-active openreceive
|
|
46
|
+
installed (`wp plugin is-active openreceive && echo active || echo "not active"`;
|
|
47
|
+
the bare command answers only with its exit code). If it is, run
|
|
46
48
|
`wp openreceive doctor`. It prints `NWC_URI: set` or `unset` (likewise
|
|
47
49
|
`LSC_URI_PRIMARY`), never the values. A code that is already set is not asked
|
|
48
50
|
for again; if both are set, skip to `wp openreceive configure --enable` at
|
|
@@ -95,7 +97,7 @@ is saved or the user said "Bitcoin only". Never invent a placeholder code.
|
|
|
95
97
|
Install this release from the WordPress.org plugin directory:
|
|
96
98
|
|
|
97
99
|
```sh
|
|
98
|
-
wp plugin install openreceive --version=0.4.
|
|
100
|
+
wp plugin install openreceive --version=0.4.33 --activate
|
|
99
101
|
```
|
|
100
102
|
|
|
101
103
|
If that fails because WordPress.org does not have this version yet, install
|
|
@@ -103,7 +105,7 @@ the ZIP attached to the same GitHub release. Never install the GitHub
|
|
|
103
105
|
source-code ZIP or a ZIP from an older release:
|
|
104
106
|
|
|
105
107
|
```sh
|
|
106
|
-
wp plugin install https://github.com/OpenReceive/openreceive/releases/download/v0.4.
|
|
108
|
+
wp plugin install https://github.com/OpenReceive/openreceive/releases/download/v0.4.33/openreceive-wordpress-0.4.33.zip --activate
|
|
107
109
|
```
|
|
108
110
|
|
|
109
111
|
It needs WooCommerce active, and PHP 8.2+ with GMP and sodium in BOTH the web
|
|
@@ -143,7 +145,10 @@ Doctor names any failed check and exits nonzero; fix it before going on.
|
|
|
143
145
|
## Step 3 — mint a test invoice, then stop
|
|
144
146
|
|
|
145
147
|
Create a pending test order that pays with OpenReceive, then mint its
|
|
146
|
-
Lightning invoice from the terminal
|
|
148
|
+
Lightning invoice from the terminal. Pick a quantity that brings the order to
|
|
149
|
+
at least $20 (or the same in the store's currency): smaller orders are often
|
|
150
|
+
under a swap minimum, and the user will want to try every method on the link
|
|
151
|
+
you give them.
|
|
147
152
|
|
|
148
153
|
```sh
|
|
149
154
|
wp wc shop_order create --user=<admin user id> --payment_method=openreceive \
|
|
@@ -154,7 +159,7 @@ wp openreceive test-invoice <order id>
|
|
|
154
159
|
`test-invoice` goes through the same checkout route as the order-pay page. It
|
|
155
160
|
prints the amount in sats, the BOLT11 invoice, the order-pay link and the
|
|
156
161
|
methods that page offers, each swap asset marked available or followed by the
|
|
157
|
-
reason it is not. That reason is the
|
|
162
|
+
reason it is not. That reason is for you, not the user: it says whether anything is wrong, and the last message names no minimum. "Below the provider
|
|
158
163
|
minimum" or "above the provider maximum" is about this order's amount, not a
|
|
159
164
|
fault: a small test order is often under a swap minimum. Only when the reason
|
|
160
165
|
says the provider is unreachable does doctor's "Swap provider" line have more
|
|
@@ -179,8 +184,9 @@ provider minimum depends on the order total, and the user's own orders will
|
|
|
179
184
|
differ. Do not list what you changed or what doctor checked. Send nothing
|
|
180
185
|
after it. Do not install mail software, add containers or services, or set up
|
|
181
186
|
cron. If doctor's "Reconcile scheduled" check fails, fix that. On a store with
|
|
182
|
-
little traffic, add one sentence to that message:
|
|
183
|
-
|
|
187
|
+
little traffic, add one sentence to that message: WordPress runs its every-minute payment check only when someone visits the
|
|
188
|
+
store, so on a quiet store the user's host should call wp-cron.php every
|
|
189
|
+
minute (a system cron); this setup did not add one. State
|
|
184
190
|
it as a recommendation. Do not offer to set it up or end the message on a
|
|
185
191
|
question.
|
|
186
192
|
|
|
@@ -253,7 +259,7 @@ database or application.
|
|
|
253
259
|
|
|
254
260
|
Each GitHub release also attaches the same plugin as a ZIP, for a site that
|
|
255
261
|
cannot reach WordPress.org or when WordPress.org does not list a release yet.
|
|
256
|
-
Download [openreceive-wordpress-0.4.
|
|
262
|
+
Download [openreceive-wordpress-0.4.33.zip](https://github.com/OpenReceive/openreceive/releases/download/v0.4.33/openreceive-wordpress-0.4.33.zip)
|
|
257
263
|
and install it through **Plugins → Add New → Upload Plugin**. Historical
|
|
258
264
|
releases may lack this asset. If that exact URL returns 404, build the same tag
|
|
259
265
|
below; never silently install an older ZIP. The GitHub source-code ZIP is not
|
|
@@ -263,7 +269,7 @@ GMP/sodium, Composer and WP-CLI:
|
|
|
263
269
|
```sh
|
|
264
270
|
git clone https://github.com/OpenReceive/openreceive.git
|
|
265
271
|
cd openreceive
|
|
266
|
-
git checkout v0.4.
|
|
272
|
+
git checkout v0.4.33
|
|
267
273
|
npm ci
|
|
268
274
|
npm run build:packages
|
|
269
275
|
composer install --working-dir=packages/php/wordpress
|