@openreceive/angular 0.4.14 → 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.
- package/README.md +11 -0
- package/dist/README.md +11 -0
- package/dist/fesm2022/openreceive-angular-checkout-component.mjs +8 -1
- package/dist/fesm2022/openreceive-angular-checkout-component.mjs.map +1 -1
- package/dist/types/openreceive-angular-checkout-component.d.ts +2 -1
- package/package.json +3 -4
- package/skills/debug-openreceive-payment/SKILL.md +0 -97
- package/skills/integrate-openreceive/SKILL.md +0 -139
- package/skills/integrate-openreceive/references/btcpay.md +0 -224
- package/skills/integrate-openreceive/references/django.md +0 -745
- package/skills/integrate-openreceive/references/fastapi.md +0 -619
- package/skills/integrate-openreceive/references/fastify.md +0 -615
- package/skills/integrate-openreceive/references/laravel.md +0 -749
- package/skills/integrate-openreceive/references/next.md +0 -660
- package/skills/integrate-openreceive/references/node.md +0 -588
- package/skills/integrate-openreceive/references/php.md +0 -682
- package/skills/integrate-openreceive/references/rails.md +0 -698
- package/skills/integrate-openreceive/references/woocommerce.md +0 -193
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
# OpenReceive agent directions (WordPress + WooCommerce)
|
|
2
|
-
|
|
3
|
-
These directions describe OpenReceive 0.4.14.
|
|
4
|
-
|
|
5
|
-
Install and configure the OpenReceive gateway in the existing WooCommerce
|
|
6
|
-
store. Preserve its theme, checkout, customer accounts, order model and prices.
|
|
7
|
-
The plugin bundles the PHP engine and checkout assets; the merchant does not
|
|
8
|
-
install npm or Composer packages on the WordPress server.
|
|
9
|
-
|
|
10
|
-
## Step 0 — inspect configuration
|
|
11
|
-
|
|
12
|
-
Check WordPress, WooCommerce and PHP versions, GMP and sodium availability,
|
|
13
|
-
whether the plugin is installed, and whether the Doctor panel reports the
|
|
14
|
-
receive-only NWC credential as set. Never display its value. For a real store,
|
|
15
|
-
ask the merchant to configure a receive-only wallet if none is available.
|
|
16
|
-
For repository development, use the Docker demo's explicit testkit override.
|
|
17
|
-
|
|
18
|
-
Upload a built plugin archive, not a zip of the source directory. The plugin
|
|
19
|
-
has not yet been accepted into the WordPress.org directory. Configuration and
|
|
20
|
-
the complete quickstart follow below.
|
|
21
|
-
|
|
22
|
-
The plugin owns only its payment-attempt tables in the WordPress database.
|
|
23
|
-
WooCommerce owns orders, totals, stock and email. Do not add an external
|
|
24
|
-
idempotency store, payment database, browser wallet credentials or custom
|
|
25
|
-
fulfillment implementation. Guest return links use WooCommerce's order key;
|
|
26
|
-
the plugin verifies it before issuing an expiring order-bound cookie.
|
|
27
|
-
|
|
28
|
-
Run `wp openreceive doctor` after configuration. Use the documented scheduled
|
|
29
|
-
reconciliation or optional notifications command for offline settlement.
|
|
30
|
-
Manual merchant refunds and provider-managed payer swap refunds are separate
|
|
31
|
-
flows; a receive-only NWC wallet cannot send payments.
|
|
32
|
-
|
|
33
|
-
## Further reading
|
|
34
|
-
|
|
35
|
-
- [Express Quickstart (Node)](https://openreceive.org/guides/quickstart-node.md)
|
|
36
|
-
- [Fastify Quickstart](https://openreceive.org/guides/quickstart-fastify.md)
|
|
37
|
-
- [FastAPI Quickstart](https://openreceive.org/guides/quickstart-fastapi.md)
|
|
38
|
-
- [Django Quickstart](https://openreceive.org/guides/quickstart-django.md)
|
|
39
|
-
- [Next.js Quickstart](https://openreceive.org/guides/quickstart-next.md)
|
|
40
|
-
- [Rails Quickstart](https://openreceive.org/guides/quickstart-rails.md)
|
|
41
|
-
- [PHP Quickstart (plain PHP)](https://openreceive.org/guides/quickstart-php.md)
|
|
42
|
-
- [Laravel Quickstart](https://openreceive.org/guides/quickstart-laravel.md)
|
|
43
|
-
- [BTCPay Server Quickstart](https://openreceive.org/guides/quickstart-btcpay.md)
|
|
44
|
-
- [BTCPay Plugin Reference](https://openreceive.org/guides/btcpay-reference.md)
|
|
45
|
-
- [Node ORM Recipes](https://openreceive.org/guides/node-orms.md)
|
|
46
|
-
- [Authorization](https://openreceive.org/guides/authorization.md)
|
|
47
|
-
- [Rate Limiting](https://openreceive.org/guides/rate-limiting.md)
|
|
48
|
-
- [Frontend Checkout](https://openreceive.org/guides/frontend-checkout.md)
|
|
49
|
-
- [Checkout UX](https://openreceive.org/guides/checkout-ux.md)
|
|
50
|
-
- [Headless Checkout](https://openreceive.org/guides/headless-checkout.md)
|
|
51
|
-
- [Automated Swaps](https://openreceive.org/guides/automated-swaps.md)
|
|
52
|
-
- [Swap Refunds](https://openreceive.org/guides/swap-refunds.md)
|
|
53
|
-
- [Lightning Swap Connect URI](https://openreceive.org/guides/lightning-swap-connect.md)
|
|
54
|
-
- [Environment Variables](https://openreceive.org/guides/environment-variables.md)
|
|
55
|
-
- [Payment Storage](https://openreceive.org/guides/storage.md)
|
|
56
|
-
- [Deploying OpenReceive](https://openreceive.org/guides/deploying.md)
|
|
57
|
-
- [Testing Your OpenReceive Integration](https://openreceive.org/guides/host-testing.md)
|
|
58
|
-
- [API Reference](https://openreceive.org/guides/api-reference.md)
|
|
59
|
-
- [Security](https://openreceive.org/guides/security.md)
|
|
60
|
-
- [Provider Registry](https://openreceive.org/guides/provider-registry.md)
|
|
61
|
-
- [Price Feeds](https://openreceive.org/guides/price-feeds.md)
|
|
62
|
-
- [React Material UI Recipe](https://openreceive.org/guides/react-material-ui-recipe.md)
|
|
63
|
-
- [Flask Recipe](https://openreceive.org/guides/flask-recipe.md)
|
|
64
|
-
- [Writing Your Own Checkout Route](https://openreceive.org/guides/custom-checkout-route.md)
|
|
65
|
-
- [Agent Directions: Node.js](https://openreceive.org/guides/agent-directions-node.md)
|
|
66
|
-
- [Agent Directions: Fastify](https://openreceive.org/guides/agent-directions-fastify.md)
|
|
67
|
-
- [Agent Directions: FastAPI](https://openreceive.org/guides/agent-directions-fastapi.md)
|
|
68
|
-
- [Agent Directions: Django](https://openreceive.org/guides/agent-directions-django.md)
|
|
69
|
-
- [Agent Directions: Next.js](https://openreceive.org/guides/agent-directions-next.md)
|
|
70
|
-
- [Agent Directions: Rails](https://openreceive.org/guides/agent-directions-rails.md)
|
|
71
|
-
- [Agent Directions: PHP](https://openreceive.org/guides/agent-directions-php.md)
|
|
72
|
-
- [Agent Directions: Laravel](https://openreceive.org/guides/agent-directions-laravel.md)
|
|
73
|
-
- [Agent Directions: BTCPay Server](https://openreceive.org/guides/agent-directions-btcpay.md)
|
|
74
|
-
- [WordPress + WooCommerce Quickstart](https://openreceive.org/guides/quickstart-woocommerce.md)
|
|
75
|
-
|
|
76
|
-
- https://openreceive.org/guides/payment-safety-upgrade.md — coordinated upgrades and reviewed repair of existing attempts
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
## The quickstart, in full
|
|
81
|
-
|
|
82
|
-
Inlined verbatim so this file needs no network access — follow it once Step 0
|
|
83
|
-
passes. The page it comes from is https://openreceive.org/guides/quickstart-woocommerce.
|
|
84
|
-
|
|
85
|
-
## WordPress + WooCommerce quickstart
|
|
86
|
-
|
|
87
|
-
Activate WooCommerce first. Then install the built OpenReceive plugin zip
|
|
88
|
-
through **Plugins → Add New → Upload Plugin**. You cannot upload the source
|
|
89
|
-
directory as-is. It needs a build first. The plugin is not yet submitted to
|
|
90
|
-
WordPress.org.
|
|
91
|
-
|
|
92
|
-
Requirements: WordPress 6.6+, WooCommerce 9+, 64-bit PHP 8.2+ with GMP and sodium,
|
|
93
|
-
and MySQL 8 or MariaDB 10.5+. When you activate the plugin, it creates tables for
|
|
94
|
-
payment attempts in your existing WordPress database. You do not need a separate
|
|
95
|
-
database or application.
|
|
96
|
-
|
|
97
|
-
### Get the installable archive
|
|
98
|
-
|
|
99
|
-
If the [OpenReceive GitHub release](https://github.com/OpenReceive/openreceive/releases)
|
|
100
|
-
you picked lists `openreceive-wordpress-<version>.zip`, use that file. The GitHub
|
|
101
|
-
source-code zip is not the plugin archive. If the release has no built zip yet,
|
|
102
|
-
build one on a development machine with Node 22+, PHP 8.2+, Composer and WP-CLI:
|
|
103
|
-
|
|
104
|
-
```sh
|
|
105
|
-
git clone https://github.com/OpenReceive/openreceive.git
|
|
106
|
-
cd openreceive
|
|
107
|
-
git checkout <release-tag>
|
|
108
|
-
npm ci
|
|
109
|
-
npm run build:packages
|
|
110
|
-
composer install --working-dir=packages/php/wordpress
|
|
111
|
-
npm run release:wordpress:build
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
Upload the resulting `dist/openreceive-wordpress-<version>.zip`. The build
|
|
115
|
-
needs WP-CLI on `PATH`. Otherwise, set `OPENRECEIVE_WP_CLI` to the absolute path
|
|
116
|
-
of its phar. Your WordPress server needs neither Node nor Composer. The built
|
|
117
|
-
plugin already bundles its dependencies and checkout assets.
|
|
118
|
-
|
|
119
|
-
### Configure the wallet
|
|
120
|
-
|
|
121
|
-
1. Open **WooCommerce → Settings → Payments → OpenReceive**.
|
|
122
|
-
2. Enter a receive-only NWC code and save.
|
|
123
|
-
3. Enable the gateway.
|
|
124
|
-
|
|
125
|
-
When you save, the plugin checks that the wallet can receive. It refuses to save
|
|
126
|
-
a wallet that can spend, unless you set the explicit override. The password
|
|
127
|
-
fields never show saved credentials. The plugin encrypts these values with keys
|
|
128
|
-
derived from WordPress's authentication keys. If you change those keys, enter
|
|
129
|
-
the values again.
|
|
130
|
-
|
|
131
|
-
For managed deployments, set `OPENRECEIVE_NWC_URI` in `wp-config.php` from your
|
|
132
|
-
server's secret environment. It overrides the settings field. To configure swap
|
|
133
|
-
providers, you can also set the `OPENRECEIVE_LSC_URI_PRIMARY` and
|
|
134
|
-
`OPENRECEIVE_LSC_URI_BACKUP` constants. Never put these values in browser code
|
|
135
|
-
or logs.
|
|
136
|
-
|
|
137
|
-
### Checkout and settlement
|
|
138
|
-
|
|
139
|
-
Both WooCommerce checkout blocks and classic checkout send the customer to the
|
|
140
|
-
order-pay page. There, the plugin reads the amount from `WC_Order` and serves
|
|
141
|
-
the bundled checkout. It lets the customer in through one of:
|
|
142
|
-
|
|
143
|
-
- their account
|
|
144
|
-
- their checkout session
|
|
145
|
-
- an expiring signed cookie, issued after it verifies the order-pay key
|
|
146
|
-
|
|
147
|
-
Keep that order-pay URL available. Customers use it to return to a pending
|
|
148
|
-
payment or a swap refund. The plugin checks that each requested payment hash
|
|
149
|
-
belongs to the order.
|
|
150
|
-
|
|
151
|
-
The plugin saves each payment attempt before it shows invoice instructions. It
|
|
152
|
-
records settlement exactly once, inside the payment's database transaction.
|
|
153
|
-
WooCommerce's `payment_complete` then handles order status, stock and emails.
|
|
154
|
-
The plugin also keeps a durable marker on the order. If something interrupts the
|
|
155
|
-
step between settlement and order completion, later requests and scheduled runs
|
|
156
|
-
use that marker to finish it.
|
|
157
|
-
|
|
158
|
-
While the checkout polls for status, it also asks the PHP engine to check the
|
|
159
|
-
wallet for payments. The engine's shared database gate keeps these checks from
|
|
160
|
-
running too often. Action Scheduler adds a safety net that runs every minute.
|
|
161
|
-
On stores with little traffic, set up a system cron to run WordPress scheduled
|
|
162
|
-
work. WP-Cron only runs on page visits, so on its own it cannot guarantee
|
|
163
|
-
prompt settlement. You can also run these commands under a process manager:
|
|
164
|
-
|
|
165
|
-
```sh
|
|
166
|
-
wp openreceive doctor
|
|
167
|
-
wp openreceive reconcile
|
|
168
|
-
wp openreceive notifications
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
The notifications command runs as a separate process. The Doctor panel in the
|
|
172
|
-
gateway settings reports on the schema, whether credentials are present,
|
|
173
|
-
scheduling, and orders that need attention. If the store currency has no usable
|
|
174
|
-
price feed, the gateway is unavailable.
|
|
175
|
-
|
|
176
|
-
### Refunds and removal
|
|
177
|
-
|
|
178
|
-
The receive-only wallet cannot send merchant refunds. Send those yourself from
|
|
179
|
-
your wallet. Payer swap refunds go through the configured provider, on the same
|
|
180
|
-
authorized order-pay page. If you turn on LSC payments, you commit to keeping
|
|
181
|
-
that recovery path available. See [swap refunds](https://openreceive.org/guides/swap-refunds.md).
|
|
182
|
-
|
|
183
|
-
Deactivating the plugin keeps payment records. Deleting the plugin drops its two
|
|
184
|
-
tables only if **Remove data on uninstall** was enabled. WooCommerce orders are
|
|
185
|
-
always kept.
|
|
186
|
-
|
|
187
|
-
### Local example
|
|
188
|
-
|
|
189
|
-
The repository's `examples/wordpress` Docker stack builds the plugin. It fills
|
|
190
|
-
WooCommerce with products from the shared button catalog. Run
|
|
191
|
-
`npm run demo wordpress` to use a real wallet. For a throwaway shop with a fake
|
|
192
|
-
wallet, use the stack's documented `compose.testkit.yml` override. No testkit
|
|
193
|
-
routes are registered by default.
|