forked from veritrans/go-midtrans
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresponse.go
55 lines (51 loc) · 2.08 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
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"`
}