perf: 增加等待支付时亦可标记已支付
实际使用过程中,在等待付款这个阶段其实就可能发现客户错付,即可直接标记成功直接回调。
This commit is contained in:
+8
-7
@@ -4,6 +4,13 @@ import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"math/big"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/go-telegram/bot"
|
||||
"github.com/go-telegram/bot/models"
|
||||
"github.com/shopspring/decimal"
|
||||
@@ -15,12 +22,6 @@ import (
|
||||
"github.com/v03413/bepusdt/app/model"
|
||||
"github.com/v03413/go-cache"
|
||||
"gorm.io/gorm"
|
||||
"io"
|
||||
"math/big"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
const cbWallet = "wallet"
|
||||
@@ -292,7 +293,7 @@ func cbOrderDetailAction(ctx context.Context, b *bot.Bot, u *models.Update) {
|
||||
})
|
||||
}
|
||||
|
||||
if order.Status == model.OrderStatusExpired && order.NotifyState == model.OrderNotifyStateFail {
|
||||
if (order.Status == model.OrderStatusExpired || order.Status == model.OrderStatusWaiting) && order.NotifyState == model.OrderNotifyStateFail {
|
||||
markup.InlineKeyboard = append(markup.InlineKeyboard, []models.InlineKeyboardButton{
|
||||
{Text: "⚠️直接标记已支付(即使未收到款)", CallbackData: cbMarkOrderSucc + "|" + order.TradeId},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user