Skip to content

PaymentCallback & Status ​

PaymentCallback ​

Returned by every gateway's HandleCallback(), by Manager.HandleCallback() and by AyaPay() → VerifyRedirect(), after the signature has been verified.

Field / MethodTypeDescription
OrderIDstringYour order ID
StatusPaymentStatusThe status mapped onto this package's statuses
GatewayStatusstringThe gateway's own status value, unmapped
GatewayReferencestringThe gateway's ID for the payment
AmountstringThe amount as the gateway sent it
Rawmap[string]anyThe verified payload; JSON numbers are json.Numbers, which keep their exact text
IsSuccessful()boolStatus == StatusSuccessful
AcknowledgementAcknowledgementThe response the gateway expects (Status, Body, Headers)

In Goravel, return payments.Acknowledge(ctx, callback) to send the acknowledgement.

PaymentStatusResult ​

Returned by Status() on KbzPay(), AyaPay() and YomaMmqr().

Field / MethodTypeDescription
OrderIDstringYour order ID. Empty for Yoma MMQR, which only returns the reference
StatusPaymentStatusThe mapped status
GatewayStatusstringThe gateway's own status value
GatewayReferencestringThe gateway's ID for the payment
AmountstringThe amount as the gateway reported it
Rawmap[string]anyThe gateway's response
IsSuccessful()boolStatus == StatusSuccessful

PaymentStatus ​

ConstantValueIsFinal()
myanmarpayments.StatusSuccessfulsuccessfultrue
myanmarpayments.StatusPendingpendingfalse
myanmarpayments.StatusFailedfailedtrue
myanmarpayments.StatusCanceledcanceledtrue
myanmarpayments.StatusExpiredexpiredtrue
myanmarpayments.StatusUnknownunknownfalse

myanmarpayments.PaymentStatuses() lists every status.

Released under the MIT License, except where a package says otherwise.