59 lines
2.0 KiB
Go
59 lines
2.0 KiB
Go
package request
|
|
|
|
import "enaklo-pos-be/internal/entity"
|
|
|
|
type MidtransCallbackRequest struct {
|
|
VANumbers []VANumber `json:"va_numbers"`
|
|
TransactionTime string `json:"transaction_time"`
|
|
TransactionStatus string `json:"transaction_status"`
|
|
TransactionID string `json:"transaction_id"`
|
|
StatusMessage string `json:"status_message"`
|
|
StatusCode string `json:"status_code"`
|
|
SignatureKey string `json:"signature_key"`
|
|
SettlementTime string `json:"settlement_time"`
|
|
PaymentType string `json:"payment_type"`
|
|
OrderID string `json:"order_id"`
|
|
MerchantID string `json:"merchant_id"`
|
|
GrossAmount string `json:"gross_amount"`
|
|
FraudStatus string `json:"fraud_status"`
|
|
ExpiryTime string `json:"expiry_time"`
|
|
Currency string `json:"currency"`
|
|
}
|
|
|
|
type VANumber struct {
|
|
VANumber string `json:"va_number"`
|
|
Bank string `json:"bank"`
|
|
}
|
|
|
|
type MidtransCallbackBank struct {
|
|
Bank string `json:"bank"`
|
|
VaNumber string `json:"va_number"`
|
|
BillerCode string `json:"biller_code"`
|
|
}
|
|
|
|
func (m *MidtransCallbackRequest) ToEntity() *entity.CallbackRequest {
|
|
return &entity.CallbackRequest{
|
|
TransactionID: m.OrderID,
|
|
TransactionStatus: m.TransactionStatus,
|
|
}
|
|
}
|
|
|
|
type LinQuCallback struct {
|
|
Amount int `json:"amount"`
|
|
SerialNumber string `json:"serialnumber"`
|
|
Type string `json:"type"`
|
|
PaymentReff int64 `json:"payment_reff"`
|
|
VaCode string `json:"va_code"`
|
|
PartnerReff string `json:"partner_reff"`
|
|
PartnerReff2 string `json:"partner_reff2"`
|
|
AdditionalFee int `json:"additionalfee"`
|
|
Balance int `json:"balance"`
|
|
CreditBalance int `json:"credit_balance"`
|
|
TransactionTime string `json:"transaction_time"`
|
|
VaNumber string `json:"va_number"`
|
|
CustomerName string `json:"customer_name"`
|
|
Username string `json:"username"`
|
|
Status string `json:"status"`
|
|
Signature string `json:"signature"`
|
|
}
|