-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpaymentintent.go
67 lines (61 loc) · 2.48 KB
/
paymentintent.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
package oxpay
// Creates a PaymentIntent object.
//
type PaymentIntentParams struct {
PayMethod string `json:"pay_method"`
ID string `json:"id"`
CardToken string `json:"cardtoken"` //card quick pay token
Currency string `json:"currency"`
TransactionId string `json:"transactionId"` //OxPay transaction id
ReferenceNo string `json:"referenceNo"`
TotalAmount string `json:"totalAmount"`
CustomerEmail string `json:"customerEmailAddress"`
CustomerName string `json:"customerName"`
EType string `json:"eType"` // pay channel e.g:wechat=77771
}
type PaymentIntent struct {
APIResource
Header Head `json:"header"`
Data PaymentIntentData `json:"data"`
}
type PaymentIntentData struct {
TransactionId string `json:"transactionId"`
TransactionType int32 `json:"transactionType"`
TransactionState string `json:"transactionState"`
HostResponseDate string `json:"hostResponseDate"`
HostResponseMessage string `json:"hostResponseMessage"`
OrigTnxId string `json:"origTnxId"`
ClientRequestDate string `json:"clientRequestDate"`
GatewayRequestDate string `json:"gatewayRequestDate"`
GatewayResponseDate string `json:"gatewayResponseDate"`
RespCode string `json:"respCode"`
Currency string `json:"currency"`
Stan string `json:"stan"`
ReceiptNumber string `json:"receiptNumber"`
TruncatedPan string `json:"truncatedPan"`
BrandName string `json:"brandName"`
TotalAmount string `json:"totalAmount"`
TotalPage int32 `json:"totalPage"`
CurrentPage int32 `json:"currentPage"`
CallbackType int32 `json:"callbackType"`
SalesAmount string `json:"salesAmount"`
Rrn string `json:"rrn"`
AuthCode string `json:"authCode"`
CardHolderName string `json:"cardHolderName"`
CurrencyCode string `json:"currencyCode"`
GpsLatitude string `json:"gpsLatitude"`
GpsLongitude string `json:"gpsLongitude"`
ServiceAmount string `json:"serviceAmount"`
ServiceRate string `json:"serviceRate"`
GstAmount string `json:"gstAmount"`
GstRate string `json:"gstRate"`
Email string `json:"email"`
Buyer string `json:"buyer"`
}
// Creates a PaymentIntentCancelParams object.
//
// todo 取消订单参数
type PaymentIntentCancelParams struct {
Params `form:"*"`
CancellationReason *string `form:"cancellation_reason"`
}