feat(sepay): SePay emulator + fix(resend): Svix webhook delivery - #211
Open
xirothedev wants to merge 4 commits into
Open
feat(sepay): SePay emulator + fix(resend): Svix webhook delivery#211xirothedev wants to merge 4 commits into
xirothedev wants to merge 4 commits into
Conversation
- transactions list/details API with bearer auth (userapi wire format) - POST /userapi/simulate/transaction creates a transaction and fans out real-shaped webhooks to seeded targets, recording delivery attempts - zero-dep VietQR PNG generation (/img) with EMVCo TLV + CRC16-CCITT - seed config: api_keys, webhook_targets, bank_accounts, transactions; omitted keys auto-generate via generatedSecrets - registered in CLI/registry/docs; 10 tests
WebhookDispatcher events for resend were dispatched but no subscription
was ever registered, so nothing was delivered.
- seed key resend.webhook_targets: [{ url, signing_secret? }]
- targets register as owner-resend subscriptions on startup
- custom header factory emits svix-id/svix-timestamp/svix-signature
(HMAC-SHA256 over {id}.{timestamp}.{body}, base64, v1,<sig>)
- omitted signing secrets auto-generate as whsec_<base64> via new
prepareSeed/generatedSecrets hook in the registry entry
- tests: live http target asserts headers + signature verification
Contributor
|
@xirothedev is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Combined PR (was #211 + #212). Adds SePay support and fixes Resend webhook delivery; #212 will be closed as folded in.
SePay VietQR payment gateway emulator (new
@emulators/sepay)Stateful SePay emulator for F&B payment flows (VietQR bank transfers):
GET /userapi/transactions/list(+filters) andGET /userapi/transactions/:id— SePay userapi wire format, bearer authPOST /userapi/simulate/transaction— test helper: inserts a transaction and fans out real-shaped webhooks (Authorization: Bearer <target key>) to seeded targets, recording delivery attemptsGET /img//qr/img— VietQR PNG generation (EMVCo TLV + CRC16-CCITT, zero-dep QR + PNG)sepay::api_keys,webhook_targets,bank_accounts,transactions; omitted keys auto-generate viageneratedSecretsResend webhook delivery (fix)
WebhookDispatcher events were dispatched but nothing was subscribed as
resend, so no webhook was ever delivered.resend.webhook_targets: [{ url, signing_secret? }]— registers as owner-resendsubscriptions (idempotent by URL)svix-id,svix-timestamp,svix-signature: v1,<base64 HMAC-SHA256>over{id}.{timestamp}.{body}whsec_<base64>via newprepareSeedhookTest plan
@emulators/sepay: 10/10;@emulators/resend: 25/25 (23 existing + 2 new with live http target + signature verification)turbo run build test lint type-check --filter='./packages/*'— 20/20