通联宝支付测试
This commit is contained in:
@@ -45,10 +45,8 @@ func pay4OrderByTL(ctx *jxcontext.Context, order *model.GoodsOrder, vendorPayTyp
|
|||||||
param.Acct = authInfo.GetAuthID()
|
param.Acct = authInfo.GetAuthID()
|
||||||
}
|
}
|
||||||
result, err := api.TLpayAPI.CreateUnitorderOrder(param)
|
result, err := api.TLpayAPI.CreateUnitorderOrder(param)
|
||||||
result2 := &tonglianpayapi.PayInfo{}
|
|
||||||
json.Unmarshal([]byte(result.PayInfo), &result2)
|
|
||||||
if err == nil {
|
if err == nil {
|
||||||
result2 := &wxpayapi.CreateOrderResult{}
|
result2 := &tonglianpayapi.PayInfo{}
|
||||||
json.Unmarshal([]byte(result.PayInfo), &result2)
|
json.Unmarshal([]byte(result.PayInfo), &result2)
|
||||||
orderPay = &model.OrderPay{
|
orderPay = &model.OrderPay{
|
||||||
PayOrderID: param.Reqsn,
|
PayOrderID: param.Reqsn,
|
||||||
@@ -63,11 +61,11 @@ func pay4OrderByTL(ctx *jxcontext.Context, order *model.GoodsOrder, vendorPayTyp
|
|||||||
CodeURL: utils.LimitUTF8StringLen(result.PayInfo, 3200),
|
CodeURL: utils.LimitUTF8StringLen(result.PayInfo, 3200),
|
||||||
TotalFee: int(order.ActualPayPrice),
|
TotalFee: int(order.ActualPayPrice),
|
||||||
}
|
}
|
||||||
|
plainText, err := RSADecrypt([]byte(result2.PaySign))
|
||||||
|
result2.PaySign = string(plainText)
|
||||||
|
str, err := json.Marshal(result2)
|
||||||
|
result.PayInfo = string(str)
|
||||||
}
|
}
|
||||||
plainText, err := RSADecrypt([]byte(result2.PaySign))
|
|
||||||
result2.PaySign = string(plainText)
|
|
||||||
str, err := json.Marshal(result2)
|
|
||||||
result.PayInfo = string(str)
|
|
||||||
return orderPay, err
|
return orderPay, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user