Repository navigation
Daraja 3.0 customer payments: Dynamic QR, B2B Express CheckOut, Pull Transactions - #64
Conversation
Also reads a trxDate without a time zone as EAT rather than the host's zone.
|
@claude review |
|
Claude finished @newtonmunene99's task in 24s —— View job Review of #64: Daraja 3.0 customer paymentsI read the Worth checking
Minor
Looks good otherwise: the per-call |
A non-zero or missing acknowledgement code now throws DarajaApiError, like every other method, so a refused push can't be mistaken for a sent one.
…sets all() stops after a page shorter than the first, avoiding the request for an empty page that Daraja may answer with HTTP 500. A trxDate offset without a colon is rewritten to +hh:mm before parsing.
Adds three Daraja 3.0 products. None of them needs an initiator.
mpesa.qr.generatereturns a QR code as a base64 PNG.mpesa.b2b.expressCheckoutsends a USSD prompt to a merchant's till to pay your paybill. The newparseExpressCheckoutCallbackreads its result.mpesa.pullTransactions.register,queryandall. They list the last 48 hours of C2B payments to a shortcode.allis an async iterator over every page.Transport:
ctx.posttakes an optional per-callsuccessrule forResponseCode. Pull Transactions uses it to accept1000and1001. The default is still all zeros, so the existing APIs are unchanged.Sandbox runs
ResponseCode"00"with no request ID.401. Pull Transactions register and query were refused with401.001. In each case the token worked for QR, so the sandbox app most likely lacks these products.Docs: new pages for Dynamic QR and Pull Transactions, and an Express CheckOut section on the B2B page. Also updated: the sidebar, README, exports reference, callbacks, limits, errors, configuration, certificates and migration pages.
Changeset: minor. Together with the disbursements changeset, the next release is
4.0.0-alpha.1.Checks:
vp check,vp test(476 tests),vp pack,test:dist,lint:pkganddocs:buildall pass.