openreceive 0.4.26 → 0.4.27

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 (PHP)
4
4
 
5
5
  ```sh
6
- # READ THIS FIRST: this file is 42 KB and a summary drops required steps. Download it whole:
6
+ # READ THIS FIRST: this file is 43 KB and a summary drops required steps. Download it whole:
7
7
  curl -fsSL https://openreceive.org/agent-directions/php/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/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.26.
20
+ These directions describe OpenReceive 0.4.27.
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
@@ -737,8 +737,11 @@ foreach (\OpenReceive\Server\Doctor::report(
737
737
  - where the handler is mounted;
738
738
  - the receive-only wallet preflight.
739
739
 
740
- `$engine->doctor()` is the same report for an engine you already built. Put it
741
- behind a `bin/doctor` script. The demo's is twelve lines.
740
+ `$engine->doctor()` is the same report for an engine you already built, but it
741
+ runs the wallet preflight only when you pass the same factory:
742
+ `$engine->doctor(walletCheck: static fn () => \OpenReceive\Server\Service::fromEnvironment())`.
743
+ Without it the preflight line reads `skipped`. Put the report behind a
744
+ `bin/doctor` script. The demo's is twelve lines.
742
745
  → [Doctor](https://openreceive.org/guides/api-reference.md#openreceiveserverdoctor)
743
746
 
744
747
  Then open the checkout in a browser. Confirm the payment-method icons and
@@ -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.26.
20
+ These directions describe OpenReceive 0.4.27.
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
@@ -422,13 +422,16 @@ That is the whole install. `openreceive-rails` depends on `openreceive`,
422
422
  nothing else added. It is built from `NWC_URI`. If your app brings its own NWC
423
423
  client, set `config.nwc_client` instead.
424
424
 
425
- There is one native prerequisite. `nwc-ruby` uses `rbsecp256k1`, which builds
426
- libsecp256k1 from source. Minimal images (`ruby:3.3-slim`, fresh Docker builds)
427
- need the autotools for that, or `bundle install` fails with
428
- `autoreconf: not found`. Install them before bundling:
425
+ Two native builds need system packages. `nwc-ruby` uses `rbsecp256k1`, which
426
+ builds libsecp256k1 from source and needs the autotools; without them
427
+ `bundle install` fails with `autoreconf: not found`. Its connection libraries
428
+ also need a newer `openssl` gem than Ruby ships, and Bundler compiles that gem
429
+ against the OpenSSL headers; without them it fails installing `openssl` at
430
+ `checking for openssl/ssl.h... no`. Minimal images (`ruby:3.3-slim`, fresh
431
+ Docker builds) have neither. Install them before bundling:
429
432
 
430
433
  ```sh
431
- apt-get install -y autoconf automake libtool build-essential pkg-config
434
+ apt-get install -y autoconf automake libtool build-essential pkg-config libssl-dev
432
435
  ```
433
436
 
434
437
  Full Ruby images and typical developer machines already have these.
@@ -616,9 +619,11 @@ settlement transaction, only for the first settled attempt for a reference.
616
619
 
617
620
  The engine's controllers inherit from `config.parent_controller`. The generated
618
621
  initializer sets it to `"ApplicationController"`. That is how the engine picks
619
- up your application's `protect_from_forgery`. Keep `csrf_meta_tags` in the
620
- layout that renders the checkout. The checkout client sends `X-CSRF-Token` from
621
- it automatically.
622
+ up your application's `protect_from_forgery`. The layout that renders the
623
+ checkout needs `<%= csrf_meta_tags %>` in its `<head>`: add it if it is not
624
+ there. The checkout client sends `X-CSRF-Token` from it automatically; without
625
+ it, every checkout answers 403 "Can't verify CSRF token authenticity". Do not
626
+ skip forgery protection for the engine to get past that 403.
622
627
 
623
628
  The same inheritance also brings every global `before_action` that your
624
629
  `ApplicationController` declares. A filter that redirects signed-out users to a