Payment status checks for notifications that never arrive
- src/payments/status.js: open checkouts, checkCheckouts and the payment-status job (every 15 min, checkouts 10 min - 3 days old). Found payments are settled exactly as their webhook would be (settlePayment, extracted from the webhook handler: amount check, record, emails). - PayFast: signed API client (alphabetical signature, testing=true in sandbox), findPayments from the transaction history CSV matched on M Payment ID, and testConnection (signed /ping). Verified against a real sandbox account. - Yoco documents no checkout lookup, so its checkouts are "can't check". - Payments -> Reconcile: "Waiting for payment" with Check status / Check all; PayFast card: Test connection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+6
-4
@@ -19,10 +19,8 @@ features is in [FEATURES-ROUND-1.md](./FEATURES-ROUND-1.md).
|
||||
|
||||
## Next up
|
||||
|
||||
1. **1.37.2 — payment status checks** for notifications that never arrive (see the
|
||||
roadmap's payment edge cases).
|
||||
2. **1.38.0–1.39.0 — POPIA toolkit** (spec §3 in the roadmap).
|
||||
3. **1.40.0 + Hub v1** — install/update tooling and the Hope Events Hub (separate repo
|
||||
1. **1.38.0–1.39.0 — POPIA toolkit** (spec §3 in the roadmap).
|
||||
2. **1.40.0 + Hub v1** — install/update tooling and the Hope Events Hub (separate repo
|
||||
`joshua/hope-events-hub`).
|
||||
|
||||
## Working on this repo
|
||||
@@ -94,6 +92,10 @@ features is in [FEATURES-ROUND-1.md](./FEATURES-ROUND-1.md).
|
||||
- `backend/src/payments/webhook.js` — shared webhook processing (Payment with `provider`,
|
||||
donation split, registration status, tickets, emails, `ProviderTransaction`).
|
||||
- `backend/src/payments/checkouts.js` — registration checkouts (balance, part, + donation).
|
||||
- `backend/src/payments/status.js` — status checks for notifications that never arrived
|
||||
(`payment-status` job, Payments → Reconcile → "Waiting for payment"). PayFast looks payments
|
||||
up in its transaction history (`findPayments`); Yoco's Checkout API documents no lookup, so
|
||||
Yoco checkouts are "can't check". Tests: `backend/tests/paymentStatus.test.js`.
|
||||
- **Adding a provider:** write `providers/<id>.js` with the same interface, add it to
|
||||
`PROVIDERS` in `index.js`, mount `handleProviderWebhook('<id>')` at `/api/webhooks/<id>`
|
||||
(`routes/webhookRoutes.js`), and give it a settings card in
|
||||
|
||||
Reference in New Issue
Block a user