openreceive 0.4.24 → 0.4.26
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 +14 -0
- data/lib/openreceive/version.rb +1 -1
- data/skills/integrate-openreceive/SKILL.md +7 -3
- data/skills/integrate-openreceive/references/btcpay.md +1 -1
- data/skills/integrate-openreceive/references/django.md +18 -4
- data/skills/integrate-openreceive/references/fastapi.md +20 -5
- data/skills/integrate-openreceive/references/fastify.md +18 -3
- data/skills/integrate-openreceive/references/flask.md +835 -0
- data/skills/integrate-openreceive/references/laravel.md +20 -4
- data/skills/integrate-openreceive/references/lovable.md +8 -2
- data/skills/integrate-openreceive/references/nestjs.md +763 -0
- data/skills/integrate-openreceive/references/next.md +18 -3
- data/skills/integrate-openreceive/references/node.md +19 -3
- data/skills/integrate-openreceive/references/php.md +34 -8
- data/skills/integrate-openreceive/references/rails.md +17 -3
- data/skills/integrate-openreceive/references/woocommerce.md +5 -5
- metadata +3 -1
|
@@ -3,7 +3,7 @@ This is the full file; follow it from Step 0.
|
|
|
3
3
|
# OpenReceive agent directions (Laravel)
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
|
-
# READ THIS FIRST: this file is
|
|
6
|
+
# READ THIS FIRST: this file is 46 KB and a summary drops required steps. Download it whole:
|
|
7
7
|
curl -fsSL https://openreceive.org/agent-directions/laravel/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/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.26.
|
|
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
|
|
@@ -130,6 +130,8 @@ you store it. Ask one question per message.
|
|
|
130
130
|
`.env` the server reads (an image that copies `.env.example` over it
|
|
131
131
|
drops them), start `php artisan serve` with `--no-reload`, or set
|
|
132
132
|
`clear_env = no` for php-fpm. Restart the server after writing the file.
|
|
133
|
+
Under Compose, recreate the container with `docker compose up -d`:
|
|
134
|
+
`docker compose restart` keeps its old environment.
|
|
133
135
|
|
|
134
136
|
Do not invent placeholder URIs. Start the quickstart only once `NWC_URI` is
|
|
135
137
|
saved and `LSC_URI_PRIMARY` is saved or explicitly declined. The first boot
|
|
@@ -248,7 +250,12 @@ itself, and they hold for every integration.
|
|
|
248
250
|
such window. On the drop-ins: `resumePaymentHash`, fed from `onState`, on
|
|
249
251
|
`<Checkout>`; the `resume-payment-hash` attribute, fed from the
|
|
250
252
|
`openreceive-state` event (`event.detail.state.payment_hash`), on
|
|
251
|
-
`<openreceive-checkout>`.
|
|
253
|
+
`<openreceive-checkout>`.
|
|
254
|
+
That visit can come hours later, and `authorize` must still know the payer:
|
|
255
|
+
a session that expired in between answers 403 and strands the deposit. On a
|
|
256
|
+
guest shop, tie the order to a long-lived signed cookie, or put a secret
|
|
257
|
+
per-order token in its URL that your page trades for that cookie.
|
|
258
|
+
https://openreceive.org/guides/swap-refunds.md
|
|
252
259
|
- Show the payer WHAT THEY ARE BUYING. Return an optional `description` beside
|
|
253
260
|
the price from `amountFor` and both drop-ins render it above the
|
|
254
261
|
amount. Without it the checkout is a QR and "$1.00" with no sign of what the
|
|
@@ -293,6 +300,12 @@ not replace your orders, users, or products, and you do not join them.
|
|
|
293
300
|
expired invoice does not cancel the order; a later checkout may mint another
|
|
294
301
|
attempt. The engine refuses a new checkout under a reference that already
|
|
295
302
|
settled (409).
|
|
303
|
+
- **A paid order's page says it is paid and shows no checkout.** Nothing is left
|
|
304
|
+
to pay, and a checkout cannot start a new payment for a paid order. Mount the
|
|
305
|
+
checkout only while the order is unpaid. When it settles on the page, update
|
|
306
|
+
the page's status line from the `openreceive-settled` event on
|
|
307
|
+
`<openreceive-checkout>`: `onPaid` has already marked the order paid. Keep
|
|
308
|
+
that checkout mounted, because it is the payer's receipt.
|
|
296
309
|
- **Do not model `openreceive_payments`.** No Eloquent model, no `hasMany`, no
|
|
297
310
|
`belongsTo`, no foreign key either direction. `reference` is not unique (many
|
|
298
311
|
attempts per order). Fulfillment is a guarded transition on YOUR order row
|
|
@@ -376,6 +389,7 @@ enough; drop the `.md` for the same page a person would read.
|
|
|
376
389
|
- https://openreceive.org/guides/environment-variables.md — every variable, and what is deliberately not one
|
|
377
390
|
- https://openreceive.org/guides/storage.md — the engine tables and the attempt state machine
|
|
378
391
|
- https://openreceive.org/guides/frontend-checkout.md — the drop-in's props, attributes and slots
|
|
392
|
+
- https://openreceive.org/guides/mobile-apps.md — when a mobile app takes the payment: the checkout page it opens, and what the App Store and Google Play allow
|
|
379
393
|
- https://openreceive.org/guides/checkout-ux.md — read before building any custom UI
|
|
380
394
|
- https://openreceive.org/guides/headless-checkout.md — the controller, the display models, refunds
|
|
381
395
|
- https://openreceive.org/guides/provider-registry.md — where the wallet logos and pay
|
|
@@ -717,7 +731,9 @@ PHP builds the whole engine again on every request. Under PHP-FPM or Apache,
|
|
|
717
731
|
that same preflight would then run per request. To avoid that, the package
|
|
718
732
|
caches the wallet's info event in your default cache store for
|
|
719
733
|
`config('openreceive.wallet_info_cache_seconds')` (600). A checkout request
|
|
720
|
-
then costs one relay round trip, not two.
|
|
734
|
+
then costs one relay round trip, not two. The same store keeps the BTC price
|
|
735
|
+
and the swap provider's currencies and rates between requests, so checkout
|
|
736
|
+
routes do not fetch them again.
|
|
721
737
|
|
|
722
738
|
### Render the checkout
|
|
723
739
|
|
|
@@ -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.26.
|
|
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.
|
|
@@ -117,7 +117,7 @@ saved or explicitly declined.
|
|
|
117
117
|
|
|
118
118
|
## Step 1 — the packages
|
|
119
119
|
|
|
120
|
-
Add `@openreceive/http` and `@openreceive/react` at 0.4.
|
|
120
|
+
Add `@openreceive/http` and `@openreceive/react` at 0.4.26 or newer.
|
|
121
121
|
Nothing else: no `pg`, no Postgres driver, no OpenReceive scaffold. Do not
|
|
122
122
|
change the Vite or Wrangler configuration.
|
|
123
123
|
|
|
@@ -157,6 +157,12 @@ every settlement.
|
|
|
157
157
|
- **The order is unpaid or paid.** Do not copy attempt statuses (`pending`,
|
|
158
158
|
`expired`, `failed`, `attention`) onto it, and do not add a relation to
|
|
159
159
|
`openreceive_payments`.
|
|
160
|
+
- **A paid order's page says it is paid and shows no checkout.** Nothing is left
|
|
161
|
+
to pay, and a checkout cannot start a new payment for a paid order. Mount the
|
|
162
|
+
checkout only while the order is unpaid. When it settles on the page, update
|
|
163
|
+
the page's status line from `onSettled` on `<Checkout>`: `openreceive_on_paid`
|
|
164
|
+
has already marked the order paid. Keep that checkout mounted, because it is
|
|
165
|
+
the payer's receipt.
|
|
160
166
|
|
|
161
167
|
## Step 4 — `openreceive_on_paid`
|
|
162
168
|
|