Documentation ¶
Index ¶
- type BackBind
- type BackDK
- type Config
- type EncryptCertInfo
- type OrderUndo
- type Pay
- func (u *Pay) BackBind(user *UserInfo, bind *BackBind) error
- func (u *Pay) BackPay(user *UserInfo, dk *BackDK) (UMP, error)
- func (u *Pay) CreateOrderNo() string
- func (u *Pay) EncryptCustomerData(user *UserInfo) (string, error)
- func (u *Pay) EncryptData(data string) (string, error)
- func (u *Pay) QueryPay(query *QueryOrder) (UMP, error)
- func (u *Pay) Receive(post_data []byte) (UMP, error)
- func (u *Pay) SetCallbackUrl(url_str string)
- func (u *Pay) UndoPay(undo *OrderUndo) (UMP, error)
- type QueryOrder
- type SignCertInfo
- type UMP
- type UrlConfig
- type UserInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackBind ¶
type BackBind struct { MerId string `json:"merId"` //商户代码 OrderId string `json:"orderId"` //商户订单号 TxnTime string `json:"txnTime"` //订单发送时间 AccNo string `json:"accNo"` //银行卡号 BindId string `json:"bindId"` //绑定标识号 }
绑定用户卡数据
type BackDK ¶
type BackDK struct { MerId string `json:"merId"` //商户代码 OrderId string `json:"orderId"` //商户订单号 TxnTime string `json:"txnTime"` //订单发送时间 TxnAmt string `json:"txnAmt"` //订单金额 BindId string `json:"bindId"` //绑定标识号 AccNo string `json:"accNo"` //银行卡号 }
绑定用户扣费数据
type Config ¶
type Config struct { SignCertPath string `json:"sign_cert_path" yaml:"sign_cert_path"` //加密证书路径 SignCertPassword string `json:"sign_cert_password" yaml:"sign_cert_password"` //加密证书密码 EncryptCertPath string `json:"encrypt_cert_path" yaml:"encrypt_cert_path"` //敏感信息加密证书路径 MiddleCertPath string `json:"middle_cert_path" yaml:"middle_cert_path"` //验签中级证书路径 RootCertPath string `json:"root_cert_path" yaml:"root_cert_path"` //验签根证书路径 MerId string `json:"mer_id" yaml:"mer_id"` //商户ID }
银联证书配置
type EncryptCertInfo ¶
type EncryptCertInfo struct { Cert *x509.Certificate PublicKey *rsa.PublicKey }
enc 加密证书
type OrderUndo ¶
type OrderUndo struct { MerId string `json:"merId"` //商户代码 OrderId string `json:"orderId"` //商户订单号 TxnTime string `json:"txnTime"` //订单发送时间 TxnAmt string `json:"txnAmt"` //原订单扣费金额 QueryId string `json:"query_id"` //原订单query_id }
退款数据
type Pay ¶
type Pay struct {
// contains filtered or unexported fields
}
银联支付API
func (*Pay) EncryptCustomerData ¶
得到用户信息加密
type QueryOrder ¶
type QueryOrder struct { MerId string `json:"merId"` //商户代码 OrderId string `json:"orderId"` //商户订单号 TxnTime string `json:"txnTime"` //订单发送时间 }
查询数据
type SignCertInfo ¶
type SignCertInfo struct { Cert *x509.Certificate PrivateKey *rsa.PrivateKey }
pkcs 证书信息
type UrlConfig ¶
type UrlConfig struct { FrontTransUrl string `json:"front_trans_url" yaml:"front_trans_url"` //前台调用地址 BackTransUrl string `json:"back_trans_url" yaml:"back_trans_url"` //后台调用地址 SingleQueryUrl string `json:"single_query_url" yaml:"single_query_url"` //单次查询调用地址 BatchTransUrl string `json:"batch_trans_url" yaml:"batch_trans_url"` // FileTransUrl string `json:"file_trans_url" yaml:"file_trans_url"` AppTransUrl string `json:"app_trans_url" yaml:"app_trans_url"` CardTransUrl string `json:"card_trans_url" yaml:"card_trans_url"` CallbackUrl string `json:"callback_url" yaml:"callback_url"` //后台通知调用地址 UndoCallbackUrl string `json:"undo_callback_url" yaml:"undo_callback_url"` //退款通知调用地址 }
银联调用地址配置
Click to show internal directories.
Click to hide internal directories.