fix:支付

This commit is contained in:
momo 2023-09-27 17:51:25 +08:00
parent f68032c8ea
commit 8d9ff4fe10
2 changed files with 15 additions and 1 deletions

View File

@ -79,6 +79,9 @@ var OrderStatusMessage map[OrderStatusCode]string
// 支付状态名称 // 支付状态名称
var PayStatusMessage map[PayStatusCode]string var PayStatusMessage map[PayStatusCode]string
// 支付状态名称
var OrderPayStatusMessage map[OrderPayStatusCode]string
// 订单状态--用户可见--直邮 // 订单状态--用户可见--直邮
var OrderStatusUserDIRECTMAIL []OrderStatusCode var OrderStatusUserDIRECTMAIL []OrderStatusCode
@ -86,6 +89,14 @@ var OrderStatusUserDIRECTMAIL []OrderStatusCode
var OrderStatusUserCLOUDSTORE []OrderStatusCode var OrderStatusUserCLOUDSTORE []OrderStatusCode
func init() { func init() {
// 订单状态名称
OrderPayStatusMessage = make(map[OrderPayStatusCode]string)
OrderPayStatusMessage[ORDER_PAY_STATUS_UNPAIDDEPOSIT] = "未付首款"
OrderPayStatusMessage[ORDER_PAY_STATUS_PAIDDEPOSIT] = "已付首款"
OrderPayStatusMessage[ORDER_PAY_STATUS_REFUNDEDDEPOSIT] = "已退首款"
OrderPayStatusMessage[ORDER_PAY_STATUS_PAIDDREMAINING] = "已付尾款"
OrderPayStatusMessage[ORDER_PAY_STATUS_REFUNDEDREMAINING] = "已退尾款"
// 订单状态名称 // 订单状态名称
PayStatusMessage = make(map[PayStatusCode]string) PayStatusMessage = make(map[PayStatusCode]string)
PayStatusMessage[PAY_STATUS_UNPAID] = "Unpaid" PayStatusMessage[PAY_STATUS_UNPAID] = "Unpaid"

View File

@ -331,7 +331,10 @@ func (d *defaultOrder) PaymentSuccessful(ctx context.Context, in *PaymentSuccess
orderAmount["remaining_balance"] = payInfo orderAmount["remaining_balance"] = payInfo
} }
payStatusLink = append(ress.OrderDetailOriginal.PayStatusLink, payInfo.Status) payStatusLink = append(ress.OrderDetailOriginal.PayStatusLink, gmodel.PayStatus{
StatusCode: int64(orderPayStatusCode),
StatusTitle: constants.OrderPayStatusMessage[orderPayStatusCode],
})
orderAmountByte, err := json.Marshal(orderAmount) orderAmountByte, err := json.Marshal(orderAmount)
if err != nil { if err != nil {