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.
@@ -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 40 KB and a summary drops required steps. Download it whole:
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.21.
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, look at one file: the project's `.env`, if it exists.
61
- Read it only far enough to see whether `NWC_URI` and `LSC_URI_PRIMARY` are
62
- there and non-empty, and never print the values. A code that is already
63
- set is not asked for again; if both are set, skip to step 5
64
- (making the server load the file), then the quickstart.
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`, creating the file if needed.
96
- Make sure `.gitignore` covers `.env` (and `.dockerignore`, if the app has
97
- one). Never echo the value, commit it, or put it in client code. Reply only
98
- that it is saved, then ask the next question.
99
- 3. **Second message — swaps.** If the user already asked for stablecoins or
100
- altcoins, skip the yes/no and go straight to the walkthrough. Otherwise ask
101
- whether payers should also be able to pay with USDT, USDC, ETH or SOL. The
102
- walkthrough:
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`, without echoing it. Swaps
113
- are now on, so build the refund route back (the swap non-negotiable below) as
114
- part of this integration. If they chose Bitcoin only, leave
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: tell them what to look at, and do not run it yourself.
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. Say "Setup is finished" in one message of at most five
158
- lines, with the link and what to check. Do not list what changed, offer more
159
- work, or end the message on a question.
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. Never say a coin will not work or will not be
164
- offered. Swap minimums apply per order, and a coin whose minimum is above an
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 22 KB and a summary drops required steps. Download it whole:
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.21.
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.21/openreceive-wordpress-0.4.21.zip --activate
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 fails with "OpenReceive requires the PHP sodium and GMP
105
- extensions": add GMP to both images as "Enable GMP in both PHP runtimes" below
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, 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.
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.21.zip](https://github.com/OpenReceive/openreceive/releases/download/v0.4.21/openreceive-wordpress-0.4.21.zip)
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.21
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
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.21
4
+ version: 0.4.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenReceive