@openreceive/node 0.4.17 → 0.4.18
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.
- package/package.json +2 -2
- package/skills/integrate-openreceive/references/btcpay.md +20 -1
- package/skills/integrate-openreceive/references/django.md +20 -1
- package/skills/integrate-openreceive/references/fastapi.md +20 -1
- package/skills/integrate-openreceive/references/fastify.md +20 -1
- package/skills/integrate-openreceive/references/laravel.md +20 -1
- package/skills/integrate-openreceive/references/next.md +20 -1
- package/skills/integrate-openreceive/references/node.md +20 -1
- package/skills/integrate-openreceive/references/php.md +20 -1
- package/skills/integrate-openreceive/references/rails.md +20 -1
- package/skills/integrate-openreceive/references/woocommerce.md +133 -33
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openreceive/node",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.18",
|
|
4
4
|
"description": "Accept Bitcoin Lightning payments in Node.js with your own wallet and optional USDT, USDC, SOL and ETH swaps.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bitcoin",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"types": "./dist/index.d.ts",
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@getalby/sdk": "^8.0.3",
|
|
20
|
-
"@openreceive/core": "0.4.
|
|
20
|
+
"@openreceive/core": "0.4.18"
|
|
21
21
|
},
|
|
22
22
|
"bin": {
|
|
23
23
|
"openreceive": "./bin/openreceive.mjs"
|
|
@@ -1,6 +1,23 @@
|
|
|
1
|
+
This is the full file; follow it from Step 0.
|
|
2
|
+
|
|
1
3
|
# OpenReceive agent directions (BTCPay Server)
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
```sh
|
|
6
|
+
# READ THIS FIRST: this file is 12 KB and a summary drops required steps. Download it whole:
|
|
7
|
+
curl -fsSL https://openreceive.org/agent-directions/btcpay/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
|
+
- Check first: BTCPay Server 2.4.4 or later, and the plugin installed from Plugins → Plugin Directory.
|
|
14
|
+
- Unless the store already uses OpenReceive, stop and ask the user for a receive-only NWC code.
|
|
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 or SOL, ask for an LSC code too, but do not wait for it.
|
|
17
|
+
- Never tick the spend-capable override to make a save succeed.
|
|
18
|
+
- Do not suggest rotating or revoking a code because it was pasted here.
|
|
19
|
+
|
|
20
|
+
These directions describe OpenReceive 0.4.18.
|
|
4
21
|
|
|
5
22
|
Connect a BTCPay Server store to a receive-only NWC wallet with the OpenReceive
|
|
6
23
|
plugin, and optionally let payers pay BTCPay invoices with USDT, USDC, ETH or
|
|
@@ -91,6 +108,8 @@ Only then start the quickstart.
|
|
|
91
108
|
database like every other BTCPay credential; never copy them into
|
|
92
109
|
screenshots, tickets, browser code or logs. The provider's order token never
|
|
93
110
|
leaves the server.
|
|
111
|
+
- Do not suggest rotating, revoking or replacing a code because it was pasted
|
|
112
|
+
into this chat; that is the supported path.
|
|
94
113
|
- BTCPay's `LightningListener` is the settlement authority. Provider
|
|
95
114
|
`completed` is not payment; only the wallet reporting the Lightning invoice
|
|
96
115
|
settled is. Do not build anything that fulfils on a provider state.
|
|
@@ -1,6 +1,23 @@
|
|
|
1
|
+
This is the full file; follow it from Step 0.
|
|
2
|
+
|
|
1
3
|
# OpenReceive agent directions (Django)
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
```sh
|
|
6
|
+
# READ THIS FIRST: this file is 42 KB and a summary drops required steps. Download it whole:
|
|
7
|
+
curl -fsSL https://openreceive.org/agent-directions/django/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 edit .env or run a command to save one.
|
|
16
|
+
- Write each code into .env yourself, as Step 0 says. Never echo it or put it in a shell command.
|
|
17
|
+
- Do not suggest rotating or revoking a code because it was pasted here.
|
|
18
|
+
- Start the quickstart only once 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.18.
|
|
4
21
|
|
|
5
22
|
Add OpenReceive to a Django project — the app you are already working in. You
|
|
6
23
|
do not need a copy of the OpenReceive source: the Python package is on PyPI
|
|
@@ -145,6 +162,8 @@ itself, and they hold for every integration.
|
|
|
145
162
|
and not an association to `OpenReceivePayment`.
|
|
146
163
|
- Keep `NWC_URI` / `LSC_URI_*` server-only. Never put them in browser code,
|
|
147
164
|
logs, or assets.
|
|
165
|
+
- Do not suggest rotating, revoking or replacing a code because it was pasted
|
|
166
|
+
into this chat; that is the supported path.
|
|
148
167
|
- The host owns the price. `amount_for` reads it from your own data;
|
|
149
168
|
reject payer-supplied amounts.
|
|
150
169
|
- `authorize` runs on every request, and the `resource` it receives is a
|
|
@@ -1,6 +1,23 @@
|
|
|
1
|
+
This is the full file; follow it from Step 0.
|
|
2
|
+
|
|
1
3
|
# OpenReceive agent directions (FastAPI)
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
```sh
|
|
6
|
+
# READ THIS FIRST: this file is 35 KB and a summary drops required steps. Download it whole:
|
|
7
|
+
curl -fsSL https://openreceive.org/agent-directions/fastapi/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 edit .env or run a command to save one.
|
|
16
|
+
- Write each code into .env yourself, as Step 0 says. Never echo it or put it in a shell command.
|
|
17
|
+
- Do not suggest rotating or revoking a code because it was pasted here.
|
|
18
|
+
- Start the quickstart only once 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.18.
|
|
4
21
|
|
|
5
22
|
Add OpenReceive to a FastAPI application — the app you are already working in.
|
|
6
23
|
You do not need a copy of the OpenReceive source: the engine is on PyPI
|
|
@@ -138,6 +155,8 @@ itself, and they hold for every integration.
|
|
|
138
155
|
and not a Prisma/Drizzle relation to `openreceive_payments`.
|
|
139
156
|
- Keep `NWC_URI` / `LSC_URI_*` server-only. Never put them in browser code,
|
|
140
157
|
logs, or assets.
|
|
158
|
+
- Do not suggest rotating, revoking or replacing a code because it was pasted
|
|
159
|
+
into this chat; that is the supported path.
|
|
141
160
|
- The host owns the price. `amount_for` reads it from your own data; reject
|
|
142
161
|
payer-supplied amounts.
|
|
143
162
|
- `authorize` runs on every request, and the `resource` it receives is a CLAIM
|
|
@@ -1,6 +1,23 @@
|
|
|
1
|
+
This is the full file; follow it from Step 0.
|
|
2
|
+
|
|
1
3
|
# OpenReceive agent directions (Fastify)
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
```sh
|
|
6
|
+
# READ THIS FIRST: this file is 34 KB and a summary drops required steps. Download it whole:
|
|
7
|
+
curl -fsSL https://openreceive.org/agent-directions/fastify/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 edit .env or run a command to save one.
|
|
16
|
+
- Write each code into .env yourself, as Step 0 says. Never echo it or put it in a shell command.
|
|
17
|
+
- Do not suggest rotating or revoking a code because it was pasted here.
|
|
18
|
+
- Start the quickstart only once 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.18.
|
|
4
21
|
|
|
5
22
|
Add OpenReceive to a Fastify application — the app you are already working in.
|
|
6
23
|
You do not need a copy of the OpenReceive source: the packages are on npm, and
|
|
@@ -131,6 +148,8 @@ itself, and they hold for every integration.
|
|
|
131
148
|
and not a Prisma/Drizzle relation to `openreceive_payments`.
|
|
132
149
|
- Keep `NWC_URI` / `LSC_URI_*` server-only. Never put them in browser code,
|
|
133
150
|
logs, or assets.
|
|
151
|
+
- Do not suggest rotating, revoking or replacing a code because it was pasted
|
|
152
|
+
into this chat; that is the supported path.
|
|
134
153
|
- The host owns the price. `amountFor` reads it from your own data; reject
|
|
135
154
|
payer-supplied amounts.
|
|
136
155
|
- `authorize` runs on every request, and the `resource` it receives is a CLAIM
|
|
@@ -1,6 +1,23 @@
|
|
|
1
|
+
This is the full file; follow it from Step 0.
|
|
2
|
+
|
|
1
3
|
# OpenReceive agent directions (Laravel)
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
```sh
|
|
6
|
+
# READ THIS FIRST: this file is 41 KB and a summary drops required steps. Download it whole:
|
|
7
|
+
curl -fsSL https://openreceive.org/agent-directions/laravel/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 edit .env or run a command to save one.
|
|
16
|
+
- Write each code into .env yourself, as Step 0 says. Never echo it or put it in a shell command.
|
|
17
|
+
- Do not suggest rotating or revoking a code because it was pasted here.
|
|
18
|
+
- Start the quickstart only once 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.18.
|
|
4
21
|
|
|
5
22
|
Add OpenReceive to a Laravel application — the app you are already working in.
|
|
6
23
|
You do not need a copy of the OpenReceive source: the package is on Packagist
|
|
@@ -136,6 +153,8 @@ itself, and they hold for every integration.
|
|
|
136
153
|
and not an Eloquent model over `openreceive_payments`.
|
|
137
154
|
- Keep `NWC_URI` / `LSC_URI_*` server-only. Never put them in browser code,
|
|
138
155
|
logs, or assets.
|
|
156
|
+
- Do not suggest rotating, revoking or replacing a code because it was pasted
|
|
157
|
+
into this chat; that is the supported path.
|
|
139
158
|
- The host owns the price. `amountFor` reads it from your own data; reject
|
|
140
159
|
payer-supplied amounts.
|
|
141
160
|
- `authorize` runs on every request, and the `resource` it receives is a CLAIM
|
|
@@ -1,6 +1,23 @@
|
|
|
1
|
+
This is the full file; follow it from Step 0.
|
|
2
|
+
|
|
1
3
|
# OpenReceive agent directions (Next.js)
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
```sh
|
|
6
|
+
# READ THIS FIRST: this file is 37 KB and a summary drops required steps. Download it whole:
|
|
7
|
+
curl -fsSL https://openreceive.org/agent-directions/next/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 edit .env.local or run a command to save one.
|
|
16
|
+
- Write each code into .env.local yourself, as Step 0 says. Never echo it or put it in a shell command.
|
|
17
|
+
- Do not suggest rotating or revoking a code because it was pasted here.
|
|
18
|
+
- Start the quickstart only once 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.18.
|
|
4
21
|
|
|
5
22
|
Add OpenReceive to a Next.js App Router application — the app you are already
|
|
6
23
|
working in. You do not need a copy of the OpenReceive source: the packages are
|
|
@@ -131,6 +148,8 @@ itself, and they hold for every integration.
|
|
|
131
148
|
and not a Prisma/Drizzle relation to `openreceive_payments`.
|
|
132
149
|
- Keep `NWC_URI` / `LSC_URI_*` server-only. Never put them in browser code,
|
|
133
150
|
logs, or assets.
|
|
151
|
+
- Do not suggest rotating, revoking or replacing a code because it was pasted
|
|
152
|
+
into this chat; that is the supported path.
|
|
134
153
|
- The host owns the price. `amountFor` reads it from your own data; reject
|
|
135
154
|
payer-supplied amounts.
|
|
136
155
|
- `authorize` runs on every request, and the `resource` it receives is a CLAIM
|
|
@@ -1,6 +1,23 @@
|
|
|
1
|
+
This is the full file; follow it from Step 0.
|
|
2
|
+
|
|
1
3
|
# OpenReceive agent directions (Node.js)
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
```sh
|
|
6
|
+
# READ THIS FIRST: this file is 33 KB and a summary drops required steps. Download it whole:
|
|
7
|
+
curl -fsSL https://openreceive.org/agent-directions/node/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 edit .env or run a command to save one.
|
|
16
|
+
- Write each code into .env yourself, as Step 0 says. Never echo it or put it in a shell command.
|
|
17
|
+
- Do not suggest rotating or revoking a code because it was pasted here.
|
|
18
|
+
- Start the quickstart only once 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.18.
|
|
4
21
|
|
|
5
22
|
Add OpenReceive to a Node application — the app you are already working in. You
|
|
6
23
|
do not need a copy of the OpenReceive source: the packages are on npm, and the
|
|
@@ -128,6 +145,8 @@ itself, and they hold for every integration.
|
|
|
128
145
|
and not a Prisma/Drizzle relation to `openreceive_payments`.
|
|
129
146
|
- Keep `NWC_URI` / `LSC_URI_*` server-only. Never put them in browser code,
|
|
130
147
|
logs, or assets.
|
|
148
|
+
- Do not suggest rotating, revoking or replacing a code because it was pasted
|
|
149
|
+
into this chat; that is the supported path.
|
|
131
150
|
- The host owns the price. `amountFor` reads it from your own data; reject
|
|
132
151
|
payer-supplied amounts.
|
|
133
152
|
- `authorize` runs on every request, and the `resource` it receives is a CLAIM
|
|
@@ -1,6 +1,23 @@
|
|
|
1
|
+
This is the full file; follow it from Step 0.
|
|
2
|
+
|
|
1
3
|
# OpenReceive agent directions (PHP)
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
```sh
|
|
6
|
+
# READ THIS FIRST: this file is 37 KB and a summary drops required steps. Download it whole:
|
|
7
|
+
curl -fsSL https://openreceive.org/agent-directions/php/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 edit .env or run a command to save one.
|
|
16
|
+
- Write each code into .env yourself, as Step 0 says. Never echo it or put it in a shell command.
|
|
17
|
+
- Do not suggest rotating or revoking a code because it was pasted here.
|
|
18
|
+
- Start the quickstart only once 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.18.
|
|
4
21
|
|
|
5
22
|
Add OpenReceive to a PHP application — the app you are already working in. You
|
|
6
23
|
do not need a copy of the OpenReceive source: the engine is on Packagist
|
|
@@ -141,6 +158,8 @@ itself, and they hold for every integration.
|
|
|
141
158
|
and not a join to `openreceive_payments`.
|
|
142
159
|
- Keep `NWC_URI` / `LSC_URI_*` server-only. Never put them in browser code,
|
|
143
160
|
logs, or assets — and never in a `config.php` that ships in the repository.
|
|
161
|
+
- Do not suggest rotating, revoking or replacing a code because it was pasted
|
|
162
|
+
into this chat; that is the supported path.
|
|
144
163
|
- The host owns the price. `amountFor` reads it from your own data; reject
|
|
145
164
|
payer-supplied amounts.
|
|
146
165
|
- `authorize` runs on every request, and the `resource` it receives is a CLAIM
|
|
@@ -1,6 +1,23 @@
|
|
|
1
|
+
This is the full file; follow it from Step 0.
|
|
2
|
+
|
|
1
3
|
# OpenReceive agent directions (Rails)
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
```sh
|
|
6
|
+
# READ THIS FIRST: this file is 38 KB and a summary drops required steps. Download it whole:
|
|
7
|
+
curl -fsSL https://openreceive.org/agent-directions/rails/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 edit .env or run a command to save one.
|
|
16
|
+
- Write each code into .env yourself, as Step 0 says. Never echo it or put it in a shell command.
|
|
17
|
+
- Do not suggest rotating or revoking a code because it was pasted here.
|
|
18
|
+
- Start the quickstart only once 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.18.
|
|
4
21
|
|
|
5
22
|
Add OpenReceive to a Rails application — the app you are already working in. You
|
|
6
23
|
do not need a copy of the OpenReceive source: the gem is on RubyGems, the
|
|
@@ -132,6 +149,8 @@ itself, and they hold for every integration.
|
|
|
132
149
|
and not an association to `OpenReceivePayment`.
|
|
133
150
|
- Keep `NWC_URI` / `LSC_URI_*` server-only. Never put them in browser code,
|
|
134
151
|
logs, or assets.
|
|
152
|
+
- Do not suggest rotating, revoking or replacing a code because it was pasted
|
|
153
|
+
into this chat; that is the supported path.
|
|
135
154
|
- The host owns the price. `config.amount_for` reads it from your own data;
|
|
136
155
|
reject payer-supplied amounts.
|
|
137
156
|
- `config.authorize` runs on every request, and the `resource` it receives is a
|
|
@@ -1,6 +1,23 @@
|
|
|
1
|
+
This is the full file; follow it from Step 0.
|
|
2
|
+
|
|
1
3
|
# OpenReceive agent directions (WordPress + WooCommerce)
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
```sh
|
|
6
|
+
# READ THIS FIRST: this file is 22 KB and a summary drops required steps. Download it whole:
|
|
7
|
+
curl -fsSL https://openreceive.org/agent-directions/woocommerce/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.18.
|
|
4
21
|
|
|
5
22
|
Install and configure the OpenReceive payment gateway in the WooCommerce store
|
|
6
23
|
you are working in. Preserve its theme, checkout, customer accounts, order
|
|
@@ -32,8 +49,9 @@ for again; if both are set, skip to `wp openreceive configure --enable` at
|
|
|
32
49
|
the end of Step 2.
|
|
33
50
|
|
|
34
51
|
Otherwise your next action is a question to the user. Do not install the
|
|
35
|
-
plugin, edit Docker files or search anywhere else before asking it.
|
|
36
|
-
|
|
52
|
+
plugin, edit Docker files or search anywhere else before asking it. PHP
|
|
53
|
+
extensions, Docker images and the database wait until both codes are in this
|
|
54
|
+
chat, or the user said "Bitcoin only"; Step 1 covers them. Do not read wp-config.php, deploy config, container environments or other projects
|
|
37
55
|
looking for a code: a new store has neither code yet.
|
|
38
56
|
|
|
39
57
|
The user never runs a command and never edits a file. They paste each code
|
|
@@ -78,14 +96,16 @@ Install the plugin built for this release. Never install the GitHub
|
|
|
78
96
|
source-code ZIP or a ZIP from an older release:
|
|
79
97
|
|
|
80
98
|
```sh
|
|
81
|
-
wp plugin install https://github.com/OpenReceive/openreceive/releases/download/v0.4.
|
|
99
|
+
wp plugin install https://github.com/OpenReceive/openreceive/releases/download/v0.4.18/openreceive-wordpress-0.4.18.zip --activate
|
|
82
100
|
```
|
|
83
101
|
|
|
84
102
|
It needs WooCommerce active, and PHP 8.2+ with GMP and sodium in BOTH the web
|
|
85
103
|
PHP and the WP-CLI PHP. On the official `wordpress` and `wordpress:cli` Docker
|
|
86
104
|
images, activation fails with "OpenReceive requires the PHP sodium and GMP
|
|
87
105
|
extensions": add GMP to both images as "Enable GMP in both PHP runtimes" below
|
|
88
|
-
says, rebuild both, then install again. If the
|
|
106
|
+
says, rebuild both, then install again. If the Compose file has only `image:`
|
|
107
|
+
lines, use the two Dockerfiles and `build:` keys under "Compose files with only
|
|
108
|
+
`image:` lines" below, and add no other service. If the URL answers 404, build the same
|
|
89
109
|
tag as "Get the installable archive" below says.
|
|
90
110
|
|
|
91
111
|
## Step 2 — store the codes, then enable the gateway
|
|
@@ -113,7 +133,7 @@ secret workflow.
|
|
|
113
133
|
Then run `wp openreceive configure --enable` and `wp openreceive doctor`.
|
|
114
134
|
Doctor names any failed check and exits nonzero; fix it before going on.
|
|
115
135
|
|
|
116
|
-
## Step 3 — mint a test invoice
|
|
136
|
+
## Step 3 — mint a test invoice, then stop
|
|
117
137
|
|
|
118
138
|
Create a pending test order that pays with OpenReceive, then mint its
|
|
119
139
|
Lightning invoice from the terminal:
|
|
@@ -125,16 +145,44 @@ wp openreceive test-invoice <order id>
|
|
|
125
145
|
```
|
|
126
146
|
|
|
127
147
|
`test-invoice` goes through the same checkout route as the order-pay page. It
|
|
128
|
-
prints the amount in sats, the BOLT11 invoice
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
148
|
+
prints the amount in sats, the BOLT11 invoice, the order-pay link and the
|
|
149
|
+
methods that page offers, each swap asset marked available or followed by the
|
|
150
|
+
reason it is not. That reason is the answer; report it. "Below the provider
|
|
151
|
+
minimum" or "above the provider maximum" is about this order's amount, not a
|
|
152
|
+
fault: a small test order is often under a swap minimum. Only when the reason
|
|
153
|
+
says the provider is unreachable does doctor's "Swap provider" line have more
|
|
154
|
+
detail. `test-invoice` and `doctor` are the whole checkout check.
|
|
155
|
+
|
|
156
|
+
Give the user the order-pay link, which opens the checkout on this same
|
|
157
|
+
invoice, and the list of methods. Tell them the test order is theirs to delete.
|
|
158
|
+
|
|
159
|
+
You cannot pay the invoice: the code is receive-only. Do not pay, settle or
|
|
160
|
+
mark the order 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 on the order-pay link from their own wallet; afterwards
|
|
163
|
+
`wp wc shop_order get <order id> --user=<admin user id> --field=status` is no
|
|
164
|
+
longer `pending`.
|
|
165
|
+
|
|
166
|
+
Setup ends here. Once doctor is clean and the user has the link, say that setup
|
|
167
|
+
is finished, in one message. Do not install mail software, add containers or
|
|
168
|
+
services, or set up cron. If doctor's "Reconcile scheduled" check fails, fix
|
|
169
|
+
that. On a store with little traffic, add one sentence to that message: a
|
|
170
|
+
system cron for WordPress scheduled work settles orders sooner, and this setup
|
|
171
|
+
does not add one. State it as a recommendation. Do not offer to set it up or
|
|
172
|
+
end the message on a question.
|
|
132
173
|
|
|
133
174
|
## Non-negotiables
|
|
134
175
|
|
|
135
176
|
- Never print, log or commit a code, never put one in a shell argument, and
|
|
136
177
|
never write one into source files, wp-config.php or browser code. Doctor's
|
|
137
178
|
set/unset is all you report.
|
|
179
|
+
- Do not suggest rotating, revoking or replacing a code because it was pasted
|
|
180
|
+
into this chat; that is the supported path.
|
|
181
|
+
- Work only in this store. Never read or run anything from another project or
|
|
182
|
+
directory on this machine (its `node_modules`, tools or source), for any
|
|
183
|
+
reason. A browser, Playwright, hand-made calls to the checkout's REST routes
|
|
184
|
+
and reading the plugin's source are not part of setup: when doctor or
|
|
185
|
+
`test-invoice` fails, report its output.
|
|
138
186
|
- Receive-only NWC is required. Never turn on the spend-capable override to
|
|
139
187
|
get past the preflight.
|
|
140
188
|
- The plugin owns only its payment-attempt tables in the WordPress database.
|
|
@@ -147,9 +195,11 @@ and tell them the test order is theirs to delete.
|
|
|
147
195
|
refund. https://openreceive.org/guides/swap-refunds.md
|
|
148
196
|
- A receive-only wallet cannot send merchant refunds. Refund a settled
|
|
149
197
|
payment manually from the wallet.
|
|
150
|
-
- Settlement runs on checkout requests and an every-minute scheduled job.
|
|
151
|
-
|
|
152
|
-
`wp openreceive notifications` is an optional long-running worker
|
|
198
|
+
- Settlement runs on checkout requests and an every-minute scheduled job. A
|
|
199
|
+
system cron for WordPress scheduled work helps a low-traffic store, and
|
|
200
|
+
`wp openreceive notifications` is an optional long-running worker: recommend
|
|
201
|
+
them, and set one up only when the user asks for it by name. "Go ahead" is
|
|
202
|
+
not that request.
|
|
153
203
|
|
|
154
204
|
## Further reading
|
|
155
205
|
|
|
@@ -165,8 +215,8 @@ and tell them the test order is theirs to delete.
|
|
|
165
215
|
|
|
166
216
|
## The quickstart, in full
|
|
167
217
|
|
|
168
|
-
Inlined verbatim so this file needs no network access
|
|
169
|
-
|
|
218
|
+
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 wp-admin screens are only for a store with no WP-CLI.
|
|
219
|
+
The page it comes from is https://openreceive.org/guides/quickstart-woocommerce.
|
|
170
220
|
|
|
171
221
|
## WordPress + WooCommerce quickstart
|
|
172
222
|
|
|
@@ -186,7 +236,7 @@ database or application.
|
|
|
186
236
|
|
|
187
237
|
### Get the installable archive
|
|
188
238
|
|
|
189
|
-
Download [openreceive-wordpress-0.4.
|
|
239
|
+
Download [openreceive-wordpress-0.4.18.zip](https://github.com/OpenReceive/openreceive/releases/download/v0.4.18/openreceive-wordpress-0.4.18.zip)
|
|
190
240
|
from the matching release. Historical releases may lack this asset. If that exact
|
|
191
241
|
URL returns 404, build the same tag below; never silently install an older ZIP.
|
|
192
242
|
The GitHub source-code ZIP is not an installable plugin. On a development machine
|
|
@@ -195,7 +245,7 @@ with Node 22+, PHP 8.2+ with GMP/sodium, Composer and WP-CLI:
|
|
|
195
245
|
```sh
|
|
196
246
|
git clone https://github.com/OpenReceive/openreceive.git
|
|
197
247
|
cd openreceive
|
|
198
|
-
git checkout v0.4.
|
|
248
|
+
git checkout v0.4.18
|
|
199
249
|
npm ci
|
|
200
250
|
npm run build:packages
|
|
201
251
|
composer install --working-dir=packages/php/wordpress
|
|
@@ -241,8 +291,53 @@ On managed WordPress hosting, ask the host to enable GMP and sodium in both
|
|
|
241
291
|
runtimes; if they cannot, this plugin cannot run there. Do not use Composer's
|
|
242
292
|
`--ignore-platform-reqs` to bypass the requirements.
|
|
243
293
|
|
|
294
|
+
#### Compose files with only `image:` lines
|
|
295
|
+
|
|
296
|
+
Many stores run the official images straight from Compose, for example
|
|
297
|
+
`image: wordpress:php8.2-apache` and `image: wordpress:cli-php8.2`, with no
|
|
298
|
+
Dockerfile. Add two Dockerfiles next to `compose.yml`, keeping the tags your
|
|
299
|
+
`image:` lines had. The web image is Debian and runs as root:
|
|
300
|
+
|
|
301
|
+
```dockerfile
|
|
302
|
+
# wordpress.Dockerfile
|
|
303
|
+
FROM wordpress:php8.2-apache
|
|
304
|
+
RUN apt-get update && apt-get install -y --no-install-recommends libgmp-dev \
|
|
305
|
+
&& docker-php-ext-install gmp \
|
|
306
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
The CLI image is Alpine and runs as `www-data`:
|
|
310
|
+
|
|
311
|
+
```dockerfile
|
|
312
|
+
# wp-cli.Dockerfile
|
|
313
|
+
FROM wordpress:cli-php8.2
|
|
314
|
+
USER root
|
|
315
|
+
RUN apk add --no-cache gmp \
|
|
316
|
+
&& apk add --no-cache --virtual .gmp-build $PHPIZE_DEPS gmp-dev \
|
|
317
|
+
&& docker-php-ext-install gmp \
|
|
318
|
+
&& apk del .gmp-build
|
|
319
|
+
USER www-data
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
In `compose.yml`, replace each of those two `image:` lines with a `build:` key
|
|
323
|
+
and leave the rest of both services as they are:
|
|
324
|
+
|
|
325
|
+
```yaml
|
|
326
|
+
services:
|
|
327
|
+
wordpress:
|
|
328
|
+
build: { context: ., dockerfile: wordpress.Dockerfile }
|
|
329
|
+
cli:
|
|
330
|
+
build: { context: ., dockerfile: wp-cli.Dockerfile }
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
Then run `docker compose build wordpress cli` and `docker compose up -d wordpress`.
|
|
334
|
+
Use your own service names. Do not add any other service for this.
|
|
335
|
+
|
|
244
336
|
### Configure the wallet
|
|
245
337
|
|
|
338
|
+
On managed hosting with no shell or WP-CLI, use these admin screens. With WP-CLI,
|
|
339
|
+
use [Configure through WP-CLI](#configure-through-wp-cli) below instead.
|
|
340
|
+
|
|
246
341
|
1. Open **WooCommerce → Settings → Payments → OpenReceive**.
|
|
247
342
|
2. Enter a receive-only NWC code and save.
|
|
248
343
|
3. Enable the gateway.
|
|
@@ -277,7 +372,8 @@ backup. These commands share admin preflight and encrypted storage. Credential
|
|
|
277
372
|
flags accept only `-`; blank input leaves settings intact. Generic WooCommerce
|
|
278
373
|
REST and `wp wc payment_gateway` credential updates are rejected. `doctor`
|
|
279
374
|
reports the failed check with credentials redacted and exits nonzero on failure.
|
|
280
|
-
|
|
375
|
+
It also asks each configured swap provider for its asset list, and fails when a
|
|
376
|
+
provider does not answer or offers no assets. The default payment title becomes “Bitcoin & stablecoins (OpenReceive)” with swaps;
|
|
281
377
|
a customized title is preserved.
|
|
282
378
|
|
|
283
379
|
To check checkout from the terminal, mint an invoice for an unpaid order whose
|
|
@@ -291,7 +387,11 @@ wp openreceive test-invoice <order id>
|
|
|
291
387
|
|
|
292
388
|
`test-invoice` uses the same checkout route as the order-pay page. It prints the
|
|
293
389
|
amount in sats, the Lightning invoice and the order-pay link, which opens the
|
|
294
|
-
checkout on that invoice.
|
|
390
|
+
checkout on that invoice. It then lists the methods that page offers: Bitcoin
|
|
391
|
+
Lightning, plus each swap asset with its network and whether it is available
|
|
392
|
+
for this amount, with the reason when it is not. A small test order is often
|
|
393
|
+
below a provider's minimum; that is the order's amount, not a fault. Delete the
|
|
394
|
+
test order when you are done.
|
|
295
395
|
|
|
296
396
|
### Checkout and settlement
|
|
297
397
|
|
|
@@ -317,20 +417,20 @@ use that marker to finish it.
|
|
|
317
417
|
While the checkout polls for status, it also asks the PHP engine to check the
|
|
318
418
|
wallet for payments. The engine's shared database gate keeps these checks from
|
|
319
419
|
running too often. Action Scheduler adds a safety net that runs every minute.
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
wp openreceive
|
|
326
|
-
wp openreceive
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
The
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
420
|
+
WP-Cron only runs on page visits, so on a store with little traffic that safety
|
|
421
|
+
net waits for the next visitor. A system cron that runs WordPress scheduled
|
|
422
|
+
work settles those orders sooner. It is a recommendation for the store owner,
|
|
423
|
+
not a setup step.
|
|
424
|
+
|
|
425
|
+
`wp openreceive reconcile` runs one settlement pass and exits.
|
|
426
|
+
`wp openreceive notifications` is an optional long-running worker that settles
|
|
427
|
+
a payment as soon as the wallet reports it; run it under a process manager only
|
|
428
|
+
if you want that. Setup needs neither.
|
|
429
|
+
|
|
430
|
+
The Doctor panel in the gateway settings reports on the schema, whether
|
|
431
|
+
credentials are present, whether each swap provider answers, scheduling, and
|
|
432
|
+
orders that need attention. If the store currency has no usable price feed, the
|
|
433
|
+
gateway is unavailable.
|
|
334
434
|
|
|
335
435
|
### Refunds and removal
|
|
336
436
|
|