Skip to content

Results ​

Starting a payment returns one of five classes in Laranex\PhpMyanmarPayments\Results. All implement PaymentResult and expose flow(): PaymentFlow. raw holds plain PHP values; JSON numbers stay strings with their exact text.

RedirectPayment ​

Returned by kbzPay()->pwa() and wavePay()->initiate().

PropertyTypeDescription
orderIdstringYour order id
urlstringThe gateway page to redirect the customer to
gatewayReference?stringThe gateway's id for this attempt (KBZ prepay_id, Wave transaction_id)
rawarrayThe gateway's response, for logging

FormPayment ​

Returned by ayaPay()->initiate() and cyberSource()->hostedCheckout().

Property / MethodTypeDescription
orderIdstringYour order id
actionstringThe gateway URL the form posts to
fieldsarray<string, string>The signed hidden fields. Post them unchanged
enctypestringThe form encoding the gateway expects
field($name)?stringThe value of one field
values()array<string, string>The fields as an array, e.g. for your own template
autoSubmitUrl?stringLink to the package's auto-submitting page. null when the form route is disabled
withAutoSubmitUrl($url)FormPaymentA copy with autoSubmitUrl set
toHtml(?string $nonce = null)stringA full HTML page that posts the form on load. Pass your Content-Security-Policy nonce to add it to the inline <script>

QrPayment ​

Returned by kbzPay()->qr(), yomaMmqr()->initiate() and yomaMmqr()->renewQr().

Property / MethodTypeDescription
orderIdstringYour order id
qrString?stringA QR payload to encode yourself (KBZ Pay)
qrImage?stringA base64 image to display as is (Yoma MMQR)
expiresAt?DateTimeImmutableWhen the QR stops being payable
reference?stringThe gateway's id for this QR (KBZ prepay_id, Yoma refLabel)
rawarrayThe gateway's response, for logging
qrImageDataUri($mimeType = 'image/png')?stringqrImage as a data URI for <img src>

AppPayment ​

Returned by kbzPay()->app().

Property / MethodTypeDescription
orderIdstringYour order id
orderInfostringThe signed order string the SDK expects
signstringThe signature of orderInfo
signTypestringSHA256
rawarrayThe gateway's response, for logging
toArray()arrayorderId, orderInfo, sign, signType for your mobile app

MiniAppPayment ​

Returned by wavePayMiniApp()->payment(). No request is sent: return toArray() to your mini app page, which passes it unchanged to WaveJsSDK.paymentModule.makePayment().

Property / MethodTypeDescription
orderIdstringYour order id (orderID)
amountAmountThe signed total, in whole kyat
miniAppIdstringThe configured mini app id (miniAppID)
merchantReferenceIdstringYour id for this attempt (merchantRefID)
callbackUrlstringThe signed callback URL (callBackUrl)
hashValuestringThe payload's hash (hashValue)
itemslist<array{name: string, amount: Amount}>The line items
toArray() / jsonSerialize()arrayExactly the makePayment object: amount, miniAppID, merchantRefID, orderID, callBackUrl, hashValue, items (name, amount), amounts as int
toJson()stringThe same object as JSON, amounts as JSON integers with every digit (no PHP_INT_MAX limit)

PaymentFlow ​

CaseValueResult
PaymentFlow::RedirectredirectRedirectPayment
PaymentFlow::FormformFormPayment
PaymentFlow::QrqrQrPayment
PaymentFlow::AppappAppPayment
PaymentFlow::MiniAppmini_appMiniAppPayment