Skip to content

Commit

Permalink
support custom describe (#5318)
Browse files Browse the repository at this point in the history
  • Loading branch information
bxy4543 authored Dec 31, 2024
1 parent f45112f commit 3ba1b7b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion controllers/account/controllers/payment_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit 3ba1b7b

Please sign in to comment.