-
Notifications
You must be signed in to change notification settings - Fork 0
/
type.go
86 lines (80 loc) · 2.71 KB
/
type.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
84
85
86
package oxapayments
import "io"
type OxaConfig struct {
MerchantApiKey string `json:"merchant"`
TrackID string `json:"trackId"`
Currency string `json:"currency"`
PayCurrency string `json:"payCurrency"`
Lifetime int `json:"lifeTime"`
FeePaidByPayer int `json:"feePaidByPayer"`
UnderPaidCover int64 `json:"underPaidCover"`
CallbackUrl string `json:"callbackUrl"`
ReturnUrl string `json:"returnUrl"`
Description string `json:"description"`
OrderId string `json:"orderId"`
Amount int64 `json:"amount"`
Email string `json:"email"`
}
type OxaReqs struct {
Url string
Body io.Reader
}
type OxaResp struct {
RespInvoice RespInvoice
RespCreatePayment RespCreatePayment
RespPaymentInfo RespPaymentInfo
}
// RespInvoice is struct for Respond API Invoice
type RespInvoice struct {
Result int `json:"result"`
Message string `json:"message"`
TrackID string `json:"trackId"`
ExpiredAt int64 `json:"expiredAt"`
PayLink string `json:"payLink"`
}
type RespCreatePayment struct {
Result int `json:"result"`
Message string `json:"message"`
TrackID string `json:"trackId"`
Amount string `json:"amount"`
Currency string `json:"currency"`
PayAmount string `json:"payAmount"`
PayCurrency string `json:"payCurrency"`
Network string `json:"network"`
Address string `json:"address"`
Rate string `json:"rate"`
ExpiredAt int64 `json:"expiredAt"`
CreatedAt string `json:"createdAt"`
LifeTime int `json:"lifeTime"`
UnderPaidCover int `json:"underPaidCover"`
FeePaidByPayer int `json:"feePaidByPayer"`
OrderID string `json:"orderId"`
Email string `json:"email"`
Description string `json:"description"`
CallbackURL string `json:"callbackUrl"`
QRCode string `json:"QRCode"`
}
type RespPaymentInfo struct {
Result int `json:"result"`
Message string `json:"message"`
TrackID string `json:"trackId"`
Address string `json:"address"`
Amount string `json:"amount"`
Currency string `json:"currency"`
PayAmount string `json:"payAmount"`
PayCurrency string `json:"payCurrency"`
Network string `json:"network"`
FeePaidByPayer int `json:"feePaidByPayer"`
UnderPaidCover int `json:"underPaidCover"`
Status string `json:"status"`
Type string `json:"type"`
TxID string `json:"txID"`
Date string `json:"date"`
PayDate string `json:"payDate"`
Email string `json:"email"`
OrderID string `json:"orderId"`
Description string `json:"description"`
}
type RespPaymentHistory struct {
}
type OxaConfFunc func(*OxaConfig)