From 3ba1b7b68fcfd0bce88aeb860e7b1dcd08c99aa0 Mon Sep 17 00:00:00 2001 From: Jiahui <4543bxy@gmail.com> Date: Tue, 31 Dec 2024 14:24:51 +0800 Subject: [PATCH] support custom describe (#5318) --- controllers/account/controllers/payment_controller.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/controllers/account/controllers/payment_controller.go b/controllers/account/controllers/payment_controller.go index 1a016bc44a7..1ae5f1c8dc8 100644 --- a/controllers/account/controllers/payment_controller.go +++ b/controllers/account/controllers/payment_controller.go @@ -23,6 +23,8 @@ import ( "sync" "time" + "github.com/labring/sealos/controllers/pkg/utils/env" + "github.com/google/uuid" "sigs.k8s.io/controller-runtime/pkg/manager" @@ -319,7 +321,7 @@ func (r *PaymentReconciler) reconcileNewPayment(payment *accountv1.Payment) erro if err != nil { return fmt.Errorf("get payment Interface failed: %w", err) } - tradeNO, codeURL, err := payHandler.CreatePayment(payment.Spec.Amount/10000, payment.Spec.UserID, "sealos cloud pay [domain="+r.domain+"]") + tradeNO, codeURL, err := payHandler.CreatePayment(payment.Spec.Amount/10000, payment.Spec.UserID, fmt.Sprintf(env.GetEnvWithDefault("PAY_DESCRIBE_FORMAT", `sealos cloud pay [domain="%s"]`), r.domain)) if err != nil { return fmt.Errorf("get tradeNO and codeURL failed: %w", err) }