Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BaseOrderId string
BaseOrderId is used to prefix the order id in database for example if the order id is 1, then the order id in midtrans is "something-1"
View Source
var BaseUrlCoreApi string
View Source
var BaseUrlSnap string
View Source
var ServerKey string
View Source
var ServerKeyEncoded string
Functions ¶
func DeleteOrder ¶
func HandleNotifications ¶
Types ¶
type CustomerDetails ¶
type RequestSnap ¶
type RequestSnap struct { TransactionDetails `json:"transaction_details"` ItemDetails []models.CheckoutItem `json:"item_details"` CustomerDetails `json:"customer_details"` Expiry `json:"expiry"` }
RequestSnap basically is a request to midtrans to create a snap page token for payment
func (*RequestSnap) CreatePayment ¶
func (r *RequestSnap) CreatePayment() (ResponseSnap, error)
type ResponseErrorSnap ¶
type ResponseErrorSnap struct {
ErrorMessages []string `json:"error_messages"`
}
type ResponseSnap ¶
type TransactionDetails ¶
type WebhookNotification ¶
type WebhookNotification struct { TransactionStatus string `json:"transaction_status" binding:"required"` StatusCode string `json:"status_code" binding:"required"` SignatureKey string `json:"signature_key" binding:"required"` OrderId string `json:"order_id" binding:"required"` GrossAmount string `json:"gross_amount" binding:"required"` PaymentType string `json:"payment_type" binding:"required"` // FraudStatus isn't available in OTC payment (indomaret, alfamart, etc) FraudStatus string `json:"fraud_status"` }
Click to show internal directories.
Click to hide internal directories.