Repository navigation
fix(core): declare raw text body on checkout/webhook - #125
alexasomba wants to merge 3 commits into
Conversation
…rification Use EmDash request.body text so ctx.input carries the exact payload for HMAC verification. Pass route request metadata through toNativeRoutes. Co-authored-by: Cursor <cursoragent@cursor.com>
Do not import route declaration types from emdash (not exported). Cast PluginRoute entries so optional methods/request are omitted on 0.37. Co-authored-by: Cursor <cursoragent@cursor.com>
Covers toNativeRoutes request metadata, HMAC on raw input, byte mismatch, and consumed-body regression for checkout/webhook. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@cavewebs — when you have time to review this webhook PR: What we validated: On EmDash 1.6 with Why this PR matters: Hosted Paystack/Flutterwave webhooks need exact POST bytes for HMAC. Declaring Tests on this branch: Stacking: This webhook change can merge independently of the following PRs.
Happy to adjust the description or split commits if that helps review. Thanks. |
What does this PR do?
Declares
request: { body: "text", maxBytes: 8MiB }oncheckout/webhookso EmDash passes the exact payload asrouteCtx.inputfor HMAC verification — the supported pattern documented in EmDash guide to webhook body declarations #5182 (api-routes.mdx).Plumbs
methods,request, andresponsethroughtoNativeRoutes()so native plugins register the declaration.Addresses the exact-body portion of EmDash webhook body and native response issue #5181. The native response and cart-cookie contract remains tracked in EmDash native responses and cart cookies #5183 and EmDash 1.7 native checkout compatibility #149.
Type of change
Your connection to this change
Validation
73de73f, including the EmDash compatibility matrix.input.AI assistance disclosure
Screenshots / test output
Not applicable.
Made with Cursor