-
Notifications
You must be signed in to change notification settings - Fork 0
/
refund.go
54 lines (51 loc) · 2.14 KB
/
refund.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
package oxpay
// RefundParams PaymentLinkParams Creates a PaymentLinkParams object.
//
// Create a pay link ,then return the pay url for browser.
// todo 退款参数
type RefundParams struct {
PaymentMethod string `json:"payment_method"` //card or ewallet
Currency string `json:"currency"`
TradeNo string `json:"tradeNo"`
EType string `json:"eType"`
TotalAmount string `json:"totalAmount"`
OriginalTransactionId string `json:"originalTransactionId"` // paymentintent response`s origTnxId
}
type Refund struct {
APIResource
Header Head `json:"header"`
TransactionId string `json:"transactionId"`
TransactionType string `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"`
SalesAmount string `json:"salesAmount"`
Rrn string `json:"rrn"`
AuthCode string `json:"authCode"`
CardHolderName string `json:"cardHolderName"`
CurrencyCode string `json:"currencyCode"`
ProcessingCode string `json:"processingCode"`
GpsLatitude string `json:"gpsLatitude"`
GpsLongitude string `json:"gpsLongitude"`
ServiceAmount string `json:"serviceAmount"`
ServiceRate string `json:"serviceRate"`
GstAmount string `json:"gstAmount"`
GstRate string `json:"gstRate"`
}
const (
RefundTypeWECHAT string = "77771"
RefundTypeALIPAY string = "77772"
RefundTypeGRABPAY string = "77773"
RefundTypePAYNOW string = "77774"
)