openreceive 0.4.27 → 0.4.29
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 +18 -1
- data/skills/integrate-openreceive/references/astro.md +2 -2
- data/skills/integrate-openreceive/references/bolt.md +580 -0
- data/skills/integrate-openreceive/references/btcpay.md +1 -1
- data/skills/integrate-openreceive/references/django.md +1 -1
- data/skills/integrate-openreceive/references/edd.md +407 -0
- data/skills/integrate-openreceive/references/fastapi.md +1 -1
- data/skills/integrate-openreceive/references/fastify.md +6 -5
- data/skills/integrate-openreceive/references/flask.md +1 -1
- data/skills/integrate-openreceive/references/fossbilling.md +466 -0
- data/skills/integrate-openreceive/references/laravel.md +1 -1
- data/skills/integrate-openreceive/references/lovable.md +2 -2
- data/skills/integrate-openreceive/references/medusa.md +468 -0
- data/skills/integrate-openreceive/references/mobile.md +1 -1
- data/skills/integrate-openreceive/references/nestjs.md +3 -3
- data/skills/integrate-openreceive/references/next.md +7 -6
- data/skills/integrate-openreceive/references/node.md +6 -5
- data/skills/integrate-openreceive/references/nuxt.md +2 -2
- data/skills/integrate-openreceive/references/paymenter.md +369 -0
- data/skills/integrate-openreceive/references/php.md +1 -1
- data/skills/integrate-openreceive/references/rails.md +1 -1
- data/skills/integrate-openreceive/references/react-router.md +2 -2
- data/skills/integrate-openreceive/references/sveltekit.md +2 -2
- data/skills/integrate-openreceive/references/tanstack-start.md +2 -2
- data/skills/integrate-openreceive/references/woocommerce.md +8 -6
- metadata +6 -1
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
This is the full file; follow it from Step 0.
|
|
2
|
+
|
|
3
|
+
# OpenReceive agent directions (Paymenter)
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
# READ THIS FIRST: this file is 19 KB and a summary drops required steps. Download it whole:
|
|
7
|
+
curl -fsSL https://openreceive.org/agent-directions/paymenter/full.md
|
|
8
|
+
# Skip the download only if you already have all of it: pasted, read from disk or fetched raw.
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
**Step 0 in brief** (Step 0 below has the details):
|
|
12
|
+
|
|
13
|
+
- Before installing or editing anything, ask the user for a receive-only NWC code. One question per message.
|
|
14
|
+
- Next ask for the LSC code. If the user wants stablecoins, USDT, USDC, ETH, SOL or crypto, do not ask yes/no first.
|
|
15
|
+
- The user only pastes codes into this chat. Never ask them to run a command, edit a file or use an admin page.
|
|
16
|
+
- Store each code yourself as Step 2 says. Never put a code in a shell command.
|
|
17
|
+
- Do not suggest rotating or revoking a code because it was pasted here.
|
|
18
|
+
- Setup is done only when the NWC code is saved, and the LSC code is saved or the user said "Bitcoin only".
|
|
19
|
+
|
|
20
|
+
These directions describe OpenReceive 0.4.29.
|
|
21
|
+
|
|
22
|
+
Install and configure the OpenReceive payment gateway in the Paymenter billing
|
|
23
|
+
panel you are working in. Preserve its theme, clients, products, invoices and
|
|
24
|
+
prices. The extension is one folder that bundles the PHP engine and the
|
|
25
|
+
checkout's script: do not install Composer or npm packages into Paymenter, and
|
|
26
|
+
do not clone the OpenReceive repository.
|
|
27
|
+
|
|
28
|
+
The one required credential is a receive-only NWC code (Nostr Wallet Connect):
|
|
29
|
+
a string from the merchant's wallet that can create invoices and read their
|
|
30
|
+
status, and cannot spend. A swap provider (an "LSC" code) optionally lets
|
|
31
|
+
clients pay with USDT, USDC, ETH or SOL instead; the provider converts the
|
|
32
|
+
payment to BTC over Lightning in the merchant's connected wallet. Available
|
|
33
|
+
assets and networks depend on the provider.
|
|
34
|
+
|
|
35
|
+
Run every `php artisan` command below in Paymenter's directory, as the web
|
|
36
|
+
server's user, never as root: a root run can leave Paymenter's log file owned
|
|
37
|
+
by root, and then every page fails. With Paymenter's official Docker image,
|
|
38
|
+
that is `docker compose exec -T -u nginx paymenter php artisan …` (`-T` passes
|
|
39
|
+
stdin through; use the Paymenter service's own name). On a server, it is
|
|
40
|
+
`sudo -u www-data php artisan …` with the site's own user.
|
|
41
|
+
|
|
42
|
+
## Step 0 — ask for the two codes, one question at a time
|
|
43
|
+
|
|
44
|
+
Before anything else, check one thing: whether OpenReceive is already
|
|
45
|
+
installed (`php artisan openreceive:doctor`). If the command exists, it prints
|
|
46
|
+
`NWC_URI: set` or `unset` (likewise `LSC_URI_PRIMARY`), never the values. A
|
|
47
|
+
code that is already set is not asked for again; if both are set, skip to
|
|
48
|
+
Step 3.
|
|
49
|
+
|
|
50
|
+
Otherwise your next action is a question to the user. Do not download the
|
|
51
|
+
extension, edit Docker files or search anywhere else before asking it. Do not
|
|
52
|
+
read Paymenter's `.env`, deploy config, container environments or other
|
|
53
|
+
projects looking for a code: a new install has neither code yet.
|
|
54
|
+
|
|
55
|
+
The user never runs a command and never edits a file. They paste each code
|
|
56
|
+
into this chat; you store it. That is the supported path: do not ask them to
|
|
57
|
+
run the save command themselves, and do not tell them to revoke or replace a
|
|
58
|
+
code because it was pasted here. Ask one question per message.
|
|
59
|
+
|
|
60
|
+
1. **First message — the NWC code, and nothing else.**
|
|
61
|
+
|
|
62
|
+
> To receive payments I need a receive-only wallet code. In Rizful: open
|
|
63
|
+
> the menu, tap NWC, choose Receive-only NWC code, and tap Copy
|
|
64
|
+
> (https://openreceive.org/get_a_nwc_code_to_receive_payments). If you would
|
|
65
|
+
> rather run your own wallet, Alby Hub works too: Connections → Add
|
|
66
|
+
> Connection → Read Only. Paste the code here and I will store it.
|
|
67
|
+
|
|
68
|
+
2. **When they paste it.** If it does not start with `nostr+walletconnect://`,
|
|
69
|
+
ask them to copy the receive-only code again. Otherwise do not repeat it:
|
|
70
|
+
reply only that you have it, then ask the next question. You store it in
|
|
71
|
+
Step 2.
|
|
72
|
+
3. **Second message — swaps.** If the user asked for stablecoins, USDT, USDC,
|
|
73
|
+
ETH, SOL, altcoins or "crypto" (as in "Bitcoin and stablecoin payments"),
|
|
74
|
+
this message IS the walkthrough below: do not skip it, and do not ask yes
|
|
75
|
+
or no first. Otherwise ask whether clients should also be able to pay
|
|
76
|
+
with USDT, USDC, ETH or SOL, then give the walkthrough. The walkthrough:
|
|
77
|
+
|
|
78
|
+
> Go to https://lightning-swap.com, sign in for API keys, create a key, and
|
|
79
|
+
> copy the whole URI (https://openreceive.org/set_up_swap_provider). Paste
|
|
80
|
+
> it here and I will store it — or say "Bitcoin only" and I will continue
|
|
81
|
+
> without it.
|
|
82
|
+
|
|
83
|
+
Mention FixedFloat only if they already use it.
|
|
84
|
+
4. **When they paste it.** If it does not start with
|
|
85
|
+
`lightning+swapconnect://`, ask them to copy it again. Swaps are now on,
|
|
86
|
+
so keep the route back (the swap non-negotiable below).
|
|
87
|
+
|
|
88
|
+
Do not report setup as complete until the NWC code is saved, and the LSC code
|
|
89
|
+
is saved or the user said "Bitcoin only". Never invent a placeholder code.
|
|
90
|
+
|
|
91
|
+
## Step 1 — install the extension
|
|
92
|
+
|
|
93
|
+
The extension is the ZIP attached to this GitHub release. It holds one
|
|
94
|
+
`OpenReceive` folder, which goes into Paymenter's `extensions/Gateways/`
|
|
95
|
+
directory. Never install the GitHub source-code ZIP or a ZIP from an older
|
|
96
|
+
release. With Paymenter's official Docker image, download and unpack it inside
|
|
97
|
+
the container, as the web user:
|
|
98
|
+
|
|
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.29/openreceive-paymenter-0.4.29.zip && unzip -q openreceive-paymenter-0.4.29.zip && rm openreceive-paymenter-0.4.29.zip'
|
|
101
|
+
docker compose exec -T -u nginx paymenter php artisan app:extension:install gateway OpenReceive
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
On a server, unpack it into `<paymenter>/extensions/Gateways/` the same way,
|
|
105
|
+
make the folder the web user's, and run the same `app:extension:install`. That
|
|
106
|
+
command creates the extension's two tables in Paymenter's database and its
|
|
107
|
+
gateway, "Bitcoin Lightning". Checkout offers it once a wallet code is saved.
|
|
108
|
+
|
|
109
|
+
The extension needs Paymenter 1.5 or later on 64-bit PHP 8.3+ with GMP and
|
|
110
|
+
sodium. The official image has all of them. If doctor reports a missing PHP
|
|
111
|
+
extension on a server, say which one and stop: installing PHP extensions on
|
|
112
|
+
the user's server is theirs to decide.
|
|
113
|
+
|
|
114
|
+
## Step 2 — store the codes
|
|
115
|
+
|
|
116
|
+
Store each code yourself, one per command, and never as a shell argument:
|
|
117
|
+
|
|
118
|
+
1. Write the code with your file-editing tool, not a shell command (no
|
|
119
|
+
`echo`, `printf` or heredoc), to a new file outside the Paymenter
|
|
120
|
+
directory, such as `/tmp/openreceive-code`.
|
|
121
|
+
2. Run `php artisan openreceive:configure --nwc-uri=- < /tmp/openreceive-code`.
|
|
122
|
+
In Docker: `docker compose exec -T -u nginx paymenter php artisan openreceive:configure --nwc-uri=- < /tmp/openreceive-code`.
|
|
123
|
+
For the LSC code, use `--lsc-uri-primary=-`.
|
|
124
|
+
3. Delete the file (`rm /tmp/openreceive-code`), whether the command passed
|
|
125
|
+
or not.
|
|
126
|
+
|
|
127
|
+
The command asks the wallet first and saves the code, encrypted with
|
|
128
|
+
Paymenter's `APP_KEY`, only when the wallet answers as receive-only; a failure
|
|
129
|
+
saves nothing. If it reports spend methods such as `pay_invoice`, ask the user
|
|
130
|
+
for a receive-only code again. Saving the swap code renames the gateway to
|
|
131
|
+
"Bitcoin & stablecoins". Never write a code into Paymenter's settings table,
|
|
132
|
+
`.env` or any file in the Paymenter directory yourself.
|
|
133
|
+
|
|
134
|
+
Then run `php artisan openreceive:doctor`. It names any failed check and exits
|
|
135
|
+
nonzero; fix it before going on.
|
|
136
|
+
|
|
137
|
+
## Step 3 — mint a test invoice, then stop
|
|
138
|
+
|
|
139
|
+
Create a small unpaid test invoice, billed to the first admin account without
|
|
140
|
+
Paymenter's new-invoice email, and mint its Lightning invoice:
|
|
141
|
+
|
|
142
|
+
```sh
|
|
143
|
+
php artisan openreceive:test-invoice --new
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
To use an invoice that already exists, pass its id instead of `--new`.
|
|
147
|
+
`test-invoice` goes through the same route as the invoice's payment dialog. It
|
|
148
|
+
prints the amount in sats, the BOLT11 invoice, the invoice page and the
|
|
149
|
+
methods the dialog offers, each swap asset marked available or followed by
|
|
150
|
+
the reason it is not. That reason is the answer; report it. "Below the
|
|
151
|
+
provider minimum" or "above the provider maximum" is about this invoice's
|
|
152
|
+
amount, not a fault. Only when the reason says the provider is unreachable
|
|
153
|
+
does doctor's "Swap provider" line have more detail. `test-invoice` and
|
|
154
|
+
`doctor` are the whole check.
|
|
155
|
+
|
|
156
|
+
Give the user the invoice page; its **Pay** button opens the checkout on this
|
|
157
|
+
same invoice. Tell them the test invoice is theirs to cancel.
|
|
158
|
+
|
|
159
|
+
You cannot pay the invoice: the code is receive-only. Do not pay, settle or
|
|
160
|
+
mark the invoice paid, and do not look for a way to (a wallet control port, a
|
|
161
|
+
test endpoint, another wallet). If the user wants a real settlement test, they
|
|
162
|
+
pay from the invoice page with their own wallet; afterwards the invoice reads
|
|
163
|
+
paid.
|
|
164
|
+
|
|
165
|
+
Setup ends here. Once doctor is clean and the user has the link, your last
|
|
166
|
+
message starts "Setup is finished" and has at most six short lines: the
|
|
167
|
+
invoice page, the methods the checkout offers (Bitcoin, plus USDT, USDC, ETH
|
|
168
|
+
and SOL when the swap code is saved), and one line of what to look at. Do not
|
|
169
|
+
list each coin's availability, mention a minimum, or say a coin will not work:
|
|
170
|
+
a provider minimum depends on the invoice total, and real invoices will
|
|
171
|
+
differ. Do not list what you changed or what doctor checked. Send nothing
|
|
172
|
+
after it. Do not add containers, services, workers or cron jobs: Paymenter's
|
|
173
|
+
own cron job runs the extension's every-minute pass. If doctor says
|
|
174
|
+
Paymenter's scheduler has never run, say so in one line of that message.
|
|
175
|
+
|
|
176
|
+
## Non-negotiables
|
|
177
|
+
|
|
178
|
+
- Never print, log or commit a code, never put one in a shell argument, and
|
|
179
|
+
never write one into source files, `.env`, the database or browser code.
|
|
180
|
+
Doctor's set/unset is all you report.
|
|
181
|
+
- Do not suggest rotating, revoking or replacing a code because it was pasted
|
|
182
|
+
into this chat; that is the supported path.
|
|
183
|
+
- Work only in this Paymenter. Never read or run anything from another project
|
|
184
|
+
or directory on this machine (its `node_modules`, tools or source), for any
|
|
185
|
+
reason. A browser, Playwright, hand-made calls to the checkout's routes,
|
|
186
|
+
`tinker` and reading the extension's source are not part of setup: when
|
|
187
|
+
doctor or `test-invoice` fails, report its output.
|
|
188
|
+
- Run `php artisan` as the web server's user, never as root.
|
|
189
|
+
- Receive-only NWC is required. Never get past the preflight with a code that
|
|
190
|
+
can spend.
|
|
191
|
+
- The extension owns only its two payment tables in Paymenter's database.
|
|
192
|
+
Paymenter owns clients, invoices, prices, services and email. Do not add an
|
|
193
|
+
external payment database or custom fulfillment code, and do not edit
|
|
194
|
+
Paymenter's own files.
|
|
195
|
+
- IF SWAPS ARE ON, KEEP THE ROUTE BACK. A deposit that arrives short or late
|
|
196
|
+
becomes refundable, and the client claims it later from the same invoice's
|
|
197
|
+
payment dialog. Keep the extension installed while swap payments may still
|
|
198
|
+
need a refund. https://openreceive.org/guides/swap-refunds.md
|
|
199
|
+
- A receive-only wallet cannot send refunds. Refund a settled payment manually
|
|
200
|
+
from the wallet.
|
|
201
|
+
|
|
202
|
+
## Further reading
|
|
203
|
+
|
|
204
|
+
- [Paymenter Quickstart](https://openreceive.org/guides/quickstart-paymenter.md)
|
|
205
|
+
- [Automated Swaps](https://openreceive.org/guides/automated-swaps.md)
|
|
206
|
+
- [Swap Refunds](https://openreceive.org/guides/swap-refunds.md)
|
|
207
|
+
- [Lightning Swap Connect URI](https://openreceive.org/guides/lightning-swap-connect.md)
|
|
208
|
+
- [Security](https://openreceive.org/guides/security.md)
|
|
209
|
+
- [Price Feeds](https://openreceive.org/guides/price-feeds.md)
|
|
210
|
+
- [Payment Safety Upgrade](https://openreceive.org/guides/payment-safety-upgrade.md)
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## The quickstart, in full
|
|
215
|
+
|
|
216
|
+
Inlined verbatim so this file needs no network access. Steps 0–3 above are the setup and this is their reference: where the two differ, the steps win, and its admin-area screens are only for a Paymenter with no shell.
|
|
217
|
+
The page it comes from is https://openreceive.org/guides/quickstart-paymenter.
|
|
218
|
+
|
|
219
|
+
## Paymenter quickstart
|
|
220
|
+
|
|
221
|
+
[Paymenter](https://paymenter.org) is an open-source billing panel for hosting
|
|
222
|
+
companies. The OpenReceive extension adds a payment method to it: the client
|
|
223
|
+
pays an invoice with Bitcoin over Lightning, straight into your own wallet,
|
|
224
|
+
from Paymenter's own payment dialog. With a swap provider, the same dialog
|
|
225
|
+
also takes USDT, USDC, SOL and ETH, which the provider converts to BTC over
|
|
226
|
+
Lightning into the same wallet.
|
|
227
|
+
|
|
228
|
+
Paymenter keeps owning clients, invoices, prices and services. The extension
|
|
229
|
+
keeps its payment attempts in two tables of Paymenter's own database. When a
|
|
230
|
+
payment settles, it records the payment on the invoice with Paymenter's own
|
|
231
|
+
payment call, so the invoice turns paid and Paymenter activates or renews the
|
|
232
|
+
service as it does for any other gateway.
|
|
233
|
+
|
|
234
|
+
Requirements: Paymenter 1.5 or later, on 64-bit PHP 8.3 or later with GMP and
|
|
235
|
+
sodium, and MySQL or MariaDB. Paymenter's official Docker image has all of
|
|
236
|
+
them. Paymenter's cron job must run, as Paymenter's own install guide sets up.
|
|
237
|
+
|
|
238
|
+
### Install the extension
|
|
239
|
+
|
|
240
|
+
Each GitHub release attaches the extension as a ZIP that holds one
|
|
241
|
+
`OpenReceive` folder. It belongs in Paymenter's `extensions/Gateways/`
|
|
242
|
+
directory, next to Stripe and PayPal:
|
|
243
|
+
|
|
244
|
+
```sh
|
|
245
|
+
cd /var/www/paymenter
|
|
246
|
+
curl -fsSLO https://github.com/OpenReceive/openreceive/releases/download/v0.4.29/openreceive-paymenter-0.4.29.zip
|
|
247
|
+
unzip -q openreceive-paymenter-0.4.29.zip -d extensions/Gateways
|
|
248
|
+
rm openreceive-paymenter-0.4.29.zip
|
|
249
|
+
chown -R www-data:www-data extensions/Gateways/OpenReceive
|
|
250
|
+
sudo -u www-data php artisan app:extension:install gateway OpenReceive
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
Use your own Paymenter directory and web server user. The last command creates
|
|
254
|
+
the extension's two tables and its gateway, named "Bitcoin Lightning". Until a
|
|
255
|
+
wallet code is saved, checkout does not offer it.
|
|
256
|
+
|
|
257
|
+
The ZIP already bundles the extension's dependencies and the checkout's
|
|
258
|
+
script, under their own prefixed names, so Composer never runs and nothing in
|
|
259
|
+
Paymenter's own `vendor/` changes. Paymenter updates leave the folder alone.
|
|
260
|
+
The GitHub source-code ZIP is not an installable extension.
|
|
261
|
+
|
|
262
|
+
#### Paymenter in Docker
|
|
263
|
+
|
|
264
|
+
The official Compose file mounts `./extensions` into the container, so unzip
|
|
265
|
+
into the `extensions/Gateways` folder next to `compose.yml`. Run the artisan
|
|
266
|
+
commands inside the container as its web user, `nginx`:
|
|
267
|
+
|
|
268
|
+
```sh
|
|
269
|
+
docker compose exec -u nginx paymenter php artisan app:extension:install gateway OpenReceive
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
Always pass `-u nginx`. A command that runs as root can create Paymenter's
|
|
273
|
+
daily log file as root, and every web request then fails with a 500 until you
|
|
274
|
+
fix the ownership with `chown -R nginx:nginx /app/storage`.
|
|
275
|
+
|
|
276
|
+
### Configure the wallet
|
|
277
|
+
|
|
278
|
+
You need a receive-only NWC code: a Nostr Wallet Connect code that can create
|
|
279
|
+
invoices and read payments but cannot spend. The extension refuses a code that
|
|
280
|
+
can spend.
|
|
281
|
+
|
|
282
|
+
In the admin area, open **Gateways**, edit **Bitcoin Lightning**, paste the
|
|
283
|
+
code into **Receive-only NWC code** and save. To accept stablecoins too, paste a
|
|
284
|
+
swap provider code into **Swap provider code**. Paymenter stores both
|
|
285
|
+
encrypted with its `APP_KEY`.
|
|
286
|
+
|
|
287
|
+
From a terminal, pipe each code into `openreceive:configure` from your secret
|
|
288
|
+
manager or a protected file. Never type a code as a command argument:
|
|
289
|
+
|
|
290
|
+
```sh
|
|
291
|
+
sudo -u www-data php artisan openreceive:configure --nwc-uri=- < /secure/path/wallet-code
|
|
292
|
+
sudo -u www-data php artisan openreceive:configure --lsc-uri-primary=- < /secure/path/swap-code
|
|
293
|
+
sudo -u www-data php artisan openreceive:doctor
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
`configure` asks the wallet first and saves the code only when it answers as a
|
|
297
|
+
receive-only wallet. Saving a swap code renames the default "Bitcoin Lightning"
|
|
298
|
+
to "Bitcoin & stablecoins"; `--name="…"` sets your own. Omit the swap command
|
|
299
|
+
for Bitcoin-only checkout.
|
|
300
|
+
|
|
301
|
+
`doctor` checks the gateway, GMP and sodium, each code as set or unset (never
|
|
302
|
+
its value), the tables, the routes, the wallet, the price feed for every
|
|
303
|
+
Paymenter currency, each swap provider and the scheduled pass. It exits
|
|
304
|
+
nonzero when a check fails.
|
|
305
|
+
|
|
306
|
+
### Check it
|
|
307
|
+
|
|
308
|
+
Make a Lightning invoice through the same route the payment dialog uses, for a
|
|
309
|
+
new $5 test invoice billed to the first admin account, or for any unpaid
|
|
310
|
+
invoice by its id:
|
|
311
|
+
|
|
312
|
+
```sh
|
|
313
|
+
sudo -u www-data php artisan openreceive:test-invoice --new
|
|
314
|
+
sudo -u www-data php artisan openreceive:test-invoice <invoice id>
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
`--new` sends no new-invoice email; `--amount=` and `--user=<email>` change
|
|
318
|
+
what it bills and to whom. Cancel the test invoice in the admin area when you
|
|
319
|
+
are done.
|
|
320
|
+
|
|
321
|
+
It prints the amount in sats, the Lightning invoice and the invoice page, then
|
|
322
|
+
each method the dialog offers: Bitcoin Lightning, and each swap asset with its
|
|
323
|
+
network and whether it is available for this amount. A small invoice is often
|
|
324
|
+
below a swap provider's minimum; that is the amount, not a fault.
|
|
325
|
+
|
|
326
|
+
### How a payment works
|
|
327
|
+
|
|
328
|
+
1. The client opens the invoice, presses **Pay** and picks the OpenReceive
|
|
329
|
+
method. The checkout opens inside Paymenter's payment dialog.
|
|
330
|
+
2. The extension charges what is still due on the invoice, in the invoice's
|
|
331
|
+
currency, converted to sats at the current BTC price. Only the client the
|
|
332
|
+
invoice belongs to, signed in, can make or follow its payment.
|
|
333
|
+
3. Once the wallet reports the payment, the extension records it on the
|
|
334
|
+
invoice in the same database transaction that settles it. The payment hash
|
|
335
|
+
is the transaction id. Paymenter then marks the invoice paid and runs its
|
|
336
|
+
usual work, such as activating the service and sending the receipt.
|
|
337
|
+
4. The dialog returns the client to the invoice, now paid.
|
|
338
|
+
|
|
339
|
+
The checkout asks the wallet while the dialog is open. If the client closes it
|
|
340
|
+
before the payment settles, the extension's pass on Paymenter's scheduler finds
|
|
341
|
+
the payment within a minute or so. `php artisan openreceive:reconcile` runs one
|
|
342
|
+
pass by hand.
|
|
343
|
+
|
|
344
|
+
A client who closes the dialog and comes back to the invoice gets the same
|
|
345
|
+
Lightning invoice again while it is still valid.
|
|
346
|
+
|
|
347
|
+
### Refunds and removal
|
|
348
|
+
|
|
349
|
+
The receive-only wallet cannot send refunds. Send a refund from your own
|
|
350
|
+
wallet, then record it in Paymenter. A client whose swap deposit never
|
|
351
|
+
converted reclaims it from the same invoice's payment dialog, while the invoice
|
|
352
|
+
is still unpaid. If you turn on swaps, you commit to keeping that path
|
|
353
|
+
available. See [swap refunds](https://openreceive.org/guides/swap-refunds.md).
|
|
354
|
+
|
|
355
|
+
Deleting the gateway keeps the two tables: they are a record of payments
|
|
356
|
+
received.
|
|
357
|
+
|
|
358
|
+
### Tested, and not tested
|
|
359
|
+
|
|
360
|
+
Tested on 2026-10-16 with Paymenter 1.5.9's official Docker image and MariaDB
|
|
361
|
+
11.8, a test wallet and a test swap provider: install from the built ZIP,
|
|
362
|
+
configure from stdin, the doctor, and a client paying an invoice by Lightning
|
|
363
|
+
in Chromium, after which the invoice reads paid with the payment hash as its
|
|
364
|
+
transaction.
|
|
365
|
+
|
|
366
|
+
Not tested: PostgreSQL or SQLite, Paymenter in a subdirectory of a domain, and
|
|
367
|
+
Paymenter's automatic charges of saved payment methods. Lightning cannot pull
|
|
368
|
+
a payment, so OpenReceive offers no saved payment method: the client pays
|
|
369
|
+
each renewal invoice.
|
|
@@ -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.
|
|
20
|
+
These directions describe OpenReceive 0.4.29.
|
|
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
|
|
@@ -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.
|
|
20
|
+
These directions describe OpenReceive 0.4.29.
|
|
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
|
|
@@ -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.
|
|
20
|
+
These directions describe OpenReceive 0.4.29.
|
|
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
|
|
@@ -327,7 +327,7 @@ products, and you do not join them.
|
|
|
327
327
|
app's equivalent) through the `query` the library hands you, on that same
|
|
328
328
|
settlement transaction, not a second connection from your ORM. Database writes
|
|
329
329
|
only in the hook; emails, jobs, and pushes after commit. Placeholder style is
|
|
330
|
-
the dialect you declared: `?` on sqlite, `$1` on postgres.
|
|
330
|
+
the dialect you declared: `?` on sqlite and mysql, `$1` on postgres.
|
|
331
331
|
|
|
332
332
|
## If you build your own checkout UI
|
|
333
333
|
|
|
@@ -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.
|
|
20
|
+
These directions describe OpenReceive 0.4.29.
|
|
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
|
|
@@ -335,7 +335,7 @@ products, and you do not join them.
|
|
|
335
335
|
app's equivalent) through the `query` the library hands you, on that same
|
|
336
336
|
settlement transaction, not a second connection from your ORM. Database writes
|
|
337
337
|
only in the hook; emails, jobs, and pushes after commit. Placeholder style is
|
|
338
|
-
the dialect you declared: `?` on sqlite, `$1` on postgres.
|
|
338
|
+
the dialect you declared: `?` on sqlite and mysql, `$1` on postgres.
|
|
339
339
|
|
|
340
340
|
## If you build your own checkout UI
|
|
341
341
|
|
|
@@ -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.
|
|
20
|
+
These directions describe OpenReceive 0.4.29.
|
|
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
|
|
@@ -356,7 +356,7 @@ products, and you do not join them.
|
|
|
356
356
|
app's equivalent) through the `query` the library hands you, on that same
|
|
357
357
|
settlement transaction, not a second connection from your ORM. Database writes
|
|
358
358
|
only in the hook; emails, jobs, and pushes after commit. Placeholder style is
|
|
359
|
-
the dialect you declared: `?` on sqlite, `$1` on postgres.
|
|
359
|
+
the dialect you declared: `?` on sqlite and mysql, `$1` on postgres.
|
|
360
360
|
|
|
361
361
|
### If the database is Supabase
|
|
362
362
|
|
|
@@ -17,7 +17,7 @@ curl -fsSL https://openreceive.org/agent-directions/woocommerce/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.29.
|
|
21
21
|
|
|
22
22
|
Install and configure the OpenReceive payment gateway in the WooCommerce store
|
|
23
23
|
you are working in. Preserve its theme, checkout, customer accounts, order
|
|
@@ -95,7 +95,7 @@ is saved or the user said "Bitcoin only". Never invent a placeholder code.
|
|
|
95
95
|
Install this release from the WordPress.org plugin directory:
|
|
96
96
|
|
|
97
97
|
```sh
|
|
98
|
-
wp plugin install openreceive --version=0.4.
|
|
98
|
+
wp plugin install openreceive --version=0.4.29 --activate
|
|
99
99
|
```
|
|
100
100
|
|
|
101
101
|
If that fails because WordPress.org does not have this version yet, install
|
|
@@ -103,7 +103,7 @@ the ZIP attached to the same GitHub release. Never install the GitHub
|
|
|
103
103
|
source-code ZIP or a ZIP from an older release:
|
|
104
104
|
|
|
105
105
|
```sh
|
|
106
|
-
wp plugin install https://github.com/OpenReceive/openreceive/releases/download/v0.4.
|
|
106
|
+
wp plugin install https://github.com/OpenReceive/openreceive/releases/download/v0.4.29/openreceive-wordpress-0.4.29.zip --activate
|
|
107
107
|
```
|
|
108
108
|
|
|
109
109
|
It needs WooCommerce active, and PHP 8.2+ with GMP and sodium in BOTH the web
|
|
@@ -235,7 +235,9 @@ The page it comes from is https://openreceive.org/guides/quickstart-woocommerce.
|
|
|
235
235
|
|
|
236
236
|
The [WordPress integration entry point](https://openreceive.org/integrations/wordpress)
|
|
237
237
|
redirects to the WooCommerce integration, which uses this same guide and agent
|
|
238
|
-
directions. OpenReceive checkout on WordPress
|
|
238
|
+
directions. OpenReceive checkout on WordPress needs WooCommerce or Easy
|
|
239
|
+
Digital Downloads; this guide covers WooCommerce, and the
|
|
240
|
+
[Easy Digital Downloads quickstart](https://openreceive.org/guides/quickstart-edd.md) covers EDD.
|
|
239
241
|
|
|
240
242
|
Activate WooCommerce first. Then install OpenReceive from the
|
|
241
243
|
[WordPress.org plugin directory](https://wordpress.org/plugins/openreceive/):
|
|
@@ -252,7 +254,7 @@ database or application.
|
|
|
252
254
|
|
|
253
255
|
Each GitHub release also attaches the same plugin as a ZIP, for a site that
|
|
254
256
|
cannot reach WordPress.org or when WordPress.org does not list a release yet.
|
|
255
|
-
Download [openreceive-wordpress-0.4.
|
|
257
|
+
Download [openreceive-wordpress-0.4.29.zip](https://github.com/OpenReceive/openreceive/releases/download/v0.4.29/openreceive-wordpress-0.4.29.zip)
|
|
256
258
|
and install it through **Plugins → Add New → Upload Plugin**. Historical
|
|
257
259
|
releases may lack this asset. If that exact URL returns 404, build the same tag
|
|
258
260
|
below; never silently install an older ZIP. The GitHub source-code ZIP is not
|
|
@@ -262,7 +264,7 @@ GMP/sodium, Composer and WP-CLI:
|
|
|
262
264
|
```sh
|
|
263
265
|
git clone https://github.com/OpenReceive/openreceive.git
|
|
264
266
|
cd openreceive
|
|
265
|
-
git checkout v0.4.
|
|
267
|
+
git checkout v0.4.29
|
|
266
268
|
npm ci
|
|
267
269
|
npm run build:packages
|
|
268
270
|
composer install --working-dir=packages/php/wordpress
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: openreceive
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.29
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenReceive
|
|
@@ -57,18 +57,23 @@ files:
|
|
|
57
57
|
- skills/debug-openreceive-payment/SKILL.md
|
|
58
58
|
- skills/integrate-openreceive/SKILL.md
|
|
59
59
|
- skills/integrate-openreceive/references/astro.md
|
|
60
|
+
- skills/integrate-openreceive/references/bolt.md
|
|
60
61
|
- skills/integrate-openreceive/references/btcpay.md
|
|
61
62
|
- skills/integrate-openreceive/references/django.md
|
|
63
|
+
- skills/integrate-openreceive/references/edd.md
|
|
62
64
|
- skills/integrate-openreceive/references/fastapi.md
|
|
63
65
|
- skills/integrate-openreceive/references/fastify.md
|
|
64
66
|
- skills/integrate-openreceive/references/flask.md
|
|
67
|
+
- skills/integrate-openreceive/references/fossbilling.md
|
|
65
68
|
- skills/integrate-openreceive/references/laravel.md
|
|
66
69
|
- skills/integrate-openreceive/references/lovable.md
|
|
70
|
+
- skills/integrate-openreceive/references/medusa.md
|
|
67
71
|
- skills/integrate-openreceive/references/mobile.md
|
|
68
72
|
- skills/integrate-openreceive/references/nestjs.md
|
|
69
73
|
- skills/integrate-openreceive/references/next.md
|
|
70
74
|
- skills/integrate-openreceive/references/node.md
|
|
71
75
|
- skills/integrate-openreceive/references/nuxt.md
|
|
76
|
+
- skills/integrate-openreceive/references/paymenter.md
|
|
72
77
|
- skills/integrate-openreceive/references/php.md
|
|
73
78
|
- skills/integrate-openreceive/references/rails.md
|
|
74
79
|
- skills/integrate-openreceive/references/react-router.md
|