1
This commit is contained in:
@@ -9,7 +9,6 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
"git.rosy.net.cn/jx-callback/business/partner"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -191,31 +190,26 @@ func BarCodeScannerPayByLaKaLa(ctx *jxcontext.Context, vendorOrderId, userPaymen
|
||||
SettleType: "1",
|
||||
Subject: fmt.Sprintf("感谢您在本店%s消费,欢迎下次再来", goodsOrder.StoreName),
|
||||
}
|
||||
code, msg, payOrderId, err := api.LaKaLaApi.ScannerPayMicroPay(parma)
|
||||
code, msg, tradeNo, logNo, err := api.LaKaLaApi.ScannerPayMicroPay(parma)
|
||||
if code == lakala.PaySuccess {
|
||||
goodsOrder.Status = model.OrderStatusFinished
|
||||
goodsOrder.VendorStatus = code
|
||||
goodsOrder.VendorOrderID2 = logNo
|
||||
goodsOrder.OrderFinishedAt = time.Now()
|
||||
dao.UpdateEntity(db, goodsOrder, "Status", "VendorStatus", "OrderFinishedAt")
|
||||
dao.UpdateEntity(db, goodsOrder, "Status", "VendorStatus", "OrderFinishedAt", "VendorOrderID2")
|
||||
return "支付成功", nil
|
||||
}
|
||||
|
||||
vendorPayType := ""
|
||||
if strings.Contains(userPaymentLabel, "101112131415") {
|
||||
vendorPayType = lakala.Wechat
|
||||
} else {
|
||||
vendorPayType = lakala.Alipay
|
||||
}
|
||||
payInfo := &model.OrderPay{
|
||||
PayOrderID: payOrderId,
|
||||
PayOrderID: tradeNo,
|
||||
PayType: model.PayTypeLaKaLa,
|
||||
VendorPayType: vendorPayType,
|
||||
TransactionID: userPaymentLabel,
|
||||
VendorPayType: lakala.PayWayAPP,
|
||||
TransactionID: logNo,
|
||||
VendorOrderID: goodsOrder.VendorOrderID,
|
||||
VendorID: goodsOrder.VendorID,
|
||||
Status: 0,
|
||||
PayCreatedAt: time.Now(),
|
||||
PrepayID: userPaymentLabel,
|
||||
PrepayID: tradeNo,
|
||||
CodeURL: "",
|
||||
TotalFee: int(goodsOrder.ActualPayPrice),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user