Compare commits

..

No commits in common. "6ab982e874c6c71aebcfdb6d32a9bd42fa5c6e21" and "75d68a30329e138f6606767a15202989052d9534" have entirely different histories.

2 changed files with 5 additions and 7 deletions

View File

@ -1,7 +1,6 @@
package do
import (
"PaymentCenter/app/constants/common"
"PaymentCenter/app/constants/errorcode"
"PaymentCenter/app/services"
@ -32,7 +31,6 @@ func (w *Pay) CreateOrder() {
Amount: w.paycheck.WebPayReqs.Amount,
ExtJson: w.paycheck.WebPayReqs.ExtJson,
Desc: w.paycheck.WebPayReqs.Desc,
Status: common.ORDER_STATUS_WAITPAY,
},
)
}
@ -60,7 +58,7 @@ func (w *Pay) Pay() {
return
}
res := paymentService.PaymentService(*w.paycheck.ctx, *thirdPay)
// payCommon.PAY_SUCCESS_CODE
w.PayCode = res.Code
return
}

View File

@ -19,7 +19,7 @@ type OrderNotify struct {
app *appmodel.App
OrderId int64
Status int //订单状态
ErrCode int
ActualAmount int
Msg string
CompleteTime time.Time
@ -45,10 +45,10 @@ type OrderNotifySendContent struct {
MerchantId int64 `json:"merchant_id"`
}
func NewOrderNotifyWithHandle(orderId int64, Status int, actualAmount int, msg string) *OrderNotifyResp {
func NewOrderNotifyWithHandle(orderId int64, errCode int, actualAmount int, msg string) *OrderNotifyResp {
orderNotify := &OrderNotify{
OrderId: orderId,
Status: Status,
ErrCode: errCode,
ActualAmount: actualAmount,
Msg: msg,
code: errorcode.Success,
@ -118,7 +118,7 @@ func (o *OrderNotify) setBody() *OrderNotifySendContent {
}
func (o *OrderNotify) updateOrder() {
if o.ErrCode != errorcode.Success {
if o.ErrCode == errorcode.Success {
o.order.Status = common.ORDER_STATUS_FAILED
} else {
o.order.Status = common.ORDER_STATUS_PAYED