openreceive 0.4.29 → 0.4.31
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/version.rb +1 -1
- data/skills/integrate-openreceive/SKILL.md +10 -1
- data/skills/integrate-openreceive/references/astro.md +8 -9
- data/skills/integrate-openreceive/references/bolt.md +9 -7
- data/skills/integrate-openreceive/references/btcpay.md +3 -4
- data/skills/integrate-openreceive/references/django.md +2 -3
- data/skills/integrate-openreceive/references/edd.md +4 -5
- data/skills/integrate-openreceive/references/fastapi.md +4 -5
- data/skills/integrate-openreceive/references/fastify.md +4 -5
- data/skills/integrate-openreceive/references/flask.md +2 -3
- data/skills/integrate-openreceive/references/fossbilling.md +7 -8
- data/skills/integrate-openreceive/references/laravel.md +3 -4
- data/skills/integrate-openreceive/references/lovable.md +16 -12
- data/skills/integrate-openreceive/references/medusa.md +12 -5
- data/skills/integrate-openreceive/references/mobile.md +1 -1
- data/skills/integrate-openreceive/references/nestjs.md +2 -3
- data/skills/integrate-openreceive/references/next.md +4 -5
- data/skills/integrate-openreceive/references/node.md +4 -5
- data/skills/integrate-openreceive/references/nuxt.md +9 -10
- data/skills/integrate-openreceive/references/odoo.md +446 -0
- data/skills/integrate-openreceive/references/paymenter.md +5 -6
- data/skills/integrate-openreceive/references/php.md +2 -3
- data/skills/integrate-openreceive/references/prestashop.md +476 -0
- data/skills/integrate-openreceive/references/rails.md +2 -3
- data/skills/integrate-openreceive/references/react-router.md +8 -9
- data/skills/integrate-openreceive/references/sveltekit.md +9 -10
- data/skills/integrate-openreceive/references/tanstack-start.md +14 -11
- data/skills/integrate-openreceive/references/vendure.md +544 -0
- data/skills/integrate-openreceive/references/woocommerce.md +5 -6
- metadata +6 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e14b1d9f9ff049eeb46e718b76e4f22ed33c762e18a395191d5a3644f9099d06
|
|
4
|
+
data.tar.gz: 86668b11e568545b70037fe04d7bd0a48e10f6e8bf4c0cc611dcceddd1c716a3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 408b766d25f9ab3f488cacb2a3f144804d93e1ad3c596275f5542e80399eac04203399c4e4b5d410b8f76d3c823d4857a3e39e6f74bbefd281366af634e44efb
|
|
7
|
+
data.tar.gz: e68e45763fa2e972e199ea036496a6c7d865e572763398b0fab0cd1e06c97e3c4016fb759606575354a88b0a70ed18f62c245bbae1e29a8cc406ba20ebbce71f
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.31 - 2026-10-20
|
|
4
|
+
|
|
5
|
+
Release with the complete 0.4.31 package family. The gem's summary names
|
|
6
|
+
Rails and the optional USDT and USDC swaps. No Ruby runtime changes from
|
|
7
|
+
0.4.30.
|
|
8
|
+
|
|
9
|
+
## 0.4.30 - 2026-10-19
|
|
10
|
+
|
|
11
|
+
Release with the complete 0.4.30 package family. The bundled agent skill adds the
|
|
12
|
+
PrestaShop, Odoo and Vendure references and the guide corrections from a review of
|
|
13
|
+
openreceive.org. No Ruby runtime changes from 0.4.29.
|
|
14
|
+
|
|
3
15
|
## 0.4.29 - 2026-10-19
|
|
4
16
|
|
|
5
17
|
Release with the complete 0.4.29 package family. The bundled agent skill's
|
data/lib/openreceive/version.rb
CHANGED
|
@@ -6,7 +6,7 @@ description: >
|
|
|
6
6
|
SvelteKit, Nuxt, Astro, React Router, TanStack Start, Rails,
|
|
7
7
|
Python, Django, FastAPI, Flask, Laravel, plain PHP, WordPress/WooCommerce,
|
|
8
8
|
Easy Digital Downloads,
|
|
9
|
-
Paymenter, FOSSBilling, Medusa, Lovable, Bolt, Supabase, React, Vue, Svelte, Angular, or plain HTML applications,
|
|
9
|
+
Paymenter, FOSSBilling, PrestaShop, Odoo, Medusa, Vendure, Lovable, Bolt, Supabase, React, Vue, Svelte, Angular, or plain HTML applications,
|
|
10
10
|
mobile apps (React Native, Expo, Flutter, Swift, Kotlin) through their
|
|
11
11
|
server, or connecting BTCPay Server to a receive-only NWC wallet. A configured swap provider
|
|
12
12
|
converts these payments to BTC over Lightning in the merchant's connected
|
|
@@ -59,9 +59,18 @@ connected wallet; asset and network availability depends on the provider.
|
|
|
59
59
|
- FOSSBilling: [references/fossbilling.md](references/fossbilling.md) — a
|
|
60
60
|
module and payment gateway from the GitHub release, configured with
|
|
61
61
|
console commands; no Composer or npm packages.
|
|
62
|
+
- PrestaShop: [references/prestashop.md](references/prestashop.md) — a
|
|
63
|
+
payment module from the GitHub release, configured with bin/console
|
|
64
|
+
commands; no Composer or npm packages.
|
|
65
|
+
- Odoo: [references/odoo.md](references/odoo.md) — a payment provider module
|
|
66
|
+
from the GitHub release and the `openreceive` package from PyPI,
|
|
67
|
+
configured with `odoo openreceive` commands.
|
|
62
68
|
- Medusa: [references/medusa.md](references/medusa.md) — the
|
|
63
69
|
`@openreceive/medusa` plugin and payment provider in the Medusa server,
|
|
64
70
|
and the React checkout in the storefront; no hooks to write.
|
|
71
|
+
- Vendure: [references/vendure.md](references/vendure.md) — the
|
|
72
|
+
`@openreceive/vendure` plugin and payment method handler in the Vendure
|
|
73
|
+
server, and the React checkout in the storefront; no hooks to write.
|
|
65
74
|
- Lovable (TanStack Start on Cloudflare Workers, with Supabase):
|
|
66
75
|
[references/lovable.md](references/lovable.md) — no terminal; codes are
|
|
67
76
|
Lovable secrets and payments go through Supabase's HTTPS API.
|
|
@@ -17,7 +17,7 @@ curl -fsSL https://openreceive.org/agent-directions/astro/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.
|
|
20
|
+
These directions describe OpenReceive 0.4.31.
|
|
21
21
|
|
|
22
22
|
Add OpenReceive to an Astro site — the one you are already working in, on
|
|
23
23
|
`@astrojs/node`. OpenReceive ships no Astro package: the integration is one
|
|
@@ -434,13 +434,12 @@ enough; drop the `.md` for the same page a person would read.
|
|
|
434
434
|
- https://openreceive.org/guides/custom-checkout-route.md — advanced: replacing the shipped adapter's routes with your own
|
|
435
435
|
- https://openreceive.org/guides/react-material-ui-recipe.md — a worked custom UI on a component library
|
|
436
436
|
- https://openreceive.org/guides/quickstart-next.md — each hook explained step by step, on Next.js; they are the same here
|
|
437
|
+
- https://openreceive.org/guides/payment-safety-upgrade.md — coordinated upgrades and reviewed repair of existing attempts
|
|
437
438
|
- https://openreceive.org/guides.md — the index, if what you need is not above
|
|
438
439
|
|
|
439
440
|
Questions, or a problem with the library itself:
|
|
440
441
|
https://openreceive.org/contact
|
|
441
442
|
|
|
442
|
-
- https://openreceive.org/guides/payment-safety-upgrade.md — coordinated upgrades and reviewed repair of existing attempts
|
|
443
|
-
|
|
444
443
|
---
|
|
445
444
|
|
|
446
445
|
## The quickstart, in full
|
|
@@ -481,7 +480,7 @@ On Node, with `@astrojs/node`. The payment route and the checkout page render
|
|
|
481
480
|
on demand (`prerender = false`); the rest of the site can stay static. The
|
|
482
481
|
wallet connection and your database driver need Node, so the route cannot run
|
|
483
482
|
on an edge runtime. The Vercel and Netlify adapters deploy Node functions:
|
|
484
|
-
read Bitcoin checkout on serverless hosts first.
|
|
483
|
+
read [Bitcoin checkout on serverless hosts](https://openreceive.org/guides/serverless.md) first.
|
|
485
484
|
For Cloudflare Workers, the [TanStack Start recipe](https://openreceive.org/guides/tanstack-start-recipe.md#where-it-runs)
|
|
486
485
|
explains what a Worker needs. This recipe was not run on those hosts.
|
|
487
486
|
|
|
@@ -572,25 +571,25 @@ export const POST: APIRoute = (context) => handleOpenReceive(context);
|
|
|
572
571
|
|
|
573
572
|
`native` is the endpoint's `APIContext`, so `authorize` can check the
|
|
574
573
|
session your app already has: its cookies, or the user your middleware puts
|
|
575
|
-
in `context.locals`. The Next.js quickstart
|
|
574
|
+
in `context.locals`. The [Next.js quickstart](https://openreceive.org/guides/quickstart-next.md)
|
|
576
575
|
explains each hook. They are the same here.
|
|
577
576
|
|
|
578
577
|
One stack serves the whole server process. Astro's origin check refuses
|
|
579
578
|
cross-site form posts. The checkout sends JSON, which it lets through.
|
|
580
579
|
`clientAddress` is the socket address. Behind your own reverse proxy, list
|
|
581
580
|
your domain in `security.allowedDomains`: Astro then takes the payer's
|
|
582
|
-
address from `x-forwarded-for` (Rate limiting).
|
|
581
|
+
address from `x-forwarded-for` ([Rate limiting](https://openreceive.org/guides/rate-limiting.md)).
|
|
583
582
|
|
|
584
583
|
### Your database
|
|
585
584
|
|
|
586
585
|
`db` is a `pg` Pool, `node:sqlite` or `better-sqlite3`, or one of the
|
|
587
|
-
adapters in Node ORM recipes. With Drizzle, pass
|
|
586
|
+
adapters in [Node ORM recipes](https://openreceive.org/guides/node-orms.md). With Drizzle, pass
|
|
588
587
|
the `pg` Pool underneath it.
|
|
589
588
|
|
|
590
589
|
Create OpenReceive's two tables with your migrations
|
|
591
590
|
(`npx openreceive scaffold payments --orm <your orm>`), or run
|
|
592
591
|
`paymentsSchemaSql("postgres")` from `@openreceive/http` once. It is
|
|
593
|
-
idempotent. See Payment storage.
|
|
592
|
+
idempotent. See [Payment storage](https://openreceive.org/guides/storage.md).
|
|
594
593
|
|
|
595
594
|
### The checkout page
|
|
596
595
|
|
|
@@ -630,7 +629,7 @@ if (!order || order.visitor !== Astro.cookies.get("visitor")?.value) {
|
|
|
630
629
|
|
|
631
630
|
The element starts the checkout in the browser. The payer picks Bitcoin and
|
|
632
631
|
gets the invoice. Keep it at the order's own URL: a payer with a swap deposit
|
|
633
|
-
in flight comes back to it (Swap refunds).
|
|
632
|
+
in flight comes back to it ([Swap refunds](https://openreceive.org/guides/swap-refunds.md)).
|
|
634
633
|
|
|
635
634
|
### Settings
|
|
636
635
|
|
|
@@ -17,7 +17,7 @@ If your fetch tool gave you a summary, fetch that URL again for the full text.
|
|
|
17
17
|
- Do not suggest rotating or revoking a code because it was pasted here.
|
|
18
18
|
- Start Step 1 only once NWC_URI is saved, and LSC_URI_PRIMARY is saved or the user said "Bitcoin only".
|
|
19
19
|
|
|
20
|
-
These directions describe OpenReceive 0.4.
|
|
20
|
+
These directions describe OpenReceive 0.4.31.
|
|
21
21
|
|
|
22
22
|
Add OpenReceive to this Bolt app: a Vite React app on Bolt Cloud, with Bolt
|
|
23
23
|
Database or a connected Supabase project as its database, and Supabase Edge
|
|
@@ -123,9 +123,11 @@ explicitly declined.
|
|
|
123
123
|
|
|
124
124
|
## Step 1 — the packages
|
|
125
125
|
|
|
126
|
-
Add `@openreceive/react` at 0.4.
|
|
127
|
-
`package.json`. The function imports `npm:@openreceive/http@^0.4.
|
|
128
|
-
and `npm:@supabase/supabase-js@2` directly; add nothing else.
|
|
126
|
+
Add `@openreceive/react` at 0.4.31 or newer to the app's
|
|
127
|
+
`package.json`. The function imports `npm:@openreceive/http@^0.4.31`
|
|
128
|
+
and `npm:@supabase/supabase-js@2` directly; add nothing else. (The recipe
|
|
129
|
+
below writes `^0.4.27`, the oldest release with the `cors` option; both
|
|
130
|
+
resolve to the newest 0.4.x.) No `pg`, no
|
|
129
131
|
Postgres driver, no OpenReceive scaffold.
|
|
130
132
|
|
|
131
133
|
## Step 2 — the migration
|
|
@@ -353,7 +355,7 @@ Use `@openreceive/*` 0.4.27 or newer: the function needs the `cors` option.
|
|
|
353
355
|
|
|
354
356
|
### 1. The migration
|
|
355
357
|
|
|
356
|
-
Save the SQL from Supabase migration,
|
|
358
|
+
Save the SQL from [Supabase migration](https://openreceive.org/guides/supabase-migration.md),
|
|
357
359
|
unchanged, as a new migration (`supabase/migrations/<timestamp>_openreceive.sql`)
|
|
358
360
|
and apply it. It creates OpenReceive's tables with row level security on and
|
|
359
361
|
every grant revoked from `anon` and `authenticated`, and the functions the
|
|
@@ -502,7 +504,7 @@ is. OpenReceive never allows credentials across sites, so no cookie reaches
|
|
|
502
504
|
the function, and a page on any listed origin can only send the tokens it
|
|
503
505
|
holds. `authorize` decides with the token, on every request. Never answer
|
|
504
506
|
these routes with CORS headers of your own, and never remove the token check.
|
|
505
|
-
More: Cross-site requests.
|
|
507
|
+
More: [Cross-site requests](https://openreceive.org/guides/authorization.md#cross-site-requests).
|
|
506
508
|
|
|
507
509
|
### 6. The secrets
|
|
508
510
|
|
|
@@ -573,7 +575,7 @@ page, as the payer's receipt.
|
|
|
573
575
|
OpenReceive's CI runs both storage routes in Supabase's edge-runtime under
|
|
574
576
|
the hosted limits, including a cross-site page with a bearer token. The trial
|
|
575
577
|
harness runs coding agents through a Bolt-shaped shop on a local Supabase
|
|
576
|
-
stack (see How we test platforms). We
|
|
578
|
+
stack (see [How we test platforms](https://openreceive.org/guides/how-we-test-platforms.md)). We
|
|
577
579
|
have not deployed to Supabase's hosted platform: its own API gateway, its
|
|
578
580
|
`verify_jwt` check and its handling of preflights are untested. If something
|
|
579
581
|
there does not work as this recipe says,
|
|
@@ -13,11 +13,11 @@ curl -fsSL https://openreceive.org/agent-directions/btcpay/full.md
|
|
|
13
13
|
- Check first: BTCPay Server 2.4.4 or later, and the plugin installed from Plugins → Plugin Directory.
|
|
14
14
|
- Unless the store already uses OpenReceive, stop and ask the user for a receive-only NWC code.
|
|
15
15
|
- Save it via Store → OpenReceive or the Greenfield API, never BTCPay's Lightning node screen. Never echo it.
|
|
16
|
-
- If the user wants USDT, USDC, ETH
|
|
16
|
+
- Next ask for the LSC code. If the user wants stablecoins, USDT, USDC, ETH, SOL or crypto, do not ask yes/no first.
|
|
17
17
|
- Never tick the spend-capable override to make a save succeed.
|
|
18
18
|
- Do not suggest rotating or revoking a code because it was pasted here.
|
|
19
19
|
|
|
20
|
-
These directions describe OpenReceive 0.4.
|
|
20
|
+
These directions describe OpenReceive 0.4.31.
|
|
21
21
|
|
|
22
22
|
Connect a BTCPay Server store to a receive-only NWC wallet with the OpenReceive
|
|
23
23
|
plugin, and optionally let payers pay BTCPay invoices with USDT, USDC, ETH or
|
|
@@ -196,13 +196,12 @@ enough; drop the `.md` for the same page a person would read.
|
|
|
196
196
|
- https://openreceive.org/guides/lightning-swap-connect.md — what an LSC code actually is
|
|
197
197
|
- https://openreceive.org/guides/automated-swaps.md — provider states, and what turning swaps on commits a merchant to
|
|
198
198
|
- https://openreceive.org/guides/swap-refunds.md — the refund states; the route back is BTCPay's own invoice checkout page here
|
|
199
|
+
- https://openreceive.org/guides/payment-safety-upgrade.md — coordinated upgrades and reviewed repair of existing attempts
|
|
199
200
|
- https://openreceive.org/guides.md — the index, if what you need is not above
|
|
200
201
|
|
|
201
202
|
Questions, or a problem with the plugin itself:
|
|
202
203
|
https://openreceive.org/contact
|
|
203
204
|
|
|
204
|
-
- https://openreceive.org/guides/payment-safety-upgrade.md — coordinated upgrades and reviewed repair of existing attempts
|
|
205
|
-
|
|
206
205
|
---
|
|
207
206
|
|
|
208
207
|
## The quickstart, in full
|
|
@@ -17,7 +17,7 @@ curl -fsSL https://openreceive.org/agent-directions/django/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.
|
|
20
|
+
These directions describe OpenReceive 0.4.31.
|
|
21
21
|
|
|
22
22
|
Add OpenReceive to a Django project — the app you are already working in. You
|
|
23
23
|
do not need a copy of the OpenReceive source: the Python package is on PyPI
|
|
@@ -442,13 +442,12 @@ enough; drop the `.md` for the same page a person would read.
|
|
|
442
442
|
- https://openreceive.org/guides/custom-checkout-route.md — advanced: replacing the mounted engine's routes with your own
|
|
443
443
|
- https://openreceive.org/guides/react-material-ui-recipe.md — a worked custom UI on a component library
|
|
444
444
|
- https://openreceive.org/agent-directions/flask.md — the same engine as a Flask Blueprint: follow those directions instead if this app is Flask after all
|
|
445
|
+
- https://openreceive.org/guides/payment-safety-upgrade.md — coordinated upgrades and reviewed repair of existing attempts
|
|
445
446
|
- https://openreceive.org/guides.md — the index, if what you need is not above
|
|
446
447
|
|
|
447
448
|
Questions, or a problem with the library itself:
|
|
448
449
|
https://openreceive.org/contact
|
|
449
450
|
|
|
450
|
-
- https://openreceive.org/guides/payment-safety-upgrade.md — coordinated upgrades and reviewed repair of existing attempts
|
|
451
|
-
|
|
452
451
|
---
|
|
453
452
|
|
|
454
453
|
## The quickstart, in full
|
|
@@ -17,7 +17,7 @@ curl -fsSL https://openreceive.org/agent-directions/edd/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.
|
|
20
|
+
These directions describe OpenReceive 0.4.31.
|
|
21
21
|
|
|
22
22
|
Install and configure the OpenReceive payment gateway in the Easy Digital
|
|
23
23
|
Downloads (EDD) store you are working in. Preserve its theme, checkout,
|
|
@@ -96,7 +96,7 @@ is saved or the user said "Bitcoin only". Never invent a placeholder code.
|
|
|
96
96
|
Install this release from the WordPress.org plugin directory:
|
|
97
97
|
|
|
98
98
|
```sh
|
|
99
|
-
wp plugin install openreceive --version=0.4.
|
|
99
|
+
wp plugin install openreceive --version=0.4.31 --activate
|
|
100
100
|
```
|
|
101
101
|
|
|
102
102
|
If that fails because WordPress.org does not have this version yet, install
|
|
@@ -104,7 +104,7 @@ the ZIP attached to the same GitHub release. Never install the GitHub
|
|
|
104
104
|
source-code ZIP or a ZIP from an older release:
|
|
105
105
|
|
|
106
106
|
```sh
|
|
107
|
-
wp plugin install https://github.com/OpenReceive/openreceive/releases/download/v0.4.
|
|
107
|
+
wp plugin install https://github.com/OpenReceive/openreceive/releases/download/v0.4.31/openreceive-wordpress-0.4.31.zip --activate
|
|
108
108
|
```
|
|
109
109
|
|
|
110
110
|
It needs Easy Digital Downloads active, and PHP 8.2+ with GMP and sodium in
|
|
@@ -222,7 +222,6 @@ question.
|
|
|
222
222
|
- [Lightning Swap Connect URI](https://openreceive.org/guides/lightning-swap-connect.md)
|
|
223
223
|
- [Security](https://openreceive.org/guides/security.md)
|
|
224
224
|
- [Price Feeds](https://openreceive.org/guides/price-feeds.md)
|
|
225
|
-
- [Payment Safety Upgrade](https://openreceive.org/guides/payment-safety-upgrade.md)
|
|
226
225
|
|
|
227
226
|
---
|
|
228
227
|
|
|
@@ -258,7 +257,7 @@ activate it. With WP-CLI, run `wp plugin install openreceive --activate`.
|
|
|
258
257
|
|
|
259
258
|
Each GitHub release also attaches the plugin as a ZIP, for a site that cannot
|
|
260
259
|
reach WordPress.org:
|
|
261
|
-
[openreceive-wordpress-0.4.
|
|
260
|
+
[openreceive-wordpress-0.4.31.zip](https://github.com/OpenReceive/openreceive/releases/download/v0.4.31/openreceive-wordpress-0.4.31.zip).
|
|
262
261
|
Install it through **Plugins → Add New → Upload Plugin**. The GitHub
|
|
263
262
|
source-code ZIP is not an installable plugin.
|
|
264
263
|
|
|
@@ -17,7 +17,7 @@ curl -fsSL https://openreceive.org/agent-directions/fastapi/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.
|
|
20
|
+
These directions describe OpenReceive 0.4.31.
|
|
21
21
|
|
|
22
22
|
Add OpenReceive to a FastAPI application — the app you are already working in.
|
|
23
23
|
You do not need a copy of the OpenReceive source: the engine is on PyPI
|
|
@@ -444,13 +444,12 @@ enough; drop the `.md` for the same page a person would read.
|
|
|
444
444
|
- https://openreceive.org/guides/custom-checkout-route.md — advanced: replacing the shipped adapter's routes with your own
|
|
445
445
|
- https://openreceive.org/guides/react-material-ui-recipe.md — a worked custom UI on a component library
|
|
446
446
|
- https://openreceive.org/agent-directions/flask.md — the same engine as a Flask Blueprint: follow those directions instead if this app is Flask after all
|
|
447
|
+
- https://openreceive.org/guides/payment-safety-upgrade.md — coordinated upgrades and reviewed repair of existing attempts
|
|
447
448
|
- https://openreceive.org/guides.md — the index, if what you need is not above
|
|
448
449
|
|
|
449
450
|
Questions, or a problem with the library itself:
|
|
450
451
|
https://openreceive.org/contact
|
|
451
452
|
|
|
452
|
-
- https://openreceive.org/guides/payment-safety-upgrade.md — coordinated upgrades and reviewed repair of existing attempts
|
|
453
|
-
|
|
454
453
|
---
|
|
455
454
|
|
|
456
455
|
## The quickstart, in full
|
|
@@ -625,14 +624,14 @@ checks the wallet, and requests get `503 WALLET_UNAVAILABLE` until the check
|
|
|
625
624
|
passes.
|
|
626
625
|
→ [openreceive_router](https://openreceive.org/guides/api-reference.md#openreceive_router) ·
|
|
627
626
|
[openreceive_lifespan](https://openreceive.org/guides/api-reference.md#openreceive_lifespan) ·
|
|
628
|
-
[the authorize context](https://openreceive.org/guides/api-reference.md#
|
|
627
|
+
[the authorize context](https://openreceive.org/guides/api-reference.md#host-python)
|
|
629
628
|
|
|
630
629
|
`rate_limiting=True` is for public web shops. Leave it off for point-of-sale,
|
|
631
630
|
where many payers share one IP. → [Rate limiting](https://openreceive.org/guides/rate-limiting.md)
|
|
632
631
|
|
|
633
632
|
An optional worker, `openreceive notifications --app main:app`, listens for
|
|
634
633
|
wallet payment notifications so settlement does not wait for the next page
|
|
635
|
-
load. → [openreceive notifications](https://openreceive.org/guides/api-reference.md#openreceive-notifications)
|
|
634
|
+
load. → [openreceive notifications](https://openreceive.org/guides/api-reference.md#openreceive-reconcile--openreceive-notifications)
|
|
636
635
|
|
|
637
636
|
Your app also needs an ordinary order-creation route that validates the cart,
|
|
638
637
|
prices with exact decimal math, and returns the order id the page will pass as
|
|
@@ -17,7 +17,7 @@ curl -fsSL https://openreceive.org/agent-directions/fastify/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.
|
|
20
|
+
These directions describe OpenReceive 0.4.31.
|
|
21
21
|
|
|
22
22
|
Add OpenReceive to a Fastify application — the app you are already working in.
|
|
23
23
|
You do not need a copy of the OpenReceive source: the packages are on npm, and
|
|
@@ -429,13 +429,12 @@ enough; drop the `.md` for the same page a person would read.
|
|
|
429
429
|
- https://openreceive.org/guides/api-reference.md — every route, option and error code
|
|
430
430
|
- https://openreceive.org/guides/custom-checkout-route.md — advanced: replacing the shipped adapter's routes with your own
|
|
431
431
|
- https://openreceive.org/guides/react-material-ui-recipe.md — a worked custom UI on a component library
|
|
432
|
+
- https://openreceive.org/guides/payment-safety-upgrade.md — coordinated upgrades and reviewed repair of existing attempts
|
|
432
433
|
- https://openreceive.org/guides.md — the index, if what you need is not above
|
|
433
434
|
|
|
434
435
|
Questions, or a problem with the library itself:
|
|
435
436
|
https://openreceive.org/contact
|
|
436
437
|
|
|
437
|
-
- https://openreceive.org/guides/payment-safety-upgrade.md — coordinated upgrades and reviewed repair of existing attempts
|
|
438
|
-
|
|
439
438
|
---
|
|
440
439
|
|
|
441
440
|
## The quickstart, in full
|
|
@@ -464,8 +463,8 @@ stays the same.
|
|
|
464
463
|
| Server | `@openreceive/fastify`, `@openreceive/express`, `@openreceive/next` |
|
|
465
464
|
| Frontend | `@openreceive/react`, `@openreceive/vue`, `@openreceive/svelte`, `@openreceive/angular`, `@openreceive/elements` (plain HTML) |
|
|
466
465
|
|
|
467
|
-
Express: [quickstart
|
|
468
|
-
[quickstart
|
|
466
|
+
Express: [Express quickstart](https://openreceive.org/guides/quickstart-node.md) · Next.js:
|
|
467
|
+
[Next.js quickstart](https://openreceive.org/guides/quickstart-next.md). This page is the Fastify one.
|
|
469
468
|
|
|
470
469
|
On a fresh project, also install what this guide assumes you already have: the
|
|
471
470
|
framework, a static-file plugin for the checkout page, and an env loader
|
|
@@ -17,7 +17,7 @@ curl -fsSL https://openreceive.org/agent-directions/flask/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.
|
|
20
|
+
These directions describe OpenReceive 0.4.31.
|
|
21
21
|
|
|
22
22
|
Add OpenReceive to a Flask application — the app you are already working in.
|
|
23
23
|
You do not need a copy of the OpenReceive source: the engine is on PyPI
|
|
@@ -449,13 +449,12 @@ enough; drop the `.md` for the same page a person would read.
|
|
|
449
449
|
- https://openreceive.org/guides/api-reference.md — every route, option and error code
|
|
450
450
|
- https://openreceive.org/guides/custom-checkout-route.md — advanced: replacing the shipped adapter's routes with your own
|
|
451
451
|
- https://openreceive.org/guides/react-material-ui-recipe.md — a worked custom UI on a component library
|
|
452
|
+
- https://openreceive.org/guides/payment-safety-upgrade.md — coordinated upgrades and reviewed repair of existing attempts
|
|
452
453
|
- https://openreceive.org/guides.md — the index, if what you need is not above
|
|
453
454
|
|
|
454
455
|
Questions, or a problem with the library itself:
|
|
455
456
|
https://openreceive.org/contact
|
|
456
457
|
|
|
457
|
-
- https://openreceive.org/guides/payment-safety-upgrade.md — coordinated upgrades and reviewed repair of existing attempts
|
|
458
|
-
|
|
459
458
|
---
|
|
460
459
|
|
|
461
460
|
## The quickstart, in full
|
|
@@ -3,7 +3,7 @@ This is the full file; follow it from Step 0.
|
|
|
3
3
|
# OpenReceive agent directions (FOSSBilling)
|
|
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/fossbilling/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/fossbilling/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.
|
|
20
|
+
These directions describe OpenReceive 0.4.31.
|
|
21
21
|
|
|
22
22
|
Install and configure the OpenReceive payment method in the FOSSBilling
|
|
23
23
|
billing panel you are working in. Preserve its theme, clients, products,
|
|
@@ -121,7 +121,7 @@ Docker image, download and unpack it inside the container, as the web user,
|
|
|
121
121
|
then activate the module:
|
|
122
122
|
|
|
123
123
|
```sh
|
|
124
|
-
docker compose exec -T -u www-data fossbilling sh -c 'curl -fsSLO https://github.com/OpenReceive/openreceive/releases/download/v0.4.
|
|
124
|
+
docker compose exec -T -u www-data fossbilling sh -c 'curl -fsSLO https://github.com/OpenReceive/openreceive/releases/download/v0.4.31/openreceive-fossbilling-0.4.31.zip && unzip -oq openreceive-fossbilling-0.4.31.zip && rm openreceive-fossbilling-0.4.31.zip'
|
|
125
125
|
docker compose exec -T -u www-data fossbilling php modules/Openreceive/activate.php
|
|
126
126
|
```
|
|
127
127
|
|
|
@@ -235,7 +235,6 @@ FOSSBilling's cron has never run, say so in one line of that message.
|
|
|
235
235
|
- [Lightning Swap Connect URI](https://openreceive.org/guides/lightning-swap-connect.md)
|
|
236
236
|
- [Security](https://openreceive.org/guides/security.md)
|
|
237
237
|
- [Price Feeds](https://openreceive.org/guides/price-feeds.md)
|
|
238
|
-
- [Payment Safety Upgrade](https://openreceive.org/guides/payment-safety-upgrade.md)
|
|
239
238
|
|
|
240
239
|
---
|
|
241
240
|
|
|
@@ -277,9 +276,9 @@ routes, console commands and cron hook), and
|
|
|
277
276
|
|
|
278
277
|
```sh
|
|
279
278
|
cd /var/www/fossbilling
|
|
280
|
-
curl -fsSLO https://github.com/OpenReceive/openreceive/releases/download/v0.4.
|
|
281
|
-
unzip -oq openreceive-fossbilling-0.4.
|
|
282
|
-
rm openreceive-fossbilling-0.4.
|
|
279
|
+
curl -fsSLO https://github.com/OpenReceive/openreceive/releases/download/v0.4.31/openreceive-fossbilling-0.4.31.zip
|
|
280
|
+
unzip -oq openreceive-fossbilling-0.4.31.zip
|
|
281
|
+
rm openreceive-fossbilling-0.4.31.zip
|
|
283
282
|
chown -R www-data:www-data modules/Openreceive library/Payment/Adapter/OpenReceive
|
|
284
283
|
sudo -u www-data php modules/Openreceive/activate.php
|
|
285
284
|
```
|
|
@@ -331,7 +330,7 @@ Run every command inside the container, in `/var/www/html`, as its web user
|
|
|
331
330
|
`www-data`. Unpack the release there too:
|
|
332
331
|
|
|
333
332
|
```sh
|
|
334
|
-
docker compose exec -T -u www-data fossbilling sh -c 'curl -fsSLO https://github.com/OpenReceive/openreceive/releases/download/v0.4.
|
|
333
|
+
docker compose exec -T -u www-data fossbilling sh -c 'curl -fsSLO https://github.com/OpenReceive/openreceive/releases/download/v0.4.31/openreceive-fossbilling-0.4.31.zip && unzip -oq openreceive-fossbilling-0.4.31.zip && rm openreceive-fossbilling-0.4.31.zip'
|
|
335
334
|
docker compose exec -T -u www-data fossbilling php modules/Openreceive/activate.php
|
|
336
335
|
```
|
|
337
336
|
|
|
@@ -17,7 +17,7 @@ curl -fsSL https://openreceive.org/agent-directions/laravel/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.
|
|
20
|
+
These directions describe OpenReceive 0.4.31.
|
|
21
21
|
|
|
22
22
|
Add OpenReceive to a Laravel application — the app you are already working in.
|
|
23
23
|
You do not need a copy of the OpenReceive source: the package is on Packagist
|
|
@@ -405,13 +405,12 @@ enough; drop the `.md` for the same page a person would read.
|
|
|
405
405
|
- https://openreceive.org/guides/api-reference.md — every route, option and error code
|
|
406
406
|
- https://openreceive.org/guides/custom-checkout-route.md — advanced: replacing the mounted engine's routes with your own
|
|
407
407
|
- https://openreceive.org/guides/react-material-ui-recipe.md — a worked custom UI on a component library
|
|
408
|
+
- https://openreceive.org/guides/payment-safety-upgrade.md — coordinated upgrades and reviewed repair of existing attempts
|
|
408
409
|
- https://openreceive.org/guides.md — the index, if what you need is not above
|
|
409
410
|
|
|
410
411
|
Questions, or a problem with the library itself:
|
|
411
412
|
https://openreceive.org/contact
|
|
412
413
|
|
|
413
|
-
- https://openreceive.org/guides/payment-safety-upgrade.md — coordinated upgrades and reviewed repair of existing attempts
|
|
414
|
-
|
|
415
414
|
---
|
|
416
415
|
|
|
417
416
|
## The quickstart, in full
|
|
@@ -421,7 +420,7 @@ passes. The page it comes from is https://openreceive.org/guides/quickstart-lara
|
|
|
421
420
|
|
|
422
421
|
## Laravel quickstart
|
|
423
422
|
|
|
424
|
-
Requires PHP ≥ 8.2 (64-bit) and Laravel
|
|
423
|
+
Requires PHP ≥ 8.2 (64-bit) and Laravel 11, 12 or 13. You also need these
|
|
425
424
|
PHP extensions:
|
|
426
425
|
|
|
427
426
|
- `ext-gmp`, which is REQUIRED. The NWC transport's elliptic-curve math depends
|
|
@@ -3,7 +3,7 @@ This is the full file; follow it from Step 0.
|
|
|
3
3
|
# OpenReceive agent directions (Lovable)
|
|
4
4
|
|
|
5
5
|
```text
|
|
6
|
-
READ THIS FIRST: this file is
|
|
6
|
+
READ THIS FIRST: this file is 27 KB and a summary drops required steps. Read all of it:
|
|
7
7
|
https://openreceive.org/agent-directions/lovable/full.md
|
|
8
8
|
If your fetch tool gave you a summary, fetch that URL again for the full text.
|
|
9
9
|
```
|
|
@@ -17,7 +17,7 @@ If your fetch tool gave you a summary, fetch that URL again for the full text.
|
|
|
17
17
|
- Do not suggest rotating or revoking a code because it was pasted here.
|
|
18
18
|
- Start Step 1 only once NWC_URI is saved, and LSC_URI_PRIMARY is saved or the user said "Bitcoin only".
|
|
19
19
|
|
|
20
|
-
These directions describe OpenReceive 0.4.
|
|
20
|
+
These directions describe OpenReceive 0.4.31.
|
|
21
21
|
|
|
22
22
|
Add OpenReceive to this Lovable app: a TanStack Start app on Cloudflare
|
|
23
23
|
Workers, with Lovable Cloud or a connected Supabase project as its database.
|
|
@@ -121,7 +121,7 @@ saved or explicitly declined.
|
|
|
121
121
|
|
|
122
122
|
## Step 1 — the packages
|
|
123
123
|
|
|
124
|
-
Add `@openreceive/http` and `@openreceive/react` at 0.4.
|
|
124
|
+
Add `@openreceive/http` and `@openreceive/react` at 0.4.31 or newer.
|
|
125
125
|
Nothing else: no `pg`, no Postgres driver, no OpenReceive scaffold. Do not
|
|
126
126
|
change the Vite or Wrangler configuration.
|
|
127
127
|
|
|
@@ -182,7 +182,7 @@ begin
|
|
|
182
182
|
update public.orders
|
|
183
183
|
set status = 'paid'
|
|
184
184
|
where id = p_reference::uuid -- or just p_reference, if the ids are text
|
|
185
|
-
and status = '
|
|
185
|
+
and status = 'awaiting_payment'; -- this app's own unpaid status
|
|
186
186
|
end
|
|
187
187
|
$$;
|
|
188
188
|
```
|
|
@@ -410,12 +410,12 @@ export async function handleOpenReceive(request: Request): Promise<Response> {
|
|
|
410
410
|
```
|
|
411
411
|
|
|
412
412
|
`authorize` sees the incoming request with its cookies, so check it with
|
|
413
|
-
the session your app already has. The Next.js quickstart
|
|
413
|
+
the session your app already has. The [Next.js quickstart](https://openreceive.org/guides/quickstart-next.md)
|
|
414
414
|
explains each hook. They are the same here.
|
|
415
415
|
|
|
416
416
|
Create OpenReceive's two tables with your migrations, or run
|
|
417
417
|
`paymentsSchemaSql("postgres")` from `@openreceive/http` once. It is
|
|
418
|
-
idempotent. See Payment storage.
|
|
418
|
+
idempotent. See [Payment storage](https://openreceive.org/guides/storage.md).
|
|
419
419
|
|
|
420
420
|
### On Supabase (Lovable)
|
|
421
421
|
|
|
@@ -440,7 +440,7 @@ npm install @openreceive/http @openreceive/react
|
|
|
440
440
|
) returns void language plpgsql as $$
|
|
441
441
|
begin
|
|
442
442
|
update public.orders set status = 'paid'
|
|
443
|
-
where id = p_reference::uuid and status = '
|
|
443
|
+
where id = p_reference::uuid and status = 'awaiting_payment'; -- your unpaid status
|
|
444
444
|
end
|
|
445
445
|
$$;
|
|
446
446
|
```
|
|
@@ -492,17 +492,21 @@ There is no `onPaid`: `openreceive_on_paid` is the fulfillment. `findOrder`
|
|
|
492
492
|
reads the order with your server-side Supabase client; in a Lovable app that
|
|
493
493
|
is `supabaseAdmin` from `@/integrations/supabase/client.server`.
|
|
494
494
|
|
|
495
|
-
|
|
496
|
-
cookies
|
|
497
|
-
browser, not in a cookie, so `authorize` cannot see who is signed in
|
|
498
|
-
|
|
495
|
+
By default the checkout calls the payment routes from the browser with the
|
|
496
|
+
page's cookies and nothing else. A Lovable app keeps its Supabase sign-in in
|
|
497
|
+
the browser, not in a cookie, so `authorize` cannot see who is signed in from
|
|
498
|
+
those cookies. Since 0.4.25 the React `<Checkout>` also takes a `fetch` that
|
|
499
|
+
sends the access token
|
|
500
|
+
([Use Supabase Auth in `authorize`](https://openreceive.org/guides/supabase.md#4-use-supabase-auth-in-authorize)), but
|
|
501
|
+
this recipe keeps the simpler route that works with every checkout: give the
|
|
502
|
+
buyer a cookie of their own. Create orders in a server function
|
|
499
503
|
that sets an HttpOnly `buyer` cookie (a random value, kept across orders) and
|
|
500
504
|
stores the same value on the order as `buyer_token`. `currentBuyer` reads it
|
|
501
505
|
back from the request's `cookie` header.
|
|
502
506
|
|
|
503
507
|
Before it serves, the server checks the database, and the payment routes
|
|
504
508
|
answer 503 until the migration is applied and `openreceive_on_paid` is
|
|
505
|
-
yours; the log names the fix. More: Supabase over HTTPS.
|
|
509
|
+
yours; the log names the fix. More: [Supabase over HTTPS](https://openreceive.org/guides/supabase.md#supabase-over-https).
|
|
506
510
|
|
|
507
511
|
### The checkout page
|
|
508
512
|
|
|
@@ -3,7 +3,7 @@ This is the full file; follow it from Step 0.
|
|
|
3
3
|
# OpenReceive agent directions (Medusa)
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
|
-
# READ THIS FIRST: this file is
|
|
6
|
+
# READ THIS FIRST: this file is 22 KB and a summary drops required steps. Download it whole:
|
|
7
7
|
curl -fsSL https://openreceive.org/agent-directions/medusa/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/medusa/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.
|
|
20
|
+
These directions describe OpenReceive 0.4.31.
|
|
21
21
|
|
|
22
22
|
Add OpenReceive to the Medusa store you are working in: a Medusa server, and
|
|
23
23
|
usually a storefront in its own project (Medusa's Next.js starter or another).
|
|
@@ -199,7 +199,6 @@ Medusa.
|
|
|
199
199
|
- [Lightning Swap Connect URI](https://openreceive.org/guides/lightning-swap-connect.md)
|
|
200
200
|
- [Security](https://openreceive.org/guides/security.md)
|
|
201
201
|
- [Price Feeds](https://openreceive.org/guides/price-feeds.md)
|
|
202
|
-
- [Payment Safety Upgrade](https://openreceive.org/guides/payment-safety-upgrade.md)
|
|
203
202
|
|
|
204
203
|
---
|
|
205
204
|
|
|
@@ -321,13 +320,14 @@ starter's Tailwind build:
|
|
|
321
320
|
|
|
322
321
|
```ts
|
|
323
322
|
import { readFile } from "node:fs/promises"
|
|
324
|
-
import { createRequire } from "node:module"
|
|
325
323
|
import path from "node:path"
|
|
326
324
|
import { NextRequest } from "next/server"
|
|
327
325
|
|
|
328
326
|
const BACKEND_URL = process.env.MEDUSA_BACKEND_URL ?? "http://localhost:9000"
|
|
329
327
|
|
|
330
328
|
async function stylesheet() {
|
|
329
|
+
// Node's own createRequire: Next's bundler would replace an imported one.
|
|
330
|
+
const { createRequire } = await import(/* webpackIgnore: true */ "node:module")
|
|
331
331
|
const resolve = createRequire(path.join(process.cwd(), "package.json")).resolve
|
|
332
332
|
const css = await readFile(resolve("@openreceive/react/styles.css"))
|
|
333
333
|
return new Response(css, {
|
|
@@ -460,7 +460,14 @@ and a buyer paying an order by Lightning and by USDT on Solana in Chromium,
|
|
|
460
460
|
after which the order is placed with its payment captured. A payment whose
|
|
461
461
|
buyer never placed the order was placed by the plugin's job. An unknown
|
|
462
462
|
session, another provider's session and a request without the publishable
|
|
463
|
-
key were refused, and an admin refund was recorded.
|
|
463
|
+
key were refused, and an admin refund was recorded. The repository's CI runs
|
|
464
|
+
the plugin in a real Medusa 2.21.2 on PostgreSQL on every push: those payments
|
|
465
|
+
through the store API, the refusals, the refund and the job.
|
|
466
|
+
|
|
467
|
+
Tested on 2026-10-19 with the starter's production build (`next build`, then
|
|
468
|
+
`next start`): a buyer paid by Lightning and by USDT on Solana as above, and
|
|
469
|
+
the route served the checkout's stylesheet, as it also does under
|
|
470
|
+
`next dev --turbopack`.
|
|
464
471
|
|
|
465
472
|
Not tested: Medusa split into a server and a worker, Medusa Cloud, storefronts
|
|
466
473
|
other than the Next.js starter, and a storefront calling Medusa from the
|
|
@@ -17,7 +17,7 @@ curl -fsSL https://openreceive.org/agent-directions/mobile/full.md
|
|
|
17
17
|
- The app never decides paid: it asks the server. A link back to the app is navigation only.
|
|
18
18
|
- Do not suggest rotating or revoking a code because it was pasted here.
|
|
19
19
|
|
|
20
|
-
These directions describe OpenReceive 0.4.
|
|
20
|
+
These directions describe OpenReceive 0.4.31.
|
|
21
21
|
|
|
22
22
|
Add Bitcoin checkout, with optional USDT, USDC, ETH and SOL, to a mobile app:
|
|
23
23
|
React Native or Expo, Flutter, Swift or Kotlin. OpenReceive has no mobile SDK
|