印度包网
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

126 lines
5.0 KiB

package igeekpay
const (
payURL = "/collect/v1/order"
withdrawURL = "/payout/v1/brl"
)
type PayReq struct {
Version string `json:"version,omitempty"`
BizType string `json:"bizType,omitempty"`
AppId string `json:"appId,omitempty"`
OrderNo string `json:"orderNo,omitempty"`
ProductCode string `json:"productCode,omitempty"`
Currency string `json:"currency,omitempty"`
Amount float64 `json:"amount,omitempty"`
// PaymentDetail PaymentDetail `json:"paymentDetail,omitempty"`
ProductName string `json:"productName,omitempty"`
ProductDesc string `json:"productDesc,omitempty"`
PaymentDetail PaymentDetail `json:"paymentDetail,omitempty"`
UserDetail UserDetail `json:"userDetail,omitempty"`
FrontCallUrl string `json:"frontCallUrl,omitempty"`
BackCallUrl string `json:"backCallUrl,omitempty"`
Lang string `json:"lang,omitempty"`
AttachField string `json:"attachField,omitempty"`
Sign string `json:"sign"`
}
type PaymentDetail struct {
PayMode string `json:"payMode,omitempty"` // 支付模式 UPI/IMPS/WALLET
// AccountNo string `json:"accountNo,omitempty"` // 支付账户
// BankIfsc string `json:"bankIfsc,omitempty"` // 银行ifsc编码
}
type UserDetail struct {
ID string `json:"id,omitempty"` // 用户uid
Name string `json:"name,omitempty"` // 名字
Mobile string `json:"mobile,omitempty"` // 手机号
Email string `json:"email,omitempty"` // 邮箱
Address string `json:"address,omitempty"` // 地址
IP string `json:"ip,omitempty"`
DeviceId string `json:"deviceId,omitempty"`
CpfNumber string `json:"cpfNumber,omitempty"`
}
type PayResp struct {
Status int `json:"status,omitempty"`
Rel bool `json:"rel,omitempty"`
Data struct {
TradeNo string `json:"tradeNo,omitempty"`
OrderNo string `json:"orderNo,omitempty"`
ApplicationId string `json:"applicationId,omitempty"` // 商户appid
CashierUrl string `json:"cashierUrl,omitempty"` // 支付地址
Sign string `json:"sign,omitempty"`
} `json:"data"`
Message string `json:"message"`
}
type PayCallbackReq struct {
MerchantId string `json:"merchantId,omitempty"`
ApplicationId string `json:"applicationId,omitempty"`
TradeNo string `json:"tradeNo,omitempty"`
OrderNo string `json:"orderNo,omitempty"`
PayStatus string `json:"payStatus,omitempty"`
Amount float64 `json:"amount,omitempty"`
Currency string `json:"currency,omitempty"`
PayAmount float64 `json:"payAmount,omitempty"`
ServiceFee float64 `json:"serviceFee,omitempty"`
FailMessage string `json:"failMessage,omitempty"`
PayCurrency string `json:"payCurrency,omitempty"`
PayTime string `json:"payTime,omitempty"`
PayTimestamp int64 `json:"payTimestamp,omitempty"`
Attach string `json:"attach,omitempty"`
Sign string `json:"sign"`
}
type WithdrawReq struct {
Version string `json:"version,omitempty"`
BizType string `json:"bizType,omitempty"`
AppId string `json:"appId,omitempty"`
OrderNo string `json:"orderNo,omitempty"`
ProductCode string `json:"productCode,omitempty"`
Currency string `json:"currency,omitempty"`
Amount float64 `json:"amount,omitempty"`
PayMode string `json:"payMode,omitempty"` // PIX
PayeeName string `json:"payeeName,omitempty"`
IDType string `json:"idType,omitempty"`
IDNumber string `json:"idNumber,omitempty"`
PayeeMobile string `json:"payeeMobile,omitempty"`
UserId string `json:"userId,omitempty"`
PayeeEmail string `json:"payeeEmail,omitempty"`
CpfNumber string `json:"cpfNumber,omitempty"`
PayeeAddress string `json:"payeeAddress,omitempty"`
BackCallUrl string `json:"backCallUrl,omitempty"`
// AttachField string `json:"attachField,omitempty"`
Sign string `json:"sign"`
}
type WithdrawResp struct {
Status int `json:"status,omitempty"`
Rel bool `json:"rel,omitempty"`
Data struct {
ApplicationId string `json:"applicationId,omitempty"`
TradeNo string `json:"tradeNo,omitempty"`
OrderNo string `json:"orderNo,omitempty"`
Sign string `json:"sign,omitempty"`
} `json:"data,omitempty"`
Message string `json:"message,omitempty"`
}
type WithdrawCallbackReq struct {
MerchantId string `json:"merchantId,omitempty"`
ApplicationId string `json:"applicationId,omitempty"`
TradeNo string `json:"tradeNo,omitempty"`
OrderNo string `json:"orderNo,omitempty"`
PayStatus string `json:"payStatus,omitempty"`
Amount float64 `json:"amount,omitempty"`
Currency string `json:"currency,omitempty"`
PayAmount float64 `json:"payAmount,omitempty"`
ServiceFee float64 `json:"serviceFee,omitempty"`
FailMessage string `json:"failMessage,omitempty"`
PayCurrency string `json:"payCurrency,omitempty"`
PayTime string `json:"payTime,omitempty"`
PayTimestamp int64 `json:"payTimestamp,omitempty"`
Attach string `json:"attach,omitempty"`
Sign string `json:"sign"`
}