openreceive 0.4.31 → 0.4.32

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.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/lib/openreceive/version.rb +1 -1
  4. data/skills/integrate-openreceive/references/astro.md +16 -5
  5. data/skills/integrate-openreceive/references/bolt.md +3 -3
  6. data/skills/integrate-openreceive/references/btcpay.md +1 -1
  7. data/skills/integrate-openreceive/references/django.md +16 -5
  8. data/skills/integrate-openreceive/references/edd.md +4 -4
  9. data/skills/integrate-openreceive/references/fastapi.md +15 -4
  10. data/skills/integrate-openreceive/references/fastify.md +18 -5
  11. data/skills/integrate-openreceive/references/flask.md +16 -5
  12. data/skills/integrate-openreceive/references/fossbilling.md +14 -11
  13. data/skills/integrate-openreceive/references/laravel.md +16 -5
  14. data/skills/integrate-openreceive/references/lovable.md +2 -2
  15. data/skills/integrate-openreceive/references/medusa.md +1 -1
  16. data/skills/integrate-openreceive/references/mobile.md +1 -1
  17. data/skills/integrate-openreceive/references/nestjs.md +18 -5
  18. data/skills/integrate-openreceive/references/next.md +18 -5
  19. data/skills/integrate-openreceive/references/node.md +23 -5
  20. data/skills/integrate-openreceive/references/nuxt.md +16 -5
  21. data/skills/integrate-openreceive/references/odoo.md +11 -11
  22. data/skills/integrate-openreceive/references/paymenter.md +5 -5
  23. data/skills/integrate-openreceive/references/php.md +15 -4
  24. data/skills/integrate-openreceive/references/prestashop.md +6 -6
  25. data/skills/integrate-openreceive/references/rails.md +16 -5
  26. data/skills/integrate-openreceive/references/react-router.md +16 -5
  27. data/skills/integrate-openreceive/references/sveltekit.md +15 -4
  28. data/skills/integrate-openreceive/references/tanstack-start.md +16 -5
  29. data/skills/integrate-openreceive/references/vendure.md +1 -1
  30. data/skills/integrate-openreceive/references/woocommerce.md +5 -5
  31. metadata +1 -1
@@ -3,7 +3,7 @@ This is the full file; follow it from Step 0.
3
3
  # OpenReceive agent directions (Next.js)
4
4
 
5
5
  ```sh
6
- # READ THIS FIRST: this file is 44 KB and a summary drops required steps. Download it whole:
6
+ # READ THIS FIRST: this file is 45 KB and a summary drops required steps. Download it whole:
7
7
  curl -fsSL https://openreceive.org/agent-directions/next/full.md
8
8
  # Skip the download only if you already have all of it: pasted, read from disk or fetched raw.
9
9
  ```
@@ -17,7 +17,7 @@ curl -fsSL https://openreceive.org/agent-directions/next/full.md
17
17
  - Do not suggest rotating or revoking a code because it was pasted here.
18
18
  - Start the quickstart only once the NWC code is saved, and the LSC code is saved or the user said "Bitcoin only".
19
19
 
20
- These directions describe OpenReceive 0.4.31.
20
+ These directions describe OpenReceive 0.4.32.
21
21
 
22
22
  Add OpenReceive to a Next.js App Router application — the app you are already
23
23
  working in. You do not need a copy of the OpenReceive source: the packages are
@@ -62,8 +62,9 @@ Before anything else, check one file: the project's `.env.local`, if it exists.
62
62
  `grep -E '^(NWC_URI|LSC_URI_PRIMARY)=.' .env.local | cut -d= -f1` names the codes
63
63
  it sets without printing them. Check with that, here and after each write,
64
64
  not by reading the file, and never print the values. A code that is already
65
- set is not asked for again; if both are set, skip to step 5 (making the
66
- server load the file), then the quickstart.
65
+ set is not asked for again; if both are set, make sure `.gitignore` covers
66
+ `.env` (and `.dockerignore`, if the app has one), then skip to step 5
67
+ (making the server load the file), then the quickstart.
67
68
 
68
69
  On a hosted builder (v0, Vercel, Replit, Lovable), the user may say instead
69
70
  that both codes are already set as the project's environment variables or
@@ -215,7 +216,8 @@ itself, and they hold for every integration.
215
216
  environment (`printenv`, `env`, `docker compose config`), even filtered to
216
217
  names.
217
218
  - The host owns the price. `amountFor` reads it from your own data; reject
218
- payer-supplied amounts.
219
+ payer-supplied amounts. A donation is no exception: its amount is saved
220
+ by your own route first (Donations, below).
219
221
  - `authorize` runs on every request, and the `resource` it receives is a CLAIM
220
222
  the payer made, not proof. Read a framework session; never trust a body field.
221
223
  - `onPaid` must be idempotent. Its database fulfillment commits once per `reference` — your order id, one
@@ -296,6 +298,15 @@ products, and you do not join them.
296
298
  live catalog lookup that could re-price a cart already placed. Return
297
299
  `{ currency, value }` as a decimal STRING, plus a `description` of what they
298
300
  are buying.
301
+ - **Donations and pay-what-you-want are fine.** The amount is the payer's
302
+ choice, so it enters through YOUR route, never OpenReceive's: the donate form
303
+ posts it to your own handler, which checks it and saves it on a new donation
304
+ row, made like an order. That row's id is the `reference`, and `amountFor`
305
+ reads the amount from the row, as it does for an order. Check it in that
306
+ handler: a floor and a cap ($1 and $10,000 unless the owner gave others) and
307
+ at most two decimal places. Refuse an amount outside them with a message;
308
+ never round it. Small amounts may be Lightning-only for some coins: the
309
+ checkout says which coins an amount is too small for.
299
310
  - **Users own the order; OpenReceive never sees them.** `authorize` uses the
300
311
  same ownership check this app already uses on the order show / pay page —
301
312
  `sessions.currentUser(request)`, a cookie, whatever it is.
@@ -506,6 +517,8 @@ there is nothing else to generate. Details:
506
517
 
507
518
  No ORM? You can pass a bare driver handle (`pg`, `node:sqlite`,
508
519
  `better-sqlite3`) as the `db` in step 4. The scaffold has no flavor for it.
520
+ `node:sqlite` needs Node 22.13 or newer: before that it sits behind
521
+ `--experimental-sqlite`.
509
522
  Instead of scaffolding, run the same DDL once yourself, using
510
523
  `paymentsSchemaSql(dialect)` from `@openreceive/http`. Your adapter already
511
524
  pulls that package in, but this import is yours, so install it too:
@@ -3,7 +3,7 @@ This is the full file; follow it from Step 0.
3
3
  # OpenReceive agent directions (Node.js)
4
4
 
5
5
  ```sh
6
- # READ THIS FIRST: this file is 40 KB and a summary drops required steps. Download it whole:
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/node/full.md
8
8
  # Skip the download only if you already have all of it: pasted, read from disk or fetched raw.
9
9
  ```
@@ -17,7 +17,7 @@ curl -fsSL https://openreceive.org/agent-directions/node/full.md
17
17
  - Do not suggest rotating or revoking a code because it was pasted here.
18
18
  - Start the quickstart only once the NWC code is saved, and the LSC code is saved or the user said "Bitcoin only".
19
19
 
20
- These directions describe OpenReceive 0.4.31.
20
+ These directions describe OpenReceive 0.4.32.
21
21
 
22
22
  Add OpenReceive to a Node application — the app you are already working in. You
23
23
  do not need a copy of the OpenReceive source: the packages are on npm, and the
@@ -59,8 +59,9 @@ Before anything else, check one file: the project's `.env`, if it exists.
59
59
  `grep -E '^(NWC_URI|LSC_URI_PRIMARY)=.' .env | cut -d= -f1` names the codes
60
60
  it sets without printing them. Check with that, here and after each write,
61
61
  not by reading the file, and never print the values. A code that is already
62
- set is not asked for again; if both are set, skip to step 5 (making the
63
- server load the file), then the quickstart.
62
+ set is not asked for again; if both are set, make sure `.gitignore` covers
63
+ `.env` (and `.dockerignore`, if the app has one), then skip to step 5
64
+ (making the server load the file), then the quickstart.
64
65
 
65
66
  On a hosted builder (v0, Vercel, Replit, Lovable), the user may say instead
66
67
  that both codes are already set as the project's environment variables or
@@ -211,7 +212,8 @@ itself, and they hold for every integration.
211
212
  environment (`printenv`, `env`, `docker compose config`), even filtered to
212
213
  names.
213
214
  - The host owns the price. `amountFor` reads it from your own data; reject
214
- payer-supplied amounts.
215
+ payer-supplied amounts. A donation is no exception: its amount is saved
216
+ by your own route first (Donations, below).
215
217
  - `authorize` runs on every request, and the `resource` it receives is a CLAIM
216
218
  the payer made, not proof. Read a framework session; never trust a body field.
217
219
  - `onPaid` must be idempotent. Its database fulfillment commits once per `reference` — your order id, one
@@ -283,6 +285,15 @@ products, and you do not join them.
283
285
  live catalog lookup that could re-price a cart already placed. Return
284
286
  `{ currency, value }` as a decimal STRING, plus a `description` of what they
285
287
  are buying.
288
+ - **Donations and pay-what-you-want are fine.** The amount is the payer's
289
+ choice, so it enters through YOUR route, never OpenReceive's: the donate form
290
+ posts it to your own handler, which checks it and saves it on a new donation
291
+ row, made like an order. That row's id is the `reference`, and `amountFor`
292
+ reads the amount from the row, as it does for an order. Check it in that
293
+ handler: a floor and a cap ($1 and $10,000 unless the owner gave others) and
294
+ at most two decimal places. Refuse an amount outside them with a message;
295
+ never round it. Small amounts may be Lightning-only for some coins: the
296
+ checkout says which coins an amount is too small for.
286
297
  - **Users own the order; OpenReceive never sees them.** `authorize` uses the
287
298
  same ownership check this app already uses on the order show / pay page —
288
299
  `sessions.currentUser(native)`, a cookie, whatever it is. Pass `native` (the
@@ -457,6 +468,11 @@ wallet client, HTTP handler, and contracts come along as dependencies. The
457
468
  install. On a different stack, swap the two packages; the rest of this guide
458
469
  stays the same.
459
470
 
471
+ Plain HTML pages with no React and no JS build step install
472
+ `@openreceive/elements` in place of `@openreceive/react`, and serve its
473
+ standalone build: two files and two tags, in
474
+ [Without a bundler](https://openreceive.org/guides/frontend-checkout.md#without-a-bundler).
475
+
460
476
  | | Packages |
461
477
  | -------- | ----------------------------------------------------------------------------------------------------------------------------- |
462
478
  | Server | `@openreceive/express`, `@openreceive/fastify`, `@openreceive/next` |
@@ -493,6 +509,8 @@ there is nothing else to generate. Details:
493
509
 
494
510
  No ORM? You can pass a bare driver handle (`pg`, `node:sqlite`,
495
511
  `better-sqlite3`) as the `db` in step 4. The scaffold has no flavor for it.
512
+ `node:sqlite` needs Node 22.13 or newer: before that it sits behind
513
+ `--experimental-sqlite`.
496
514
  Instead of scaffolding, run the same DDL once yourself, using
497
515
  `paymentsSchemaSql(dialect)` from `@openreceive/http`. Your adapter already
498
516
  pulls that package in, but this import is yours, so install it too:
@@ -3,7 +3,7 @@ This is the full file; follow it from Step 0.
3
3
  # OpenReceive agent directions (Nuxt)
4
4
 
5
5
  ```sh
6
- # READ THIS FIRST: this file is 34 KB and a summary drops required steps. Download it whole:
6
+ # READ THIS FIRST: this file is 35 KB and a summary drops required steps. Download it whole:
7
7
  curl -fsSL https://openreceive.org/agent-directions/nuxt/full.md
8
8
  # Skip the download only if you already have all of it: pasted, read from disk or fetched raw.
9
9
  ```
@@ -17,7 +17,7 @@ curl -fsSL https://openreceive.org/agent-directions/nuxt/full.md
17
17
  - Do not suggest rotating or revoking a code because it was pasted here.
18
18
  - Start the quickstart only once the NWC code is saved, and the LSC code is saved or the user said "Bitcoin only".
19
19
 
20
- These directions describe OpenReceive 0.4.31.
20
+ These directions describe OpenReceive 0.4.32.
21
21
 
22
22
  Add OpenReceive to a Nuxt application — the app you are already working in,
23
23
  on Nitro's `node-server` preset. OpenReceive ships no Nuxt package: the
@@ -64,8 +64,9 @@ Before anything else, check one file: the project's `.env`, if it exists.
64
64
  `grep -E '^(NWC_URI|LSC_URI_PRIMARY)=.' .env | cut -d= -f1` names the codes
65
65
  it sets without printing them. Check with that, here and after each write,
66
66
  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, skip to step 5 (making the
68
- server load the file), then the quickstart.
67
+ set is not asked for again; if both are set, make sure `.gitignore` covers
68
+ `.env` (and `.dockerignore`, if the app has one), then skip to step 5
69
+ (making the server load the file), then the quickstart.
69
70
 
70
71
  On a hosted builder (v0, Vercel, Replit, Lovable), the user may say instead
71
72
  that both codes are already set as the project's environment variables or
@@ -218,7 +219,8 @@ itself, and they hold for every integration.
218
219
  environment (`printenv`, `env`, `docker compose config`), even filtered to
219
220
  names.
220
221
  - The host owns the price. `amountFor` reads it from your own data; reject
221
- payer-supplied amounts.
222
+ payer-supplied amounts. A donation is no exception: its amount is saved
223
+ by your own route first (Donations, below).
222
224
  - `authorize` runs on every request, and the `resource` it receives is a CLAIM
223
225
  the payer made, not proof. Read a framework session; never trust a body field.
224
226
  - `onPaid` must be idempotent. Its database fulfillment commits once per `reference` — your order id, one
@@ -301,6 +303,15 @@ products, and you do not join them.
301
303
  live catalog lookup that could re-price a cart already placed. Return
302
304
  `{ currency, value }` as a decimal STRING, plus a `description` of what they
303
305
  are buying.
306
+ - **Donations and pay-what-you-want are fine.** The amount is the payer's
307
+ choice, so it enters through YOUR route, never OpenReceive's: the donate form
308
+ posts it to your own handler, which checks it and saves it on a new donation
309
+ row, made like an order. That row's id is the `reference`, and `amountFor`
310
+ reads the amount from the row, as it does for an order. Check it in that
311
+ handler: a floor and a cap ($1 and $10,000 unless the owner gave others) and
312
+ at most two decimal places. Refuse an amount outside them with a message;
313
+ never round it. Small amounts may be Lightning-only for some coins: the
314
+ checkout says which coins an amount is too small for.
304
315
  - **Users own the order; OpenReceive never sees them.** `authorize` uses the
305
316
  same ownership check this app already uses on the order show / pay page —
306
317
  `getCookie(event, …)`, the user its session module reads from the event,
@@ -17,7 +17,7 @@ curl -fsSL https://openreceive.org/agent-directions/odoo/full.md
17
17
  - Do not suggest rotating or revoking a code because it was pasted here.
18
18
  - Setup is done only when the NWC code is saved, and the LSC code is saved or the user said "Bitcoin only".
19
19
 
20
- These directions describe OpenReceive 0.4.31.
20
+ These directions describe OpenReceive 0.4.32.
21
21
 
22
22
  Install and configure the OpenReceive payment provider in the Odoo you are
23
23
  working in. Preserve its website, customers, products, orders, invoices and
@@ -102,7 +102,7 @@ manager, so build an image that adds it:
102
102
  FROM odoo:<tag>
103
103
  USER root
104
104
  RUN pip3 install --no-cache-dir --break-system-packages --ignore-installed typing_extensions h11 \
105
- && pip3 install --no-cache-dir --break-system-packages openreceive==0.4.31
105
+ && pip3 install --no-cache-dir --break-system-packages openreceive==0.4.32
106
106
  USER odoo
107
107
  ```
108
108
 
@@ -113,9 +113,9 @@ manager, so build an image that adds it:
113
113
  (the folder that holds the Dockerfile). Change nothing else in the file.
114
114
  3. Run `docker compose up -d --build`.
115
115
 
116
- On a server, install `openreceive==0.4.31` with the pip of the Python
116
+ On a server, install `openreceive==0.4.32` with the pip of the Python
117
117
  that runs Odoo (its virtualenv when it has one). On Odoo.sh, add
118
- `openreceive==0.4.31` to the repository's `requirements.txt`. If you
118
+ `openreceive==0.4.32` to the repository's `requirements.txt`. If you
119
119
  cannot tell which Python runs Odoo, say so and stop.
120
120
 
121
121
  The module is the ZIP attached to this GitHub release, with its folder,
@@ -126,8 +126,8 @@ folder on the config file's `addons_path`. Never install the GitHub
126
126
  source-code ZIP or a ZIP from an older release.
127
127
 
128
128
  ```sh
129
- curl -fsSLO https://github.com/OpenReceive/openreceive/releases/download/v0.4.31/openreceive-odoo-0.4.31.zip
130
- unzip -oq openreceive-odoo-0.4.31.zip -d <that folder> && rm openreceive-odoo-0.4.31.zip
129
+ curl -fsSLO https://github.com/OpenReceive/openreceive/releases/download/v0.4.32/openreceive-odoo-0.4.32.zip
130
+ unzip -oq openreceive-odoo-0.4.32.zip -d <that folder> && rm openreceive-odoo-0.4.32.zip
131
131
  ```
132
132
 
133
133
  Then install it into the database and restart Odoo:
@@ -281,16 +281,16 @@ from a terminal:
281
281
 
282
282
  ```sh
283
283
  cd /path/to/your/addons
284
- curl -fsSLO https://github.com/OpenReceive/openreceive/releases/download/v0.4.31/openreceive-odoo-0.4.31.zip
285
- unzip -oq openreceive-odoo-0.4.31.zip && rm openreceive-odoo-0.4.31.zip
284
+ curl -fsSLO https://github.com/OpenReceive/openreceive/releases/download/v0.4.32/openreceive-odoo-0.4.32.zip
285
+ unzip -oq openreceive-odoo-0.4.32.zip && rm openreceive-odoo-0.4.32.zip
286
286
  odoo -d <database> -i payment_openreceive --stop-after-init
287
287
  ```
288
288
 
289
289
  How the Python package gets in depends on how Odoo runs:
290
290
 
291
291
  - **Odoo.sh**: commit the `payment_openreceive` folder to your repository and
292
- add `openreceive==0.4.31` to the repository's `requirements.txt`.
293
- - **A source install with a virtualenv**: `pip install openreceive==0.4.31`
292
+ add `openreceive==0.4.32` to the repository's `requirements.txt`.
293
+ - **A source install with a virtualenv**: `pip install openreceive==0.4.32`
294
294
  in Odoo's virtualenv.
295
295
  - **Odoo's Docker image** or **its Debian package**: see below.
296
296
 
@@ -310,7 +310,7 @@ manager. Build your own image on top of it: put this `Dockerfile` next to your
310
310
  FROM odoo:19.0
311
311
  USER root
312
312
  RUN pip3 install --no-cache-dir --break-system-packages --ignore-installed typing_extensions h11 \
313
- && pip3 install --no-cache-dir --break-system-packages openreceive==0.4.31
313
+ && pip3 install --no-cache-dir --break-system-packages openreceive==0.4.32
314
314
  USER odoo
315
315
  ```
316
316
 
@@ -17,7 +17,7 @@ curl -fsSL https://openreceive.org/agent-directions/paymenter/full.md
17
17
  - Do not suggest rotating or revoking a code because it was pasted here.
18
18
  - Setup is done only when the NWC code is saved, and the LSC code is saved or the user said "Bitcoin only".
19
19
 
20
- These directions describe OpenReceive 0.4.31.
20
+ These directions describe OpenReceive 0.4.32.
21
21
 
22
22
  Install and configure the OpenReceive payment gateway in the Paymenter billing
23
23
  panel you are working in. Preserve its theme, clients, products, invoices and
@@ -97,7 +97,7 @@ release. With Paymenter's official Docker image, download and unpack it inside
97
97
  the container, as the web user:
98
98
 
99
99
  ```sh
100
- docker compose exec -T -u nginx paymenter sh -c 'cd /app/extensions/Gateways && curl -fsSLO https://github.com/OpenReceive/openreceive/releases/download/v0.4.31/openreceive-paymenter-0.4.31.zip && unzip -q openreceive-paymenter-0.4.31.zip && rm openreceive-paymenter-0.4.31.zip'
100
+ docker compose exec -T -u nginx paymenter sh -c 'cd /app/extensions/Gateways && curl -fsSLO https://github.com/OpenReceive/openreceive/releases/download/v0.4.32/openreceive-paymenter-0.4.32.zip && unzip -q openreceive-paymenter-0.4.32.zip && rm openreceive-paymenter-0.4.32.zip'
101
101
  docker compose exec -T -u nginx paymenter php artisan app:extension:install gateway OpenReceive
102
102
  ```
103
103
 
@@ -242,9 +242,9 @@ directory, next to Stripe and PayPal:
242
242
 
243
243
  ```sh
244
244
  cd /var/www/paymenter
245
- curl -fsSLO https://github.com/OpenReceive/openreceive/releases/download/v0.4.31/openreceive-paymenter-0.4.31.zip
246
- unzip -q openreceive-paymenter-0.4.31.zip -d extensions/Gateways
247
- rm openreceive-paymenter-0.4.31.zip
245
+ curl -fsSLO https://github.com/OpenReceive/openreceive/releases/download/v0.4.32/openreceive-paymenter-0.4.32.zip
246
+ unzip -q openreceive-paymenter-0.4.32.zip -d extensions/Gateways
247
+ rm openreceive-paymenter-0.4.32.zip
248
248
  chown -R www-data:www-data extensions/Gateways/OpenReceive
249
249
  sudo -u www-data php artisan app:extension:install gateway OpenReceive
250
250
  ```
@@ -17,7 +17,7 @@ curl -fsSL https://openreceive.org/agent-directions/php/full.md
17
17
  - Do not suggest rotating or revoking a code because it was pasted here.
18
18
  - Start the quickstart only once the NWC code is saved, and the LSC code is saved or the user said "Bitcoin only".
19
19
 
20
- These directions describe OpenReceive 0.4.31.
20
+ These directions describe OpenReceive 0.4.32.
21
21
 
22
22
  Add OpenReceive to a PHP application — the app you are already working in. You
23
23
  do not need a copy of the OpenReceive source: the engine is on Packagist
@@ -63,8 +63,9 @@ Before anything else, check one file: the project's `.env`, if it exists.
63
63
  `grep -E '^(NWC_URI|LSC_URI_PRIMARY)=.' .env | cut -d= -f1` names the codes
64
64
  it sets without printing them. Check with that, here and after each write,
65
65
  not by reading the file, and never print the values. A code that is already
66
- set is not asked for again; if both are set, skip to step 5 (making the
67
- server load the file), then the quickstart.
66
+ set is not asked for again; if both are set, make sure `.gitignore` covers
67
+ `.env` (and `.dockerignore`, if the app has one), then skip to step 5
68
+ (making the server load the file), then the quickstart.
68
69
 
69
70
  Otherwise your next action is a question to the user. Do not run `composer require`,
70
71
  edit the app, write `.env.example`, or search anywhere else before asking
@@ -217,7 +218,8 @@ itself, and they hold for every integration.
217
218
  environment (`printenv`, `env`, `docker compose config`), even filtered to
218
219
  names.
219
220
  - The host owns the price. `amountFor` reads it from your own data; reject
220
- payer-supplied amounts.
221
+ payer-supplied amounts. A donation is no exception: its amount is saved
222
+ by your own route first (Donations, below).
221
223
  - `authorize` runs on every request, and the `resource` it receives is a CLAIM
222
224
  the payer made, not proof. Read this app's session or signed cookie from the
223
225
  PSR-7 request; never trust a body field. The `Hosts\AllowAllAuthorize` trait
@@ -295,6 +297,15 @@ not replace your orders, users, or products, and you do not join them.
295
297
  live catalog lookup that could re-price a cart already placed. Return
296
298
  `['currency' => …, 'value' => …]` as a decimal STRING, plus a `description`
297
299
  of what they are buying.
300
+ - **Donations and pay-what-you-want are fine.** The amount is the payer's
301
+ choice, so it enters through YOUR route, never OpenReceive's: the donate form
302
+ posts it to your own handler, which checks it and saves it on a new donation
303
+ row, made like an order. That row's id is the `reference`, and `amountFor`
304
+ reads the amount from the row, as it does for an order. Check it in that
305
+ handler: a floor and a cap ($1 and $10,000 unless the owner gave others) and
306
+ at most two decimal places. Refuse an amount outside them with a message;
307
+ never round it. Small amounts may be Lightning-only for some coins: the
308
+ checkout says which coins an amount is too small for.
298
309
  - **Users own the order; OpenReceive never sees them.** `authorize` uses the
299
310
  same ownership check this app already uses on the order show / pay page —
300
311
  `$_SESSION['user_id']`, a signed cookie, a session library, whatever it is —
@@ -17,7 +17,7 @@ curl -fsSL https://openreceive.org/agent-directions/prestashop/full.md
17
17
  - Do not suggest rotating or revoking a code because it was pasted here.
18
18
  - Setup is done only when the NWC code is saved, and the LSC code is saved or the user said "Bitcoin only".
19
19
 
20
- These directions describe OpenReceive 0.4.31.
20
+ These directions describe OpenReceive 0.4.32.
21
21
 
22
22
  Install and configure the OpenReceive payment module in the PrestaShop store
23
23
  you are working in. Preserve its theme, customers, products, orders and
@@ -123,7 +123,7 @@ With the Docker image, download and unpack it inside the container, as the
123
123
  web user, then install the module with PrestaShop's own console:
124
124
 
125
125
  ```sh
126
- docker compose exec -T -u www-data prestashop sh -c 'curl -fsSLO https://github.com/OpenReceive/openreceive/releases/download/v0.4.31/openreceive-prestashop-0.4.31.zip && unzip -oq openreceive-prestashop-0.4.31.zip -d modules && rm openreceive-prestashop-0.4.31.zip'
126
+ docker compose exec -T -u www-data prestashop sh -c 'curl -fsSLO https://github.com/OpenReceive/openreceive/releases/download/v0.4.32/openreceive-prestashop-0.4.32.zip && unzip -oq openreceive-prestashop-0.4.32.zip -d modules && rm openreceive-prestashop-0.4.32.zip'
127
127
  docker compose exec -T -u www-data prestashop php bin/console prestashop:module install openreceive
128
128
  ```
129
129
 
@@ -285,9 +285,9 @@ install it with PrestaShop's own console, in the folder that holds `bin/console`
285
285
 
286
286
  ```sh
287
287
  cd /var/www/html
288
- curl -fsSLO https://github.com/OpenReceive/openreceive/releases/download/v0.4.31/openreceive-prestashop-0.4.31.zip
289
- unzip -oq openreceive-prestashop-0.4.31.zip -d modules
290
- rm openreceive-prestashop-0.4.31.zip
288
+ curl -fsSLO https://github.com/OpenReceive/openreceive/releases/download/v0.4.32/openreceive-prestashop-0.4.32.zip
289
+ unzip -oq openreceive-prestashop-0.4.32.zip -d modules
290
+ rm openreceive-prestashop-0.4.32.zip
291
291
  chown -R www-data:www-data modules/openreceive
292
292
  sudo -u www-data php bin/console prestashop:module install openreceive
293
293
  ```
@@ -323,7 +323,7 @@ Run every command inside the container, in `/var/www/html`, as its web user
323
323
  `www-data`. Unpack the release there too:
324
324
 
325
325
  ```sh
326
- docker compose exec -T -u www-data prestashop sh -c 'curl -fsSLO https://github.com/OpenReceive/openreceive/releases/download/v0.4.31/openreceive-prestashop-0.4.31.zip && unzip -oq openreceive-prestashop-0.4.31.zip -d modules && rm openreceive-prestashop-0.4.31.zip'
326
+ docker compose exec -T -u www-data prestashop sh -c 'curl -fsSLO https://github.com/OpenReceive/openreceive/releases/download/v0.4.32/openreceive-prestashop-0.4.32.zip && unzip -oq openreceive-prestashop-0.4.32.zip -d modules && rm openreceive-prestashop-0.4.32.zip'
327
327
  docker compose exec -T -u www-data prestashop php bin/console prestashop:module install openreceive
328
328
  ```
329
329
 
@@ -3,7 +3,7 @@ This is the full file; follow it from Step 0.
3
3
  # OpenReceive agent directions (Rails)
4
4
 
5
5
  ```sh
6
- # READ THIS FIRST: this file is 43 KB and a summary drops required steps. Download it whole:
6
+ # READ THIS FIRST: this file is 44 KB and a summary drops required steps. Download it whole:
7
7
  curl -fsSL https://openreceive.org/agent-directions/rails/full.md
8
8
  # Skip the download only if you already have all of it: pasted, read from disk or fetched raw.
9
9
  ```
@@ -17,7 +17,7 @@ curl -fsSL https://openreceive.org/agent-directions/rails/full.md
17
17
  - Do not suggest rotating or revoking a code because it was pasted here.
18
18
  - Start the quickstart only once the NWC code is saved, and the LSC code is saved or the user said "Bitcoin only".
19
19
 
20
- These directions describe OpenReceive 0.4.31.
20
+ These directions describe OpenReceive 0.4.32.
21
21
 
22
22
  Add OpenReceive to a Rails application — the app you are already working in. You
23
23
  do not need a copy of the OpenReceive source: the gem is on RubyGems, the
@@ -61,8 +61,9 @@ Before anything else, check one file: the project's `.env`, if it exists.
61
61
  `grep -E '^(NWC_URI|LSC_URI_PRIMARY)=.' .env | cut -d= -f1` names the codes
62
62
  it sets without printing them. Check with that, here and after each write,
63
63
  not by reading the file, and never print the values. A code that is already
64
- set is not asked for again; if both are set, skip to step 5 (making the
65
- server load the file), then the quickstart.
64
+ set is not asked for again; if both are set, make sure `.gitignore` covers
65
+ `.env` (and `.dockerignore`, if the app has one), then skip to step 5
66
+ (making the server load the file), then the quickstart.
66
67
 
67
68
  Otherwise your next action is a question to the user. Do not install the gem,
68
69
  edit the app, write `.env.example`, or search anywhere else before asking
@@ -207,7 +208,8 @@ itself, and they hold for every integration.
207
208
  environment (`printenv`, `env`, `docker compose config`), even filtered to
208
209
  names.
209
210
  - The host owns the price. `config.amount_for` reads it from your own data;
210
- reject payer-supplied amounts.
211
+ reject payer-supplied amounts. A donation is no exception: its amount is saved
212
+ by your own route first (Donations, below).
211
213
  - `config.authorize` runs on every request, and the `resource` it receives is a
212
214
  CLAIM the payer made, not proof. Read the framework session; never trust a
213
215
  body field. The generator installs `OpenReceive::ALLOW_ALL_AUTHORIZE`, a
@@ -280,6 +282,15 @@ not replace your orders, users, or products, and you do not join them.
280
282
  never a live catalog lookup that could re-price a cart already placed. Return
281
283
  `{ currency:, value: }` as a decimal STRING, plus a `description` of what they
282
284
  are buying.
285
+ - **Donations and pay-what-you-want are fine.** The amount is the payer's
286
+ choice, so it enters through YOUR route, never OpenReceive's: the donate form
287
+ posts it to your own handler, which checks it and saves it on a new donation
288
+ row, made like an order. That row's id is the `reference`, and `config.amount_for`
289
+ reads the amount from the row, as it does for an order. Check it in that
290
+ handler: a floor and a cap ($1 and $10,000 unless the owner gave others) and
291
+ at most two decimal places. Refuse an amount outside them with a message;
292
+ never round it. Small amounts may be Lightning-only for some coins: the
293
+ checkout says which coins an amount is too small for.
283
294
  - **Users own the order; OpenReceive never sees them.** `config.authorize` uses
284
295
  the same ownership check this app already uses on the order show / pay page —
285
296
  `session[:user_id]`, Devise's `current_user`, a signed cookie, whatever it is.
@@ -3,7 +3,7 @@ This is the full file; follow it from Step 0.
3
3
  # OpenReceive agent directions (React Router)
4
4
 
5
5
  ```sh
6
- # READ THIS FIRST: this file is 34 KB and a summary drops required steps. Download it whole:
6
+ # READ THIS FIRST: this file is 35 KB and a summary drops required steps. Download it whole:
7
7
  curl -fsSL https://openreceive.org/agent-directions/react-router/full.md
8
8
  # Skip the download only if you already have all of it: pasted, read from disk or fetched raw.
9
9
  ```
@@ -17,7 +17,7 @@ curl -fsSL https://openreceive.org/agent-directions/react-router/full.md
17
17
  - Do not suggest rotating or revoking a code because it was pasted here.
18
18
  - Start the quickstart only once the NWC code is saved, and the LSC code is saved or the user said "Bitcoin only".
19
19
 
20
- These directions describe OpenReceive 0.4.31.
20
+ These directions describe OpenReceive 0.4.32.
21
21
 
22
22
  Add OpenReceive to a React Router application in framework mode — the app
23
23
  you are already working in, on Node. OpenReceive ships no React Router
@@ -64,8 +64,9 @@ Before anything else, check one file: the project's `.env`, if it exists.
64
64
  `grep -E '^(NWC_URI|LSC_URI_PRIMARY)=.' .env | cut -d= -f1` names the codes
65
65
  it sets without printing them. Check with that, here and after each write,
66
66
  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, skip to step 5 (making the
68
- server load the file), then the quickstart.
67
+ set is not asked for again; if both are set, make sure `.gitignore` covers
68
+ `.env` (and `.dockerignore`, if the app has one), then skip to step 5
69
+ (making the server load the file), then the quickstart.
69
70
 
70
71
  On a hosted builder (v0, Vercel, Replit, Lovable), the user may say instead
71
72
  that both codes are already set as the project's environment variables or
@@ -219,7 +220,8 @@ itself, and they hold for every integration.
219
220
  environment (`printenv`, `env`, `docker compose config`), even filtered to
220
221
  names.
221
222
  - The host owns the price. `amountFor` reads it from your own data; reject
222
- payer-supplied amounts.
223
+ payer-supplied amounts. A donation is no exception: its amount is saved
224
+ by your own route first (Donations, below).
223
225
  - `authorize` runs on every request, and the `resource` it receives is a CLAIM
224
226
  the payer made, not proof. Read a framework session; never trust a body field.
225
227
  - `onPaid` must be idempotent. Its database fulfillment commits once per `reference` — your order id, one
@@ -304,6 +306,15 @@ products, and you do not join them.
304
306
  live catalog lookup that could re-price a cart already placed. Return
305
307
  `{ currency, value }` as a decimal STRING, plus a `description` of what they
306
308
  are buying.
309
+ - **Donations and pay-what-you-want are fine.** The amount is the payer's
310
+ choice, so it enters through YOUR route, never OpenReceive's: the donate form
311
+ posts it to your own handler, which checks it and saves it on a new donation
312
+ row, made like an order. That row's id is the `reference`, and `amountFor`
313
+ reads the amount from the row, as it does for an order. Check it in that
314
+ handler: a floor and a cap ($1 and $10,000 unless the owner gave others) and
315
+ at most two decimal places. Refuse an amount outside them with a message;
316
+ never round it. Small amounts may be Lightning-only for some coins: the
317
+ checkout says which coins an amount is too small for.
307
318
  - **Users own the order; OpenReceive never sees them.** `authorize` uses the
308
319
  same ownership check this app already uses on the order show / pay page —
309
320
  `getSession(request.headers.get("cookie"))`, a cookie, whatever it is.
@@ -17,7 +17,7 @@ curl -fsSL https://openreceive.org/agent-directions/sveltekit/full.md
17
17
  - Do not suggest rotating or revoking a code because it was pasted here.
18
18
  - Start the quickstart only once the NWC code is saved, and the LSC code is saved or the user said "Bitcoin only".
19
19
 
20
- These directions describe OpenReceive 0.4.31.
20
+ These directions describe OpenReceive 0.4.32.
21
21
 
22
22
  Add OpenReceive to a SvelteKit application — the app you are already working
23
23
  in, on `@sveltejs/adapter-node`. OpenReceive ships no SvelteKit package: the
@@ -64,8 +64,9 @@ Before anything else, check one file: the project's `.env`, if it exists.
64
64
  `grep -E '^(NWC_URI|LSC_URI_PRIMARY)=.' .env | cut -d= -f1` names the codes
65
65
  it sets without printing them. Check with that, here and after each write,
66
66
  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, skip to step 5 (making the
68
- server load the file), then the quickstart.
67
+ set is not asked for again; if both are set, make sure `.gitignore` covers
68
+ `.env` (and `.dockerignore`, if the app has one), then skip to step 5
69
+ (making the server load the file), then the quickstart.
69
70
 
70
71
  On a hosted builder (v0, Vercel, Replit, Lovable), the user may say instead
71
72
  that both codes are already set as the project's environment variables or
@@ -220,7 +221,8 @@ itself, and they hold for every integration.
220
221
  environment (`printenv`, `env`, `docker compose config`), even filtered to
221
222
  names.
222
223
  - The host owns the price. `amountFor` reads it from your own data; reject
223
- payer-supplied amounts.
224
+ payer-supplied amounts. A donation is no exception: its amount is saved
225
+ by your own route first (Donations, below).
224
226
  - `authorize` runs on every request, and the `resource` it receives is a CLAIM
225
227
  the payer made, not proof. Read a framework session; never trust a body field.
226
228
  - `onPaid` must be idempotent. Its database fulfillment commits once per `reference` — your order id, one
@@ -311,6 +313,15 @@ products, and you do not join them.
311
313
  live catalog lookup that could re-price a cart already placed. Return
312
314
  `{ currency, value }` as a decimal STRING, plus a `description` of what they
313
315
  are buying.
316
+ - **Donations and pay-what-you-want are fine.** The amount is the payer's
317
+ choice, so it enters through YOUR route, never OpenReceive's: the donate form
318
+ posts it to your own handler, which checks it and saves it on a new donation
319
+ row, made like an order. That row's id is the `reference`, and `amountFor`
320
+ reads the amount from the row, as it does for an order. Check it in that
321
+ handler: a floor and a cap ($1 and $10,000 unless the owner gave others) and
322
+ at most two decimal places. Refuse an amount outside them with a message;
323
+ never round it. Small amounts may be Lightning-only for some coins: the
324
+ checkout says which coins an amount is too small for.
314
325
  - **Users own the order; OpenReceive never sees them.** `authorize` uses the
315
326
  same ownership check this app already uses on the order show / pay page —
316
327
  `event.locals.user`, `event.cookies`, whatever it is. `native` is the request's
@@ -3,7 +3,7 @@ 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 39 KB and a summary drops required steps. Download it whole:
6
+ # READ THIS FIRST: this file is 40 KB and a summary drops required steps. Download it whole:
7
7
  curl -fsSL https://openreceive.org/agent-directions/tanstack-start/full.md
8
8
  # Skip the download only if you already have all of it: pasted, read from disk or fetched raw.
9
9
  ```
@@ -17,7 +17,7 @@ curl -fsSL https://openreceive.org/agent-directions/tanstack-start/full.md
17
17
  - Do not suggest rotating or revoking a code because it was pasted here.
18
18
  - Start the quickstart only once the NWC code is saved, and the LSC code is saved or the user said "Bitcoin only".
19
19
 
20
- These directions describe OpenReceive 0.4.31.
20
+ These directions describe OpenReceive 0.4.32.
21
21
 
22
22
  Add OpenReceive to a TanStack Start application on Node — the app you are
23
23
  already working in, with its own Postgres. OpenReceive ships no TanStack
@@ -68,8 +68,9 @@ Before anything else, check one file: the project's `.env`, if it exists.
68
68
  `grep -E '^(NWC_URI|LSC_URI_PRIMARY)=.' .env | cut -d= -f1` names the codes
69
69
  it sets without printing them. Check with that, here and after each write,
70
70
  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, skip to step 5 (making the
72
- server load the file), then the quickstart.
71
+ set is not asked for again; if both are set, make sure `.gitignore` covers
72
+ `.env` (and `.dockerignore`, if the app has one), then skip to step 5
73
+ (making the server load the file), then the quickstart.
73
74
 
74
75
  On a hosted builder (v0, Vercel, Replit, Lovable), the user may say instead
75
76
  that both codes are already set as the project's environment variables or
@@ -222,7 +223,8 @@ itself, and they hold for every integration.
222
223
  environment (`printenv`, `env`, `docker compose config`), even filtered to
223
224
  names.
224
225
  - The host owns the price. `amountFor` reads it from your own data; reject
225
- payer-supplied amounts.
226
+ payer-supplied amounts. A donation is no exception: its amount is saved
227
+ by your own route first (Donations, below).
226
228
  - `authorize` runs on every request, and the `resource` it receives is a CLAIM
227
229
  the payer made, not proof. Read a framework session; never trust a body field.
228
230
  - `onPaid` must be idempotent. Its database fulfillment commits once per `reference` — your order id, one
@@ -332,6 +334,15 @@ products, and you do not join them.
332
334
  live catalog lookup that could re-price a cart already placed. Return
333
335
  `{ currency, value }` as a decimal STRING, plus a `description` of what they
334
336
  are buying.
337
+ - **Donations and pay-what-you-want are fine.** The amount is the payer's
338
+ choice, so it enters through YOUR route, never OpenReceive's: the donate form
339
+ posts it to your own handler, which checks it and saves it on a new donation
340
+ row, made like an order. That row's id is the `reference`, and `amountFor`
341
+ reads the amount from the row, as it does for an order. Check it in that
342
+ handler: a floor and a cap ($1 and $10,000 unless the owner gave others) and
343
+ at most two decimal places. Refuse an amount outside them with a message;
344
+ never round it. Small amounts may be Lightning-only for some coins: the
345
+ checkout says which coins an amount is too small for.
335
346
  - **Users own the order; OpenReceive never sees them.** `authorize` uses the
336
347
  same ownership check this app already uses on the order show / pay page —
337
348
  the cookie or session helper its server functions use, given the incoming
@@ -17,7 +17,7 @@ curl -fsSL https://openreceive.org/agent-directions/vendure/full.md
17
17
  - Do not suggest rotating or revoking a code because it was pasted here.
18
18
  - Start the quickstart only once the NWC code is saved, and the LSC code is saved or the user said "Bitcoin only".
19
19
 
20
- These directions describe OpenReceive 0.4.31.
20
+ These directions describe OpenReceive 0.4.32.
21
21
 
22
22
  Add OpenReceive to the Vendure shop you are working in: a Vendure server with
23
23
  its worker, and usually a storefront in its own project (Vendure's Next.js