Skip to content
go sdk ,
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore 扫码支付 Dec 26, 2017 Update Dec 26, 2017
payjs.go 扫码支付 Dec 26, 2017

payjs Go版 SDK by trysh

func main() {
    prikey := ``//通信密钥
    mchid := ``商户号
    pj := payjs.New(mchid, prikey)//新建一个引擎
    res, err := pj.CreateTrade(payjs.TradeParam{    //创建一个扫码支付
        Total_fee:    1,    //1分钱
        Out_trade_no: time.Now().Format("test20060102_150405.999999999"),
        Body:         `测试的标题`,
        Notify_url:   ``,
    if err != nil {
        log.Println(`payjs CreateTrade err`, err)
You can’t perform that action at this time.