checkout backoffice
All checks were successful
Build and Publish / BuildAndDeployAmd64 (push) Successful in 43s
Build and Publish / BuildAndDeployArm64 (push) Successful in 4m44s

This commit is contained in:
matst80
2025-12-04 21:06:56 +01:00
parent f67eeb3c49
commit d78685cd8f
6 changed files with 166 additions and 13 deletions

View File

@@ -21,9 +21,13 @@ func HandlePaymentCompleted(g *CheckoutGrain, m *messages.PaymentCompleted) erro
payment.ProcessorReference = m.ProcessorReference
payment.Status = PaymentStatusSuccess
payment.Amount = m.Amount
payment.Currency = m.Currency
payment.CompletedAt = &time.Time{}
if m.Amount > 0 {
payment.Amount = m.Amount
}
if m.Currency != "" {
payment.Currency = m.Currency
}
if m.CompletedAt != nil {
*payment.CompletedAt = m.CompletedAt.AsTime()
} else {