Add terminalId and additionalInfo to DOKU QRIS generation - #441
Conversation
…rate QRIS DOKU's SNAP qr-mpm-generate requires terminalId and an additionalInfo object, neither of which the request body carried, so every generation was rejected. terminalId comes from a new required DOKU_TERMINAL_ID; additionalInfo is always sent as an object and carries the optional postalCode and feeType from DOKU_MERCHANT_POSTAL_CODE and DOKU_QRIS_FEE_TYPE. validityPeriod is derived from the payment's expiry, which already follows DOKU_QRIS_EXPIRY_SECONDS. The stub gateway now rejects a generate call missing any mandatory field, so e2e catches a regression instead of passing on a body DOKU would refuse. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011a51Vvk7CzJnGbiKhDCoZC
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Deployment failed for project gatherloop-order with the following error: Learn More: https://vercel.com/m-nindra-zakas-projects-ae6b8849?upgradeToPro=build-rate-limit |
|
Deployment failed for project gatherloop-pos with the following error: Learn More: https://vercel.com/m-nindra-zakas-projects-ae6b8849?upgradeToPro=build-rate-limit |
|
The two failing checks on There is no fix to port — it clears when the 24-hour window rolls over, or sooner on a plan upgrade. I have no Vercel access from here, so I can't re-run the deployments, and a re-run inside the window would fail identically anyway. GitHub Actions is unaffected: Generated by Claude Code |
Extends the DOKU QRIS payment integration to include
terminalIdandadditionalInfofields in theqr-mpm-generaterequest, as required by the DOKU API.Changes:
Configuration: Added three new environment variables to
Envstruct:DOKU_TERMINAL_ID(required): alphanumeric identifier for the terminal, 3–16 charactersDOKU_MERCHANT_POSTAL_CODE(optional): postal code foradditionalInfo.postalCodeDOKU_QRIS_FEE_TYPE(optional): fee type foradditionalInfo.feeTypeRequest payload: Updated
generateQrisRequestto include:terminalId(mandatory)validityPeriod(optional, derived fromExpiredAtinput)additionalInfoobject (always sent, even when both postal code and fee type are unset)Validation: Made
DOKU_TERMINAL_IDa required configuration field; validation fails if unset.Test coverage: Added tests verifying that
terminalId,validityPeriod, andadditionalInfoare correctly populated in the request; also verified thatadditionalInfois always sent as an object even when empty.Stub server: Updated
dokustubto validate the presence ofterminalIdandadditionalInfoin incoming requests.Documentation: Updated
.env.exampleand PRD to reflect the new required and optional fields.https://claude.ai/code/session_011a51Vvk7CzJnGbiKhDCoZC