Ejemplo n.º 1
0
 public function paymentFailed(Payment $payment, $logMessage, array $logContext, $extra = "")
 {
     if ($payment->getStatus() === $payment::STATUS_OPEN) {
         $payment->setStatus($payment::STATUS_FAILED);
     }
     $this->persistPayment($payment);
     $this->eventDispatcher->dispatch("agit.payment.failed", new PaymentFailedEvent($payment, $logMessage, $logContext, $extra));
     throw new PaymentProcessorException(vsprintf(Translate::t($logMessage), $logContext));
 }
Ejemplo n.º 2
0
 public function fillStatus(PaymentEntity $payment)
 {
     $this->status = self::$availableStatus[$payment->getStatus()];
 }