checkout backoffice
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user