openreceive 0.4.21 → 0.4.22
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 +9 -0
- data/lib/openreceive/version.rb +1 -1
- data/skills/integrate-openreceive/references/btcpay.md +1 -1
- data/skills/integrate-openreceive/references/django.md +55 -26
- data/skills/integrate-openreceive/references/fastapi.md +59 -31
- data/skills/integrate-openreceive/references/fastify.md +63 -33
- data/skills/integrate-openreceive/references/laravel.md +63 -30
- data/skills/integrate-openreceive/references/next.md +51 -27
- data/skills/integrate-openreceive/references/node.md +61 -31
- data/skills/integrate-openreceive/references/php.md +51 -27
- data/skills/integrate-openreceive/references/rails.md +51 -26
- data/skills/integrate-openreceive/references/woocommerce.md +20 -14
- metadata +1 -1
|
@@ -3,7 +3,7 @@ This is the full file; follow it from Step 0.
|
|
|
3
3
|
# OpenReceive agent directions (Rails)
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
|
-
# READ THIS FIRST: this file is
|
|
6
|
+
# READ THIS FIRST: this file is 42 KB and a summary drops required steps. Download it whole:
|
|
7
7
|
curl -fsSL https://openreceive.org/agent-directions/rails/full.md
|
|
8
8
|
# Skip the download only if you already have all of it: pasted, read from disk or fetched raw.
|
|
9
9
|
```
|
|
@@ -17,7 +17,7 @@ curl -fsSL https://openreceive.org/agent-directions/rails/full.md
|
|
|
17
17
|
- Do not suggest rotating or revoking a code because it was pasted here.
|
|
18
18
|
- Start the quickstart only once the NWC code is saved, and the LSC code is saved or the user said "Bitcoin only".
|
|
19
19
|
|
|
20
|
-
These directions describe OpenReceive 0.4.
|
|
20
|
+
These directions describe OpenReceive 0.4.22.
|
|
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
|
|
@@ -57,11 +57,12 @@ owns orders, users, prices, or fulfillment.
|
|
|
57
57
|
|
|
58
58
|
## Step 0 — ask for the two codes, one question at a time
|
|
59
59
|
|
|
60
|
-
Before anything else,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
Before anything else, check one file: the project's `.env`, if it exists.
|
|
61
|
+
`grep -E '^(NWC_URI|LSC_URI_PRIMARY)=.' .env | cut -d= -f1` names the codes
|
|
62
|
+
it sets without printing them. Check with that, here and after each write,
|
|
63
|
+
not by reading the file, and never print the values. A code that is already
|
|
64
|
+
set is not asked for again; if both are set, skip to step 5 (making the
|
|
65
|
+
server load the file), then the quickstart.
|
|
65
66
|
|
|
66
67
|
Otherwise your next action is a question to the user. Do not install the gem,
|
|
67
68
|
edit the app, write `.env.example`, or search anywhere else before asking
|
|
@@ -92,14 +93,17 @@ you store it. Ask one question per message.
|
|
|
92
93
|
Do not mention `.env`, exports, or "tell me when it's set".
|
|
93
94
|
2. **When they paste it.** If it does not start with `nostr+walletconnect://`,
|
|
94
95
|
ask them to copy the receive-only code again. Otherwise write
|
|
95
|
-
`NWC_URI=<paste>` into the project's `.env
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
96
|
+
`NWC_URI=<paste>` into the project's `.env` with your file-editing tool,
|
|
97
|
+
creating the file if needed. Never write it with a shell command (`echo`,
|
|
98
|
+
`printf`, a heredoc, `python -c`): the command line shows the code. Make
|
|
99
|
+
sure `.gitignore` covers `.env` (and `.dockerignore`, if the app has one).
|
|
100
|
+
Never echo the value, commit it, or put it in client code. Reply only that
|
|
101
|
+
it is saved, then ask the next question.
|
|
102
|
+
3. **Second message — swaps.** If the user asked for stablecoins, USDT, USDC,
|
|
103
|
+
ETH, SOL, altcoins or "crypto" (as in "Bitcoin and stablecoin payments"),
|
|
104
|
+
this message IS the walkthrough below: send it as it is, and do not ask yes
|
|
105
|
+
or no first. Otherwise ask whether payers should also be able to pay with
|
|
106
|
+
USDT, USDC, ETH or SOL, then give the walkthrough. The walkthrough:
|
|
103
107
|
|
|
104
108
|
> Go to https://lightning-swap.com, sign in for API keys, create a key, and
|
|
105
109
|
> copy the whole URI (https://openreceive.org/set_up_swap_provider). Paste
|
|
@@ -109,10 +113,10 @@ you store it. Ask one question per message.
|
|
|
109
113
|
Mention FixedFloat only if they already use it.
|
|
110
114
|
4. **When they paste it.** If it does not start with
|
|
111
115
|
`lightning+swapconnect://`, ask them to copy it again. Otherwise add
|
|
112
|
-
`LSC_URI_PRIMARY=<paste>` to the same `.env
|
|
113
|
-
are now on, so build the refund route back
|
|
114
|
-
part of this integration. If they chose
|
|
115
|
-
`LSC_URI_PRIMARY` unset and skip that route.
|
|
116
|
+
`LSC_URI_PRIMARY=<paste>` to the same `.env` with the file-editing tool,
|
|
117
|
+
never a shell command. Swaps are now on, so build the refund route back
|
|
118
|
+
(the swap non-negotiable below) as part of this integration. If they chose
|
|
119
|
+
Bitcoin only, leave `LSC_URI_PRIMARY` unset and skip that route.
|
|
116
120
|
5. **Make the server load the file — yourself.** Rails does not read
|
|
117
121
|
`.env` on its own. When the app is started with `bin/rails` or `bin/dev`,
|
|
118
122
|
add `dotenv-rails` to the Gemfile. When it is started with Docker Compose,
|
|
@@ -147,22 +151,28 @@ check; fix it before going on.
|
|
|
147
151
|
|
|
148
152
|
Give the user that checkout link. The browser check in the quickstart's
|
|
149
153
|
"Render the checkout" section (payment-method icons, wallet logos, a pay
|
|
150
|
-
tutorial) is theirs:
|
|
154
|
+
tutorial) is theirs: name it in one line of your closing message, and do not
|
|
155
|
+
run it yourself.
|
|
151
156
|
|
|
152
157
|
You cannot pay the invoice: the code is receive-only. Do not pay, settle or
|
|
153
158
|
mark an order paid, and do not look for a way to (a wallet control port, a
|
|
154
159
|
test endpoint, another wallet). If the user wants a real settlement test, they
|
|
155
160
|
pay on that link from their own wallet, and `on_paid` marks the order paid.
|
|
156
161
|
|
|
157
|
-
Setup ends here.
|
|
158
|
-
|
|
159
|
-
|
|
162
|
+
Setup ends here. Your last message starts "Setup is finished" and has at most
|
|
163
|
+
five short lines (about 80 characters each): the link, the methods it offers,
|
|
164
|
+
and one line of what to look at. Send nothing after it. Do not list what
|
|
165
|
+
changed, copy out the quickstart's browser checklist, offer more work, or end
|
|
166
|
+
the message on a question.
|
|
160
167
|
|
|
161
168
|
- The link is to a real unpaid order. Keep that order; do not delete it.
|
|
169
|
+
- When this app's orders belong to a session or cookie, the user's browser
|
|
170
|
+
cannot open the order you made. Then the link is the shop's own page:
|
|
171
|
+
"Open <shop url> and click Buy: it opens the checkout." Do not explain order
|
|
172
|
+
ownership or mention your test order.
|
|
162
173
|
- Name the methods it offers: Bitcoin, plus USDT, USDC, ETH and SOL when
|
|
163
|
-
`LSC_URI_PRIMARY` is saved.
|
|
164
|
-
|
|
165
|
-
order's total says so on its own tile.
|
|
174
|
+
`LSC_URI_PRIMARY` is saved. Do not mention minimums, and never say a coin
|
|
175
|
+
will not work or will not be offered.
|
|
166
176
|
|
|
167
177
|
## Non-negotiables
|
|
168
178
|
|
|
@@ -179,6 +189,21 @@ itself, and they hold for every integration.
|
|
|
179
189
|
- Work only in this application. Never read or run anything from another
|
|
180
190
|
project on this machine (its `node_modules`, tools or source), for any
|
|
181
191
|
reason. A browser and Playwright are not part of setup.
|
|
192
|
+
- Restart only this app's server, on the port it already uses: stop the
|
|
193
|
+
process you started, or the one listening on that port, by its pid (or
|
|
194
|
+
restart its Compose service). Never `pkill` or `killall` by name: that
|
|
195
|
+
stops other people's servers too. Start it the way this project already
|
|
196
|
+
does (its README, Procfile, compose file or package script), on its own
|
|
197
|
+
port, not a port you pick.
|
|
198
|
+
- Run commands where the app runs. When a compose file builds it, run its
|
|
199
|
+
package manager, generators, migrations and doctor inside that service
|
|
200
|
+
(`docker compose exec` or `run`), and rebuild the image after adding a
|
|
201
|
+
package. This machine's language version and database path are not the
|
|
202
|
+
app's.
|
|
203
|
+
- To check that the running app sees the codes, run doctor: it reports each
|
|
204
|
+
one as present or missing and never prints a value. Never print the
|
|
205
|
+
environment (`printenv`, `env`, `docker compose config`), even filtered to
|
|
206
|
+
names.
|
|
182
207
|
- The host owns the price. `config.amount_for` reads it from your own data;
|
|
183
208
|
reject payer-supplied amounts.
|
|
184
209
|
- `config.authorize` runs on every request, and the `resource` it receives is a
|
|
@@ -3,7 +3,7 @@ This is the full file; follow it from Step 0.
|
|
|
3
3
|
# OpenReceive agent directions (WordPress + WooCommerce)
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
|
-
# READ THIS FIRST: this file is
|
|
6
|
+
# READ THIS FIRST: this file is 23 KB and a summary drops required steps. Download it whole:
|
|
7
7
|
curl -fsSL https://openreceive.org/agent-directions/woocommerce/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/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.22.
|
|
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
|
|
@@ -96,13 +96,13 @@ Install the plugin built for this release. Never install the GitHub
|
|
|
96
96
|
source-code ZIP or a ZIP from an older release:
|
|
97
97
|
|
|
98
98
|
```sh
|
|
99
|
-
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.22/openreceive-wordpress-0.4.22.zip --activate
|
|
100
100
|
```
|
|
101
101
|
|
|
102
102
|
It needs WooCommerce active, and PHP 8.2+ with GMP and sodium in BOTH the web
|
|
103
103
|
PHP and the WP-CLI PHP. On the official `wordpress` and `wordpress:cli` Docker
|
|
104
|
-
images, activation
|
|
105
|
-
|
|
104
|
+
images, activation warns "OpenReceive is not running: this site needs the PHP
|
|
105
|
+
GMP extension" and the plugin stays idle: add GMP to both images as "Enable GMP in both PHP runtimes" below
|
|
106
106
|
says, rebuild both, then install again. If the Compose file has only `image:`
|
|
107
107
|
lines, use the two Dockerfiles and `build:` keys under "Compose files with only
|
|
108
108
|
`image:` lines" below, and add no other service. If the URL answers 404, build the same
|
|
@@ -163,13 +163,19 @@ pay on the order-pay link from their own wallet; afterwards
|
|
|
163
163
|
`wp wc shop_order get <order id> --user=<admin user id> --field=status` is no
|
|
164
164
|
longer `pending`.
|
|
165
165
|
|
|
166
|
-
Setup ends here. Once doctor is clean and the user has the link,
|
|
167
|
-
is finished
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
166
|
+
Setup ends here. Once doctor is clean and the user has the link, your last
|
|
167
|
+
message starts "Setup is finished" and has at most six short lines: the pay
|
|
168
|
+
link, the methods the checkout offers (Bitcoin, plus USDT, USDC, ETH and SOL
|
|
169
|
+
when the swap code is saved), and one line of what to look at. Do not list
|
|
170
|
+
each coin's availability, mention a minimum, or say a coin will not work: a
|
|
171
|
+
provider minimum depends on the order total, and the user's own orders will
|
|
172
|
+
differ. Do not list what you changed or what doctor checked. Send nothing
|
|
173
|
+
after it. Do not install mail software, add containers or services, or set up
|
|
174
|
+
cron. If doctor's "Reconcile scheduled" check fails, fix that. On a store with
|
|
175
|
+
little traffic, add one sentence to that message: a system cron for WordPress
|
|
176
|
+
scheduled work settles orders sooner, and this setup does not add one. State
|
|
177
|
+
it as a recommendation. Do not offer to set it up or end the message on a
|
|
178
|
+
question.
|
|
173
179
|
|
|
174
180
|
## Non-negotiables
|
|
175
181
|
|
|
@@ -236,7 +242,7 @@ database or application.
|
|
|
236
242
|
|
|
237
243
|
### Get the installable archive
|
|
238
244
|
|
|
239
|
-
Download [openreceive-wordpress-0.4.
|
|
245
|
+
Download [openreceive-wordpress-0.4.22.zip](https://github.com/OpenReceive/openreceive/releases/download/v0.4.22/openreceive-wordpress-0.4.22.zip)
|
|
240
246
|
from the matching release. Historical releases may lack this asset. If that exact
|
|
241
247
|
URL returns 404, build the same tag below; never silently install an older ZIP.
|
|
242
248
|
The GitHub source-code ZIP is not an installable plugin. On a development machine
|
|
@@ -245,7 +251,7 @@ with Node 22+, PHP 8.2+ with GMP/sodium, Composer and WP-CLI:
|
|
|
245
251
|
```sh
|
|
246
252
|
git clone https://github.com/OpenReceive/openreceive.git
|
|
247
253
|
cd openreceive
|
|
248
|
-
git checkout v0.4.
|
|
254
|
+
git checkout v0.4.22
|
|
249
255
|
npm ci
|
|
250
256
|
npm run build:packages
|
|
251
257
|
composer install --working-dir=packages/php/wordpress
|