buildRefundPayload example

if (!$refundUrl) {
            return;
        }

        $app = $paymentMethod->getApp();

        if (!$app) {
            throw PaymentException::refundInterrupted($refund->getId(), 'App not defined');
        }

        $payload = $this->buildRefundPayload($refund$refund->getTransactionCapture()->getTransaction()->getOrder());

        try {
            $response = $this->payloadService->request($refundUrl$payload$app, RefundResponse::class$context);
        } catch (ClientExceptionInterface $exception) {
            throw PaymentException::refundInterrupted($refund->getId()sprintf('App error: %s', $exception->getMessage()));
        }

        if (!$response instanceof RefundResponse) {
            throw PaymentException::refundInterrupted($refund->getId(), 'Invalid app response');
        }

        
Home | Imprint | This part of the site doesn't use cookies.