forked from veritrans/go-midtrans
-
Notifications
You must be signed in to change notification settings - Fork 1
/
response.go
83 lines (75 loc) · 2.85 KB
/
response.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
package midtrans
// VANumber : bank virtual account number
type VANumber struct {
Bank string `json:"bank"`
VANumber string `json:"va_number"`
}
// Action represents response action
type Action struct {
Name string `json:"name"`
Method string `json:"method"`
URL string `json:"url"`
}
// Response after calling the API
type Response struct {
StatusCode string `json:"status_code"`
StatusMessage string `json:"status_message"`
PermataVaNumber string `json:"permata_va_number"`
SignKey string `json:"signature_key"`
CardToken string `json:"token_id"`
SavedCardToken string `json:"saved_token_id"`
SavedTokenExpAt string `json:"saved_token_id_expired_at"`
SecureToken bool `json:"secure_token"`
Bank string `json:"bank"`
BillerCode string `json:"biller_code"`
BillKey string `json:"bill_key"`
XlTunaiOrderID string `json:"xl_tunai_order_id"`
BIIVaNumber string `json:"bii_va_number"`
ReURL string `json:"redirect_url"`
ECI string `json:"eci"`
ValMessages []string `json:"validation_messages"`
Page int `json:"page"`
TotalPage int `json:"total_page"`
TotalRecord int `json:"total_record"`
FraudStatus string `json:"fraud_status"`
PaymentType string `json:"payment_type"`
OrderID string `json:"order_id"`
TransactionID string `json:"transaction_id"`
TransactionTime string `json:"transaction_time"`
TransactionStatus string `json:"transaction_status"`
GrossAmount string `json:"gross_amount"`
VANumbers []VANumber `json:"va_numbers"`
PaymentCode string `json:"payment_code"`
Actions []Action `json:"actions"`
}
// SnapResponse : Response after calling the Snap API
type SnapResponse struct {
StatusCode string `json:"status_code"`
Token string `json:"token"`
RedirectURL string `json:"redirect_url"`
ErrorMessages []string `json:"error_messages"`
}
// Beneficiaries : Response after calling the Beneficiaries API
type Beneficiaries struct {
Name string `json:"name"`
Bank string `json:"bank"`
Account string `json:"account"`
AliasName string `json:"alias_name"`
Email string `json:"email"`
}
// ValidateBankAcount : Response for BankAcount
type ValidateBankAcount struct {
AccountName string `json:"account_name"`
AccountNo string `json:"account_no"`
BankName string `json:"bank_name"`
ReffNumber string `json:"retrieval_reff_num"`
}
// Payout : Response for Payouts
type Payout struct {
Payouts []PayoutDetailsResponse `json:"payouts"`
}
// PayoutDetailsResponse : Detail Response Payout
type PayoutDetailsResponse struct {
Status string `json:"status"`
ReferenceNo string `json:"reference_no"`
}