Declined Card
ASecurity```mermaid sequenceDiagram participant Route as route.ts participant Checkout as checkout() participant Inv as inventory.holdInventory participant Gateway as gateway.authorize Route->>Checkout: checkout(cart) Checkout->>Inv: holdInventory(items) Inv-->>Checkout: hold Checkout->>Gateway: authorize(customerId, total) Gateway-->>Checkout: throw CardDeclinedError("insufficient_funds") Checkout->>Inv: releaseInventory(hold) Checkout-->>Route: rethrow CardDeclinedError Route-->>Route: catch → 402 {...
- 17 stars
- 0 votes
- 0 copies
- 0 views
- Added September 25, 2026
Works with
Security analysis
100/100Pro scans all 5 files and shows the line behind each finding
npx -y skills add bendrucker/claude --skill declined-card --agent claude-codeAre you the author of Declined Card?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/bendrucker-declined-card)---
fail: [call-tree]
---
```mermaid
sequenceDiagram
participant Route as route.ts
participant Checkout as checkout()
participant Inv as inventory.holdInventory
participant Gateway as gateway.authorize
Route->>Checkout: checkout(cart)
Checkout->>Inv: holdInventory(items)
Inv-->>Checkout: hold
Checkout->>Gateway: authorize(customerId, total)
Gateway-->>Checkout: throw CardDeclinedError("insufficient_funds")
Checkout->>Inv: releaseInventory(hold)
Checkout-->>Route: rethrow CardDeclinedError
Route-->>Route: catch → 402 {error: "card_declined", reason}
```
Note `capture`/`voidAuthorization`, `awardPoints`, `scheduleShipment`, and `sendReceipt` never run — the throw happens at `authorize`, before any of them (checkout.ts:11).
Files in this skill
- never-run.md
- sonnet-plain.md
- sonnet-skill.md
- success-path.md
Attribution
Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.