diff --git a/api/payments.go b/api/payments.go index d5ac4b5..b6315ed 100644 --- a/api/payments.go +++ b/api/payments.go @@ -228,8 +228,6 @@ func (a *API) PaymentCreate(w http.ResponseWriter, r *http.Request) error { return internalServerError("Saving payment failed").WithInternalError(err) } - go sendOrderConfirmation(ctx, log, tr) - return sendJSON(w, http.StatusOK, tr) } @@ -271,6 +269,8 @@ func (a *API) PaymentConfirm(w http.ResponseWriter, r *http.Request) error { return badRequestError("Order does not specify a payment provider") } + trans.Order = order + provider := gcontext.GetPaymentProviders(ctx)[order.PaymentProcessor] if provider == nil { return badRequestError("Payment provider '%s' not configured", order.PaymentProcessor)