新版本,代理功能上线
This commit is contained in:
		| @@ -4,6 +4,7 @@ import ( | ||||
| 	"context" | ||||
| 	"github.com/smartwalle/alipay/v3" | ||||
| 	"net/http" | ||||
| 	"os" | ||||
| 	"time" | ||||
| 	"tydata-server/pkg/lzkit/lzUtils" | ||||
|  | ||||
| @@ -26,9 +27,13 @@ func NewAlipayCallbackLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Al | ||||
| } | ||||
|  | ||||
| func (l *AlipayCallbackLogic) AlipayCallback(w http.ResponseWriter, r *http.Request) error { | ||||
| 	env := os.Getenv("ENV") | ||||
| 	if env == "development" { | ||||
| 		return nil | ||||
| 	} | ||||
| 	notification, err := l.svcCtx.AlipayService.HandleAliPaymentNotification(r) | ||||
| 	if err != nil { | ||||
| 		logx.Errorf("支付宝支付回调,%+v", err) | ||||
| 		logx.Errorf("支付宝支付回调,%v", err) | ||||
| 		return nil | ||||
| 	} | ||||
| 	order, findOrderErr := l.svcCtx.OrderModel.FindOneByOrderNo(l.ctx, notification.OutTradeNo) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user