pay.sarak-co — Fake Payment Gateway Service

Simulation of Mellat (Behpardakht) and SnappPay for testing app.sarak-co

Mellat (Behpardakht) simulator

SOAP protocol identical to the real bank's pgw service. The browser lands on the payment page with RefId.

MethodPathPurpose
POST/mellat/soap/pgwSOAP: bpPayRequest / bpVerifyRequest / bpSettleRequest / bpReversalRequest
GET/mellat/soap/pgw?wsdlMinimal WSDL with identical method signatures
GET/POST/mellat/startpay?RefId=...Simulated bank payment page
POST/mellat/resolveResolve payment (approved/declined) then POST to callback

SnappPay simulator

REST API matching app.sarak-co's SnapppayController paths under SNAPPPAY_URL.

MethodPathPurpose
POST/api/online/v1/oauth/tokenIssue fake access token (Basic auth)
GET/api/online/offer/v1/eligible?amount=...Installment eligibility (always eligible)
POST/api/online/payment/v1/tokenIssue fake paymentToken + paymentPageUrl
GET/snapppay/pay/{paymentToken}Simulated SnappPay payment page
POST/snapppay/resolveResolve payment (approved/declined) then GET to callback
POST/api/online/payment/v1/verifyVerify a paymentToken
POST/api/online/payment/v1/settleSettle a verified paymentToken
POST/api/online/payment/v1/revertRevert/decline a paymentToken

See README.md for installation, environment variables for app.sarak-co, and the manual test script.