feat: update refund

This commit is contained in:
Rogee
2025-05-06 21:22:14 +08:00
parent 811ed3a41f
commit 1f8f2b0e96
2 changed files with 2 additions and 20 deletions

View File

@@ -52,16 +52,7 @@ func (ctl *orders) Refund(ctx fiber.Ctx, id int64) error {
OutTradeNo(order.OrderNo).
TransactionID(order.TransactionID).
CNYRefundAmount(refundTotal, refundTotal).
RefundReason("管理员退款").
RefundGoods([]wepay.RefundGoodsInfo{
{
MerchantGoodsID: fmt.Sprintf("%d", order.PostID),
GoodsName: post.Title,
RefundQuantity: 1,
RefundAmount: refundTotal,
UnitPrice: order.Price,
},
})
RefundReason(fmt.Sprintf("%s 退款", post.Title))
})
if err != nil {
return err