diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 75495be..c2a7f20 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -17,19 +17,19 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 - - uses: actions/setup-node@v5 + - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5 + - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5 with: node-version: 24 cache: npm - run: npm ci - name: Set up Pages if: github.event_name != 'pull_request' - uses: actions/configure-pages@v6 + uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6 - run: npm run build - name: Upload artifact if: github.event_name != 'pull_request' - uses: actions/upload-pages-artifact@v5 + uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5 with: path: out @@ -45,4 +45,4 @@ jobs: url: ${{ steps.deployment.outputs.page_url }} steps: - id: deployment - uses: actions/deploy-pages@v5 + uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5 diff --git a/app/globals.css b/app/globals.css index ed801ab..9e66d82 100644 --- a/app/globals.css +++ b/app/globals.css @@ -9,7 +9,7 @@ * Identity tokens. * Brand red: the ink of a hand-pressed payment stamp. Warm greys and a warm * near-black carry the page; brass is the one secondary accent. - * The five status colours come from the spec's typed statuses. FAILED uses + * The status colours come from the spec's typed statuses. FAILED uses * rose, not the brand red, so an error never looks like a link or a button. * Text pairs meet WCAG AA in both themes. */ diff --git a/components/landing/features.jsx b/components/landing/features.jsx index 9cd485a..1973364 100644 --- a/components/landing/features.jsx +++ b/components/landing/features.jsx @@ -48,7 +48,7 @@ export function Features() { diff --git a/components/landing/flow-diagram.jsx b/components/landing/flow-diagram.jsx index 937ae8f..b04370d 100644 --- a/components/landing/flow-diagram.jsx +++ b/components/landing/flow-diagram.jsx @@ -7,7 +7,7 @@ const steps = [ { icon: AppWindow, title: 'Your app', text: 'Calls one typed method, for example createOrder.' }, { icon: Package, title: 'Client', text: 'Checks the fields and keeps them in the order you gave.' }, { icon: Stamp, title: 'Signed request', text: 'HS256 digest over every field it sends, with a fresh timestamp.' }, - { icon: Server, title: 'Selcom gateway', text: 'Answers with a result code that becomes one of five statuses.' }, + { icon: Server, title: 'Selcom gateway', text: 'Answers with a result code that becomes one of the typed statuses.' }, { icon: Webhook, title: 'Webhook', text: 'Tells your app that a payment changed. A hint, not proof.' }, { icon: SearchCheck, title: 'Order status', text: 'Confirms the payment and the amount before you fulfil.' } ] diff --git a/components/landing/index.jsx b/components/landing/index.jsx index 96faf37..82bd031 100644 --- a/components/landing/index.jsx +++ b/components/landing/index.jsx @@ -156,7 +156,7 @@ export async function Landing() {
diff --git a/content/clients/java.mdx b/content/clients/java.mdx index c0b4ad8..f91fd13 100644 --- a/content/clients/java.mdx +++ b/content/clients/java.mdx @@ -66,7 +66,7 @@ if (order.status() == Status.SUCCESS) { Result status = client.orderStatus(new Requests.OrderStatus("ORD-1001")); ``` -The environment is required and has no default. Every method returns a `Result` with one of five statuses: `SUCCESS`, `PENDING`, `AMBIGUOUS`, `FAILED` or `NOT_FOUND`. +The environment is required and has no default. Every method returns a `Result` with one of the typed statuses: `SUCCESS`, `PENDING`, `AMBIGUOUS`, `FAILED` or `NOT_FOUND`. The [README](https://github.com/selcom-developers/selcom4j#readme) covers configuration, every operation, error handling, idempotency, webhooks and using each layer on its own. @@ -76,7 +76,7 @@ The client follows the [shared spec](/spec). These pages explain what it does: How every request is signed, with worked examples. - The five typed statuses, idempotency and when to query. + The typed statuses, idempotency and when to query. Verify a delivery, then confirm it with order status. What every client does, in every language. diff --git a/content/clients/laravel.mdx b/content/clients/laravel.mdx index 7a4c35e..856b61b 100644 --- a/content/clients/laravel.mdx +++ b/content/clients/laravel.mdx @@ -70,7 +70,7 @@ The client follows the [shared spec](/spec). These pages explain what it does: How every request is signed, with worked examples. - The five typed statuses, idempotency and when to query. + The typed statuses, idempotency and when to query. Verify a delivery, then confirm it with order status. What every client does, in every language. diff --git a/content/clients/node.mdx b/content/clients/node.mdx index 1fc54e9..a1f3a9a 100644 --- a/content/clients/node.mdx +++ b/content/clients/node.mdx @@ -51,7 +51,7 @@ const push = await selcom.walletPayment({ // push.status is normally "PENDING": the outcome arrives by webhook and is confirmed with orderStatus. ``` -The environment is required and has no default. Every operation returns a result with one of five statuses: `SUCCESS`, `PENDING`, `AMBIGUOUS`, `FAILED` or `NOT_FOUND`. +The environment is required and has no default. Every operation returns a result with one of the typed statuses: `SUCCESS`, `PENDING`, `AMBIGUOUS`, `FAILED` or `NOT_FOUND`. The [README](https://github.com/selcom-developers/selcom-node#readme) covers configuration, every operation, error handling, idempotency, webhooks, signing on its own and replacing the transport. @@ -61,7 +61,7 @@ The client follows the [shared spec](/spec). These pages explain what it does: How every request is signed, with worked examples. - The five typed statuses, idempotency and when to query. + The typed statuses, idempotency and when to query. Verify a delivery, then confirm it with order status. What every client does, in every language. diff --git a/content/clients/php.mdx b/content/clients/php.mdx index c0a6edf..93d477d 100644 --- a/content/clients/php.mdx +++ b/content/clients/php.mdx @@ -77,7 +77,7 @@ The client follows the [shared spec](/spec). These pages explain what it does: How every request is signed, with worked examples. - The five typed statuses, idempotency and when to query. + The typed statuses, idempotency and when to query. Verify a delivery, then confirm it with order status. What every client does, in every language. diff --git a/content/spec/api-v1.mdx b/content/spec/api-v1.mdx index f030d48..985605c 100644 --- a/content/spec/api-v1.mdx +++ b/content/spec/api-v1.mdx @@ -4,7 +4,7 @@ description: The checkout and payout operations covered by v1. # API scope for v1 -Version 1 of the community clients covers checkout and payouts: 16 operations plus the checkout webhook. Everything else on Selcom's developer portal (bank transfers, Selcom Pesa, agent cash-out, virtual cards, C2B collections, international transfers, POS) is out of scope for v1. +Version 1 of the community clients covers checkout and payouts, plus the checkout webhook. Everything else on Selcom's developer portal (bank transfers, Selcom Pesa, agent cash-out, virtual cards, C2B collections, international transfers, POS) is out of scope for v1. This page describes each operation in our own words. Selcom's portal at [https://developers.selcommobile.com/](https://developers.selcommobile.com/) is the authority on the API; where it and this page disagree, the portal wins and this page should be fixed. diff --git a/content/spec/index.mdx b/content/spec/index.mdx index 49be4d8..2a90179 100644 --- a/content/spec/index.mdx +++ b/content/spec/index.mdx @@ -17,8 +17,8 @@ The spec is not affiliated with, endorsed by or supported by Selcom Paytech Ltd. The exact signing algorithm, with worked examples and pitfalls. - Checkout and payouts: 16 operations plus the webhook. - Result codes, the five typed statuses, idempotency. + Checkout and payouts, plus the webhook. + Result codes, the typed statuses, idempotency. Verifying and handling checkout webhooks. What every client must do. @@ -27,8 +27,8 @@ The spec is not affiliated with, endorsed by or supported by Selcom Paytech Ltd. The spec ships test vectors that every client must pass: -- `vectors/signing.json`: 20 signing cases and 11 rejects. -- `vectors/responses/`: 120 response scenarios across the 16 operations, and 15 webhook samples. +- `vectors/signing.json`: signing cases and cases that must be rejected. +- `vectors/responses/`: response scenarios for every operation, and webhook samples. - `tools/`: the Python reference implementation that generates them. All credentials in the vectors are sample values or made up. None of them works against the gateway. diff --git a/content/spec/results.mdx b/content/spec/results.mdx index cb0a4e7..9f01aef 100644 --- a/content/spec/results.mdx +++ b/content/spec/results.mdx @@ -4,7 +4,7 @@ description: Result codes, typed statuses, idempotency and retries. # Results, statuses and retries -Every client turns a gateway response into one of five typed statuses. Getting this wrong costs real money: reading "in progress" or "unknown" as "failed", then trying again under a new ID, pays the same person twice. This page is the rule; `classify()` in `tools/selcom_reference.py` is the executable version, and `vectors/responses/` holds the cases. +Every client turns a gateway response into one of the typed statuses. Getting this wrong costs real money: reading "in progress" or "unknown" as "failed", then trying again under a new ID, pays the same person twice. This page is the rule; `classify()` in `tools/selcom_reference.py` is the executable version, and `vectors/responses/` holds the cases. ## Result codes @@ -34,7 +34,7 @@ The HTTP status does not decide the verdict: business errors come back in the bo | `FAILED` | It did not happen | yes | Report the failure. A new attempt is a new transaction with a new ID, and it is the caller's decision, never the client's | | `NOT_FOUND` | The gateway has no record of the ID | yes, for that query | The only case in which the same ID may be submitted again | -Every client returns these five names, spelled exactly like this, from every operation. +Every client returns these names, spelled exactly like this, from every operation. ## Classification @@ -99,7 +99,7 @@ Every operation returns, at least: | Field | Content | |---|---| -| `status` | One of the five typed statuses | +| `status` | One of the typed statuses | | `resultcode` | The normalised code, or none when there was no verdict | | `result`, `message` | The gateway's text, unchanged | | `reference` | The gateway's reference, when present |