1
This commit is contained in:
@@ -97,11 +97,12 @@ func pay4OrderByTL(ctx *jxcontext.Context, order *model.GoodsOrder, payType int,
|
|||||||
return orderPay, err
|
return orderPay, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://prodoc.allinpay.com/doc/1091/ 新增消息
|
||||||
func OnTLPayCallback(call *tonglianpayapi.CallBackResult) (err error) {
|
func OnTLPayCallback(call *tonglianpayapi.CallBackResult) (err error) {
|
||||||
switch call.TrxCode {
|
switch call.TrxCode {
|
||||||
case tonglianpayapi.MsgTypePay:
|
case tonglianpayapi.MsgTypePay, "VSP681", "VSP683":
|
||||||
err = onTLpayFinished(call)
|
err = onTLpayFinished(call)
|
||||||
case tonglianpayapi.MsgTypeRefund:
|
case tonglianpayapi.MsgTypeRefund, "VSP682", "VSP684":
|
||||||
err = onTLpayRefund(call)
|
err = onTLpayRefund(call)
|
||||||
case tonglianpayapi.MsgTypePayZFB:
|
case tonglianpayapi.MsgTypePayZFB:
|
||||||
err = onTLpayFinished(call)
|
err = onTLpayFinished(call)
|
||||||
|
|||||||
@@ -3,8 +3,6 @@ package controllers
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"git.rosy.net.cn/baseapi/platformapi/tonglianpayapi"
|
"git.rosy.net.cn/baseapi/platformapi/tonglianpayapi"
|
||||||
"git.rosy.net.cn/baseapi/utils"
|
|
||||||
"git.rosy.net.cn/jx-callback/globals"
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
@@ -20,10 +18,8 @@ type TongLianController struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *TongLianController) Msg() {
|
func (c *TongLianController) Msg() {
|
||||||
globals.SugarLogger.Debug("-------method1:= %s", utils.Format4Output("11", false))
|
|
||||||
if c.Ctx.Input.Method() == http.MethodPost {
|
if c.Ctx.Input.Method() == http.MethodPost {
|
||||||
call, err := api.TLpayAPI.GetCallbackMsg(getUsefulRequest2(c.Ctx))
|
call, err := api.TLpayAPI.GetCallbackMsg(getUsefulRequest2(c.Ctx))
|
||||||
globals.SugarLogger.Debug("-------method1:= %s", utils.Format4Output(call, false))
|
|
||||||
if err == nil {
|
if err == nil {
|
||||||
err = localjx.OnTLPayCallback(call)
|
err = localjx.OnTLPayCallback(call)
|
||||||
}
|
}
|
||||||
@@ -36,10 +32,8 @@ func (c *TongLianController) Msg() {
|
|||||||
|
|
||||||
//通联同一扫码支付回调接口
|
//通联同一扫码支付回调接口
|
||||||
func (c *TongLianController) OnLinePay() {
|
func (c *TongLianController) OnLinePay() {
|
||||||
globals.SugarLogger.Debug("-------method1:= %s", utils.Format4Output("22", false))
|
|
||||||
if c.Ctx.Input.Method() == http.MethodPost {
|
if c.Ctx.Input.Method() == http.MethodPost {
|
||||||
call, err := api.TLpayAPI.GetCallbackOnlinePayMsg(getUsefulRequest2(c.Ctx))
|
call, err := api.TLpayAPI.GetCallbackOnlinePayMsg(getUsefulRequest2(c.Ctx))
|
||||||
globals.SugarLogger.Debug("-------method2:= %s", utils.Format4Output(call, false))
|
|
||||||
if err == nil {
|
if err == nil {
|
||||||
err = localjx.OnTLOnlinePayCallback(call)
|
err = localjx.OnTLOnlinePayCallback(call)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user