update
This commit is contained in:
@@ -458,7 +458,7 @@ func (s *CheckoutPoolServer) StartPaymentHandler(w http.ResponseWriter, r *http.
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
// Apply PaymentStarted mutation
|
// Apply PaymentStarted mutation
|
||||||
_, err = s.ApplyLocal(r.Context(), checkoutId, &messages.PaymentStarted{
|
result, err := s.ApplyLocal(r.Context(), checkoutId, &messages.PaymentStarted{
|
||||||
PaymentId: session.Id,
|
PaymentId: session.Id,
|
||||||
Amount: session.Amount.Value,
|
Amount: session.Amount.Value,
|
||||||
Currency: session.Amount.Currency,
|
Currency: session.Amount.Currency,
|
||||||
@@ -475,7 +475,7 @@ func (s *CheckoutPoolServer) StartPaymentHandler(w http.ResponseWriter, r *http.
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
return s.WriteResult(w, session)
|
return s.WriteResult(w, result)
|
||||||
|
|
||||||
case "klarna":
|
case "klarna":
|
||||||
order, err := s.CreateOrUpdateCheckout(r, grain, nil)
|
order, err := s.CreateOrUpdateCheckout(r, grain, nil)
|
||||||
@@ -488,7 +488,7 @@ func (s *CheckoutPoolServer) StartPaymentHandler(w http.ResponseWriter, r *http.
|
|||||||
logger.Error("unable to marshal order", "error", err)
|
logger.Error("unable to marshal order", "error", err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
_, err = s.ApplyLocal(r.Context(), checkoutId, &messages.PaymentStarted{
|
result, err := s.ApplyLocal(r.Context(), checkoutId, &messages.PaymentStarted{
|
||||||
PaymentId: order.ID,
|
PaymentId: order.ID,
|
||||||
Amount: int64(order.OrderAmount),
|
Amount: int64(order.OrderAmount),
|
||||||
Currency: order.PurchaseCurrency,
|
Currency: order.PurchaseCurrency,
|
||||||
@@ -505,7 +505,7 @@ func (s *CheckoutPoolServer) StartPaymentHandler(w http.ResponseWriter, r *http.
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
return s.WriteResult(w, order)
|
return s.WriteResult(w, result)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
http.Error(w, "unsupported payment provider", http.StatusBadRequest)
|
http.Error(w, "unsupported payment provider", http.StatusBadRequest)
|
||||||
|
|||||||
@@ -282,14 +282,14 @@ spec:
|
|||||||
path: /livez
|
path: /livez
|
||||||
port: web
|
port: web
|
||||||
failureThreshold: 1
|
failureThreshold: 1
|
||||||
periodSeconds: 30
|
periodSeconds: 15
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /readyz
|
path: /readyz
|
||||||
port: web
|
port: web
|
||||||
failureThreshold: 2
|
failureThreshold: 2
|
||||||
initialDelaySeconds: 2
|
initialDelaySeconds: 2
|
||||||
periodSeconds: 30
|
periodSeconds: 15
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: "/data"
|
- mountPath: "/data"
|
||||||
name: data
|
name: data
|
||||||
@@ -416,14 +416,14 @@ spec:
|
|||||||
path: /livez
|
path: /livez
|
||||||
port: web
|
port: web
|
||||||
failureThreshold: 1
|
failureThreshold: 1
|
||||||
periodSeconds: 30
|
periodSeconds: 15
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /readyz
|
path: /readyz
|
||||||
port: web
|
port: web
|
||||||
failureThreshold: 2
|
failureThreshold: 2
|
||||||
initialDelaySeconds: 2
|
initialDelaySeconds: 1
|
||||||
periodSeconds: 50
|
periodSeconds: 15
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: "/data"
|
- mountPath: "/data"
|
||||||
name: data
|
name: data
|
||||||
|
|||||||
Reference in New Issue
Block a user