refund example

throw PaymentException::refundInvalidTransition($refundId$result['technical_name']);
        }

        $paymentMethodId = Uuid::fromBytesToHex($result['payment_method_id']);
        $refundHandler = $this->paymentHandlerRegistry->getRefundPaymentHandler($paymentMethodId);

        if (!$refundHandler instanceof RefundPaymentHandlerInterface) {
            throw PaymentException::unknownRefundHandler($refundId);
        }

        try {
            $refundHandler->refund($refundId$context);
        } catch (RefundException|PaymentException $e) {
            $this->stateHandler->fail($refundId$context);

            throw $e;
        }
    }
}
Home | Imprint | This part of the site doesn't use cookies.