openreceive 0.4.15 → 0.4.16
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 +5 -0
- data/lib/openreceive/version.rb +1 -1
- data/skills/integrate-openreceive/references/btcpay.md +5 -1
- data/skills/integrate-openreceive/references/django.md +20 -13
- data/skills/integrate-openreceive/references/fastapi.md +1 -1
- data/skills/integrate-openreceive/references/fastify.md +1 -1
- data/skills/integrate-openreceive/references/laravel.md +1 -1
- data/skills/integrate-openreceive/references/next.md +1 -1
- data/skills/integrate-openreceive/references/node.md +1 -1
- data/skills/integrate-openreceive/references/php.md +1 -1
- data/skills/integrate-openreceive/references/rails.md +1 -1
- data/skills/integrate-openreceive/references/woocommerce.md +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b6bccc561cfb62ab23269e121a9941b294933ef5d1e0d9f94587112160f5ef7d
|
|
4
|
+
data.tar.gz: ad06d5b3acc767c333aab47b42d92aff0c66cb1ae448cd50be485b3450a1d7f4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aed3a70c5b0ae4fe4d7eb4066324ca4b0bf4dcffd61b39ac1f9e8db39db9341453a6457e6fb534fc268db5de9ee22ec19d5c2e18ad29f1ae5fc2541c9cf2b203
|
|
7
|
+
data.tar.gz: 9b6e40b40e28e11f482011df69f58ca3394ce6a61e6a01f20a1d0d6e0a8cf956dc183491521c9a81c5ea429510fe076515243fc8e0b9fe64cb05f498b152fe6e
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.16 - 2026-10-06
|
|
4
|
+
|
|
5
|
+
Release with the complete 0.4.16 package family and corrected shared agent
|
|
6
|
+
directions. No Ruby runtime changes from 0.4.15.
|
|
7
|
+
|
|
3
8
|
## 0.4.15 - 2026-10-06
|
|
4
9
|
|
|
5
10
|
- Install agent skills with `bin/rails openreceive:skills` (optional
|
data/lib/openreceive/version.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenReceive agent directions (BTCPay Server)
|
|
2
2
|
|
|
3
|
-
These directions describe OpenReceive 0.4.
|
|
3
|
+
These directions describe OpenReceive 0.4.16.
|
|
4
4
|
|
|
5
5
|
Connect a BTCPay Server store to a receive-only NWC wallet with the OpenReceive
|
|
6
6
|
plugin, and optionally let payers pay BTCPay invoices with USDT, USDC, ETH or
|
|
@@ -164,13 +164,17 @@ them to install the plugin for you.
|
|
|
164
164
|
|
|
165
165
|
**1. Open the Plugins menu.** It is the plug icon in the top-right corner.
|
|
166
166
|
|
|
167
|
+
|
|
167
168
|
**2. Click Plugin Directory.**
|
|
168
169
|
|
|
170
|
+
|
|
169
171
|
**3. Search for `openreceive`** and click the **OpenReceive** result.
|
|
170
172
|
|
|
173
|
+
|
|
171
174
|
**4. Click Install in BTCPay Server.** Confirm when prompted, then click
|
|
172
175
|
**Restart now** and wait for BTCPay to come back.
|
|
173
176
|
|
|
177
|
+
|
|
174
178
|
At startup, BTCPay creates the plugin's two tables in its own Postgres
|
|
175
179
|
database: `openreceive_invoices` and `openreceive_swaps`, in the schema
|
|
176
180
|
`BTCPayServer.Plugins.OpenReceive`. Nothing else is created.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenReceive agent directions (Django)
|
|
2
2
|
|
|
3
|
-
These directions describe OpenReceive 0.4.
|
|
3
|
+
These directions describe OpenReceive 0.4.16.
|
|
4
4
|
|
|
5
5
|
Add OpenReceive to a Django project — the app you are already working in. You
|
|
6
6
|
do not need a copy of the OpenReceive source: the Python package is on PyPI
|
|
@@ -366,17 +366,18 @@ Then add the app, point it at a host class, and mount the routes:
|
|
|
366
366
|
INSTALLED_APPS += ["openreceive.django"]
|
|
367
367
|
|
|
368
368
|
OPENRECEIVE = {
|
|
369
|
-
"HOST": "shop.openreceive_host.Host",
|
|
369
|
+
"HOST": "shop.openreceive_host.Host", # the class with the three hooks (generated below)
|
|
370
370
|
"PRICE_CURRENCIES": ["USD"],
|
|
371
|
-
"RATE_LIMITING": False,
|
|
372
|
-
"OPPORTUNISTIC_RECONCILE": True,
|
|
373
|
-
"DATABASE": "default",
|
|
371
|
+
"RATE_LIMITING": False, # True for public web shops (see below)
|
|
372
|
+
"OPPORTUNISTIC_RECONCILE": True, # or {"min_interval_seconds": …}; False only with your own worker
|
|
373
|
+
"DATABASE": "default", # the DATABASES alias that holds the two engine tables
|
|
374
374
|
}
|
|
375
375
|
```
|
|
376
376
|
|
|
377
377
|
```python
|
|
378
378
|
# urls.py
|
|
379
379
|
from django.urls import include, path
|
|
380
|
+
|
|
380
381
|
urlpatterns += [path("openreceive/", include("openreceive.django.urls"))]
|
|
381
382
|
```
|
|
382
383
|
|
|
@@ -420,9 +421,9 @@ The generated host module explains this and shows the guarded transition:
|
|
|
420
421
|
|
|
421
422
|
```python
|
|
422
423
|
def on_paid(self, settlement: PaymentSettlement) -> None:
|
|
423
|
-
claimed = Order.objects.filter(
|
|
424
|
-
|
|
425
|
-
)
|
|
424
|
+
claimed = Order.objects.filter(pk=settlement.reference, state="awaiting_payment").update(
|
|
425
|
+
state="paid", paid_at=datetime.fromtimestamp(settlement.paid_at, tz=UTC)
|
|
426
|
+
)
|
|
426
427
|
if claimed == 0:
|
|
427
428
|
return # someone else already fulfilled it
|
|
428
429
|
|
|
@@ -450,7 +451,9 @@ instead:
|
|
|
450
451
|
|
|
451
452
|
```python
|
|
452
453
|
def on_paid(self, settlement: PaymentSettlement) -> None:
|
|
453
|
-
order =
|
|
454
|
+
order = (
|
|
455
|
+
Order.objects.select_for_update().filter(pk=settlement.reference).first()
|
|
456
|
+
) # SELECT … FOR UPDATE
|
|
454
457
|
if order is None or order.state != "awaiting_payment":
|
|
455
458
|
return
|
|
456
459
|
order.state = "paid"
|
|
@@ -533,8 +536,9 @@ from openreceive.server import HookContext
|
|
|
533
536
|
from openreceive.storage import PaymentSettlement
|
|
534
537
|
|
|
535
538
|
from shop.models import Order # YOUR model — it could be named anything. OpenReceive
|
|
536
|
-
|
|
537
|
-
|
|
539
|
+
# never sees it or touches its table; these hooks are the
|
|
540
|
+
# only bridge between the engine and your data.
|
|
541
|
+
|
|
538
542
|
|
|
539
543
|
class Host:
|
|
540
544
|
# Your policy, called before every checkout/payment/swap request. `context`
|
|
@@ -564,8 +568,11 @@ class Host:
|
|
|
564
568
|
order = Order.objects.filter(pk=reference).first()
|
|
565
569
|
if order is None:
|
|
566
570
|
return None
|
|
567
|
-
return {
|
|
568
|
-
|
|
571
|
+
return {
|
|
572
|
+
"currency": "USD",
|
|
573
|
+
"value": str(order.total),
|
|
574
|
+
"description": f"{order.items.count()} items",
|
|
575
|
+
}
|
|
569
576
|
|
|
570
577
|
# Runs inside the settlement transaction, only for the order's first settled
|
|
571
578
|
# attempt. The WHERE clause is the lock: a second fulfillment path of yours
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenReceive agent directions (FastAPI)
|
|
2
2
|
|
|
3
|
-
These directions describe OpenReceive 0.4.
|
|
3
|
+
These directions describe OpenReceive 0.4.16.
|
|
4
4
|
|
|
5
5
|
Add OpenReceive to a FastAPI application — the app you are already working in.
|
|
6
6
|
You do not need a copy of the OpenReceive source: the engine is on PyPI
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenReceive agent directions (Fastify)
|
|
2
2
|
|
|
3
|
-
These directions describe OpenReceive 0.4.
|
|
3
|
+
These directions describe OpenReceive 0.4.16.
|
|
4
4
|
|
|
5
5
|
Add OpenReceive to a Fastify application — the app you are already working in.
|
|
6
6
|
You do not need a copy of the OpenReceive source: the packages are on npm, and
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenReceive agent directions (Laravel)
|
|
2
2
|
|
|
3
|
-
These directions describe OpenReceive 0.4.
|
|
3
|
+
These directions describe OpenReceive 0.4.16.
|
|
4
4
|
|
|
5
5
|
Add OpenReceive to a Laravel application — the app you are already working in.
|
|
6
6
|
You do not need a copy of the OpenReceive source: the package is on Packagist
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenReceive agent directions (Next.js)
|
|
2
2
|
|
|
3
|
-
These directions describe OpenReceive 0.4.
|
|
3
|
+
These directions describe OpenReceive 0.4.16.
|
|
4
4
|
|
|
5
5
|
Add OpenReceive to a Next.js App Router application — the app you are already
|
|
6
6
|
working in. You do not need a copy of the OpenReceive source: the packages are
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenReceive agent directions (Node.js)
|
|
2
2
|
|
|
3
|
-
These directions describe OpenReceive 0.4.
|
|
3
|
+
These directions describe OpenReceive 0.4.16.
|
|
4
4
|
|
|
5
5
|
Add OpenReceive to a Node application — the app you are already working in. You
|
|
6
6
|
do not need a copy of the OpenReceive source: the packages are on npm, and the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenReceive agent directions (PHP)
|
|
2
2
|
|
|
3
|
-
These directions describe OpenReceive 0.4.
|
|
3
|
+
These directions describe OpenReceive 0.4.16.
|
|
4
4
|
|
|
5
5
|
Add OpenReceive to a PHP application — the app you are already working in. You
|
|
6
6
|
do not need a copy of the OpenReceive source: the engine is on Packagist
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenReceive agent directions (Rails)
|
|
2
2
|
|
|
3
|
-
These directions describe OpenReceive 0.4.
|
|
3
|
+
These directions describe OpenReceive 0.4.16.
|
|
4
4
|
|
|
5
5
|
Add OpenReceive to a Rails application — the app you are already working in. You
|
|
6
6
|
do not need a copy of the OpenReceive source: the gem is on RubyGems, the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenReceive agent directions (WordPress + WooCommerce)
|
|
2
2
|
|
|
3
|
-
These directions describe OpenReceive 0.4.
|
|
3
|
+
These directions describe OpenReceive 0.4.16.
|
|
4
4
|
|
|
5
5
|
Install and configure the OpenReceive gateway in the existing WooCommerce
|
|
6
6
|
store. Preserve its theme, checkout, customer accounts, order model and prices.
|
|
@@ -95,7 +95,7 @@ database or application.
|
|
|
95
95
|
|
|
96
96
|
### Get the installable archive
|
|
97
97
|
|
|
98
|
-
Download [openreceive-wordpress-0.4.
|
|
98
|
+
Download [openreceive-wordpress-0.4.16.zip](https://github.com/OpenReceive/openreceive/releases/download/v0.4.16/openreceive-wordpress-0.4.16.zip)
|
|
99
99
|
from the matching release. Historical releases may lack this asset. If that exact
|
|
100
100
|
URL returns 404, build the same tag below; never silently install an older ZIP.
|
|
101
101
|
The GitHub source-code ZIP is not an installable plugin. On a development machine
|
|
@@ -104,7 +104,7 @@ with Node 22+, PHP 8.2+ with GMP/sodium, Composer and WP-CLI:
|
|
|
104
104
|
```sh
|
|
105
105
|
git clone https://github.com/OpenReceive/openreceive.git
|
|
106
106
|
cd openreceive
|
|
107
|
-
git checkout v0.4.
|
|
107
|
+
git checkout v0.4.16
|
|
108
108
|
npm ci
|
|
109
109
|
npm run build:packages
|
|
110
110
|
composer install --working-dir=packages/php/wordpress
|