feat: 更新钱包充值逻辑,自动处理充值订单支付,模拟支付成功返回
This commit is contained in:
@@ -96,9 +96,15 @@ func (s *wallet) Recharge(
|
||||
return nil, errorx.ErrDatabaseError.WithCause(err)
|
||||
}
|
||||
|
||||
// MOCK: Automatically pay for recharge order to close the loop
|
||||
// In production, this would be a callback from payment gateway
|
||||
if err := Order.ProcessExternalPayment(ctx, cast.ToString(order.ID), "mock_auto_pay"); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Mock Pay Params
|
||||
return &user_dto.RechargeResponse{
|
||||
PayParams: "mock_recharge_url",
|
||||
PayParams: "mock_paid_success",
|
||||
OrderID: cast.ToString(order.ID),
|
||||
}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user