---
url: https://laranex.vercel.app/laravel-myanmar-payments/references/results.md
description: >-
  Property reference for RedirectPayment, FormPayment, QrPayment, AppPayment and
  MiniAppPayment, the result classes returned when a payment is started.
---

# 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 `string`s with their exact text.

## RedirectPayment

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

| Property | Type | Description |
|---|---|---|
| `orderId` | `string` | Your order id |
| `url` | `string` | The gateway page to redirect the customer to |
| `gatewayReference` | `?string` | The gateway's id for this attempt (KBZ `prepay_id`, Wave `transaction_id`) |
| `raw` | `array` | The gateway's response, for logging |

## FormPayment

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

| Property / Method | Type | Description |
|---|---|---|
| `orderId` | `string` | Your order id |
| `action` | `string` | The gateway URL the form posts to |
| `fields` | `array<string, string>` | The signed hidden fields. Post them unchanged |
| `enctype` | `string` | The form encoding the gateway expects |
| `field($name)` | `?string` | The value of one field |
| `values()` | `array<string, string>` | The fields as an array, e.g. for your own template |
| `autoSubmitUrl` | `?string` | Link to the package's auto-submitting page. `null` when the form route is disabled |
| `withAutoSubmitUrl($url)` | `FormPayment` | A copy with `autoSubmitUrl` set |
| `toHtml(?string $nonce = null)` | `string` | A 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 / Method | Type | Description |
|---|---|---|
| `orderId` | `string` | Your order id |
| `qrString` | `?string` | A QR payload to encode yourself (KBZ Pay) |
| `qrImage` | `?string` | A base64 image to display as is (Yoma MMQR) |
| `expiresAt` | `?DateTimeImmutable` | When the QR stops being payable |
| `reference` | `?string` | The gateway's id for this QR (KBZ `prepay_id`, Yoma `refLabel`) |
| `raw` | `array` | The gateway's response, for logging |
| `qrImageDataUri($mimeType = 'image/png')` | `?string` | `qrImage` as a data URI for `<img src>` |

## AppPayment

Returned by `kbzPay()->app()`.

| Property / Method | Type | Description |
|---|---|---|
| `orderId` | `string` | Your order id |
| `orderInfo` | `string` | The signed order string the SDK expects |
| `sign` | `string` | The signature of `orderInfo` |
| `signType` | `string` | `SHA256` |
| `raw` | `array` | The gateway's response, for logging |
| `toArray()` | `array` | `orderId`, `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 / Method | Type | Description |
|---|---|---|
| `orderId` | `string` | Your order id (`orderID`) |
| `amount` | `Amount` | The signed total, in whole kyat |
| `miniAppId` | `string` | The configured mini app id (`miniAppID`) |
| `merchantReferenceId` | `string` | Your id for this attempt (`merchantRefID`) |
| `callbackUrl` | `string` | The signed callback URL (`callBackUrl`) |
| `hashValue` | `string` | The payload's hash (`hashValue`) |
| `items` | `list<array{name: string, amount: Amount}>` | The line items |
| `toArray()` / `jsonSerialize()` | `array` | Exactly the `makePayment` object: `amount`, `miniAppID`, `merchantRefID`, `orderID`, `callBackUrl`, `hashValue`, `items` (`name`, `amount`), amounts as `int` |
| `toJson()` | `string` | The same object as JSON, amounts as JSON integers with every digit (no `PHP_INT_MAX` limit) |

## PaymentFlow

| Case | Value | Result |
|---|---|---|
| `PaymentFlow::Redirect` | `redirect` | `RedirectPayment` |
| `PaymentFlow::Form` | `form` | `FormPayment` |
| `PaymentFlow::Qr` | `qr` | `QrPayment` |
| `PaymentFlow::App` | `app` | `AppPayment` |
| `PaymentFlow::MiniApp` | `mini_app` | `MiniAppPayment` |
