/** * {@inheritdoc} */ protected function validateCallback(PaymentTransaction $paymentTransaction, CallbackResponse $callbackResponse) { if (!$paymentTransaction->isNew()) { throw new ValidationException("Only new payment transaction can be processed"); } parent::validateCallback($paymentTransaction, $callbackResponse); }
/** * {@inheritdoc} */ protected function validatePaymentTransaction(PaymentTransaction $paymentTransaction) { if ($paymentTransaction->getPayment()->hasProcessingTransaction()) { throw new ValidationException('Payment can not has processing payment transaction'); } if (!$paymentTransaction->isNew()) { throw new ValidationException('Payment transaction must be new'); } parent::validatePaymentTransaction($paymentTransaction); }