fix:支付

This commit is contained in:
momo 2023-09-26 16:30:51 +08:00
parent 42bd585fe9
commit 6e9f47ff85
2 changed files with 6 additions and 3 deletions

View File

@ -844,11 +844,14 @@ func (d *defaultOrder) Create(ctx context.Context, in *CreateReq) (res *CreateRe
var stepPriceJson gmodel.StepPriceJsonStruct
if shoppingCartProductModel3d.StepPrice != nil {
json.Unmarshal(*shoppingCartProductModel3d.StepPrice, &shoppingCartProductModel3d.StepPrice)
err = json.Unmarshal(*shoppingCartProductModel3d.StepPrice, &shoppingCartProductModel3d.StepPrice)
if err != nil {
return err
}
} else {
errorCode = *basic.CodeErrOrderCreatProductPriceAbsent
errorCode.Message = "create order failed, step price of product '" + shoppingCartSnapshot.ProductInfo.ProductName + "'is failed"
return err
return errors.New("shoppingCartProductModel3d.StepPrice nil")
}
/* 计算价格 */

View File

@ -107,7 +107,7 @@ var (
CodeErrOrderCreatProductPriceAbsent = &StatusResponse{5304, "create order failed, price of product is absent"} // 订单创建失败,商品价格不存在
CodeErrOrderCreatProductAccessoryAbsent = &StatusResponse{5305, "create order failed, accessory of product is absent"} // 订单创建失败,商品配件不存在
CodeErrOrderCreatePrePaymentParam = &StatusResponse{5306, "create payment failed, the shipping address is illegal"} // 订单创建失败,商品配件不存在
CodeErrOrderCreatePrePaymentInfoNoFound = &StatusResponse{5307, "create payment failed, order info not found"}
CodeErrOrderCreatePrePaymentInfoNoFound = &StatusResponse{5307, "order info not found"}
CodeErrOrderCreatePrePaymentNoUnPaid = &StatusResponse{5308, "create payment failed, order is not unpaid"}
CodeErrOrderCreatePrePaymentPaid = &StatusResponse{5309, "create payment failed, order is paid"}
CodeErrOrderCreatePrePaymentTimeout = &StatusResponse{5310, "create payment failed, timeout"}