Skip to content

Results ​

Starting a payment returns one of five final classes in Laranex\PhpMyanmarPayments\Results, with read-only properties, each implementing PaymentResult. Properties a gateway did not provide are null.

RedirectPayment ​

Returned by $kbz->pwa() and $wave->initiate().

Property / MethodTypeDescription
flow()PaymentFlowPaymentFlow::Redirect
orderIdstringYour order ID, as sent to the gateway
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 $aya->initiate() and $cs->hostedCheckout().

Property / MethodTypeDescription
flow()PaymentFlowPaymentFlow::Form
orderIdstringYour order ID
actionstringThe gateway URL the form posts to
fieldsarray<string, string>The signed hidden fields, name => value, in order. Post them unchanged
enctypestringThe encoding the gateway expects; application/x-www-form-urlencoded unless the gateway needs another (AYA: multipart/form-data)
toHtml(?string $nonce = null)stringA complete, escaped page that submits the form on load. Pass your Content-Security-Policy nonce to add it to the inline <script>; an empty nonce adds none
field($name)?stringOne field's value
values()array<string, string>The fields as an array
autoSubmitUrl?stringLink to a page that renders the form. null unless set with withAutoSubmitUrl()
withAutoSubmitUrl($url)FormPaymentA copy with autoSubmitUrl set

QrPayment ​

Returned by $kbz->qr(), $yoma->initiate() and $yoma->renewQr().

Property / MethodTypeDescription
flow()PaymentFlowPaymentFlow::Qr
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; null when the gateway sets no limit
reference?stringThe gateway's ID for this QR (Yoma refLabel, passed to status(); KBZ prepay_id)
rawarrayThe gateway's response, for logging
qrImageDataUri($mimeType = 'image/png')?stringqrImage as a data URI. null when there is no image

AppPayment ​

Returned by $kbz->app().

Property / MethodTypeDescription
flow()PaymentFlowPaymentFlow::App
orderIdstringYour order ID
orderInfostringThe signed order string the SDK expects
signstringThe signature of orderInfo
signTypestringThe signature algorithm, SHA256
rawarrayThe gateway's response; left out of toArray()
toArray()array<string, string>['orderId', 'orderInfo', 'sign', 'signType'], the values your app needs

MiniAppPayment ​

Returned by $wavePayMiniApp->payment(). No request is sent: pass toArray() or toJson() to your mini app page, which hands it unchanged to WaveJsSDK.paymentModule.makePayment().

Property / MethodTypeDescription
flow()PaymentFlowPaymentFlow::MiniApp
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 ​

A string-backed enum in Laranex\PhpMyanmarPayments\Enums, so $payment->flow()->value is redirect, form, qr, app or mini_app.

CaseValueClass
PaymentFlow::RedirectredirectRedirectPayment
PaymentFlow::FormformFormPayment
PaymentFlow::QrqrQrPayment
PaymentFlow::AppappAppPayment
PaymentFlow::MiniAppmini_appMiniAppPayment

raw values are decoded JSON: numbers keep their exact text as strings, never a float, so json_encode($payment->raw) logs them without rounding.

Every result class takes its properties as named constructor arguments, so you can build one in your own tests, e.g. new RedirectPayment(orderId: 'ORDER_1', url: 'https://…').