Documentation ¶
Index ¶
- Constants
- Variables
- func MD5(str string) string
- func Serialized(data any) string
- func SignWithMd5(data any) string
- type PayNotification
- type PayNotificationInternal
- type PayRequest
- type PayRequestInternal
- type PayResponse
- type WithdrawalNotification
- type WithdrawalNotificationInternal
- type WithdrawalRequest
- type WithdrawalRequestInternal
- type WithdrawalResponse
- type WithdrawalResponseInternal
Constants ¶
View Source
const C_pay_url = "https://order.5kj.one/payApi/PayApi/CreateOrder"
View Source
const C_withdrawal_url = "https://order.5kj.one/payApi/PayApi/CreatePayOutOrder"
Variables ¶
View Source
var C_MD5_KEY = "a639a1225e168fc5a95d8f891f81e7d1"
View Source
var C_app_id = 175
View Source
var C_pay_code = 2121
View Source
var C_pay_notice_url = "https://fc5d-221-237-121-3.ngrok-free.app"
View Source
var C_trade_no = 1165
View Source
var C_withdrawal_code = 2122
View Source
var C_withdrawal_notice_url = "https://fc5d-221-237-121-3.ngrok-free.app"
Functions ¶
func Serialized ¶
func SignWithMd5 ¶
Types ¶
type PayNotification ¶
type PayNotification struct { PayNotificationInternal Sign string `json:"sign"` }
func CheckPayNotification ¶
func CheckPayNotification(body []byte) (resp PayNotification, err error)
type PayNotificationInternal ¶
type PayNotificationInternal struct { TradeNo int `json:"trade_no"` Status int `json:"status"` OrderNo string `json:"order_no"` DisOrderNo string `json:"dis_order_no"` OrderPrice int `json:"order_price"` RealPrice int `json:"real_price"` Fee int `json:"fee"` NtiTime int `json:"nti_time"` Payer string `json:"payer"` Attach string `json:"attach"` CreateTime int `json:"create_time"` }
type PayRequest ¶
type PayRequest struct { PayRequestInternal Sign string `json:"sign"` }
type PayRequestInternal ¶
type PayRequestInternal struct { TradeNo int `json:"trade_no"` OrderNo string `json:"order_no"` AppId int `json:"app_id"` PayCode int `json:"pay_code"` Price int `json:"price"` SuccessUrl string `json:"success_url"` FailUrl string `json:"fail_url"` PayNoticeUrl string `json:"pay_notice_url"` PayRemindUrl string `json:"pay_remind_url"` Attach string `json:"attach"` UserIp string `json:"user_ip"` UserId string `json:"user_id"` }
type PayResponse ¶
type WithdrawalNotification ¶
type WithdrawalNotification struct { WithdrawalNotificationInternal Sign string `json:"sign"` }
func CheckWithdrawalNotification ¶
func CheckWithdrawalNotification(body []byte) (resp WithdrawalNotification, err error)
type WithdrawalNotificationInternal ¶
type WithdrawalNotificationInternal struct { TradeNo int `json:"trade_no"` OrderNo string `json:"order_no"` DisOrderNo string `json:"dis_order_no"` Price int `json:"price"` Fee int `json:"fee"` Status int `json:"status"` Remark string `json:"remark"` Attach string `json:"attach"` CreateTime int `json:"create_time"` }
type WithdrawalRequest ¶
type WithdrawalRequest struct { WithdrawalRequestInternal Sign string `json:"sign"` }
type WithdrawalRequestInternal ¶
type WithdrawalRequestInternal struct { TradeNo int `json:"trade_no"` OrderNo string `json:"order_no"` AppId int `json:"app_id"` PayCode int `json:"pay_code"` Price int `json:"price"` AccountType string `json:"account_type"` AccountNo string `json:"account_no"` AccountName string `json:"account_name"` BankCode string `json:"bank_code"` PayNoticeUrl string `json:"pay_notice_url"` Attach string `json:"attach"` }
type WithdrawalResponse ¶
type WithdrawalResponse struct { WithdrawalResponseInternal Sign string `json:"sign"` }
func Withdrawal ¶
func Withdrawal(ordersn, accountNo, accountName, bank string, price int) (resp WithdrawalResponse, err error)
Click to show internal directories.
Click to hide internal directories.