Browse Source

更新

master
huangjiajun 11 months ago
parent
commit
d6d481cf00
2 changed files with 43 additions and 0 deletions
  1. +21
    -0
      md/alipay.go
  2. +22
    -0
      pay/alipay.go

+ 21
- 0
md/alipay.go View File

@@ -64,6 +64,27 @@ type AlipayFundTransUniTransfer struct {
} `json:"alipay_fund_trans_uni_transfer_response"`
Sign string `json:"sign"`
}
type AlipayFundTransCommonQuery struct {
AlipayFundTransCommonQueryResponse struct {
Code string `json:"code"`
Msg string `json:"msg"`
OrderId string `json:"order_id"`
PayFundOrderId string `json:"pay_fund_order_id"`
OutBizNo string `json:"out_biz_no"`
TransAmount string `json:"trans_amount"`
Status string `json:"status"`
PayDate string `json:"pay_date"`
ArrivalTimeEnd string `json:"arrival_time_end"`
OrderFee string `json:"order_fee"`
ErrorCode string `json:"error_code"`
FailReason string `json:"fail_reason"`
SubOrderErrorCode string `json:"sub_order_error_code"`
SubOrderFailReason string `json:"sub_order_fail_reason"`
SubOrderStatus string `json:"sub_order_status"`
SettleSerialNo string `json:"settle_serial_no"`
} `json:"alipay_fund_trans_common_query_response"`
Sign string `json:"sign"`
}
type ZhimaCreditPayafteruseCreditbizorderFinish struct {
ZhimaCreditPayafteruseCreditbizorderFinishResponse struct {
Code string `json:"code"`


+ 22
- 0
pay/alipay.go View File

@@ -222,6 +222,28 @@ func AlipayFundTransUniTransfer(args map[string]string) (*md.AlipayFundTransUniT
res := bs.(*md.AlipayFundTransUniTransfer)
return res, nil
}
func AlipayFundTransCommonQuery(args map[string]string) (*md.AlipayFundTransCommonQuery, error) {
client := Comm(args)
if client == nil {
return nil, errors.New("获取失败")
}
//请求参数
bm := make(gopay.BodyMap)
bm.SetBodyMap("biz_content", func(bz gopay.BodyMap) {
bz.Set("out_biz_no", args["out_biz_no"])
bz.Set("product_code", args["product_code"])
bz.Set("biz_scene", args["biz_scene"])
})

var aliPsp md.AlipayFundTransCommonQuery
bs, err := PostAliPayAPISelfV2(client, bm, "alipay.fund.trans.common.query", &aliPsp)
if err != nil {
xlog.Error(err)
return nil, err
}
res := bs.(*md.AlipayFundTransCommonQuery)
return res, nil
}

//扣款
func AlipayTradePay(args map[string]string) (*md.AlipayTradePay, error) {


Loading…
Cancel
Save