buildPayPayload example

/** * @internal only for use by the app-system */
#[Package('core')] class AppAsyncPaymentHandler extends AppPaymentHandler implements AsynchronousPaymentHandlerInterface
{
    public function pay(AsyncPaymentTransactionStruct $transaction, RequestDataBag $dataBag, SalesChannelContext $salesChannelContext): RedirectResponse
    {
        $this->transactionStateHandler->processUnconfirmed($transaction->getOrderTransaction()->getId()$salesChannelContext->getContext());

        $payload = $this->buildPayPayload($transaction$dataBag->all());

        $app = $this->getAppPaymentMethod($transaction->getOrderTransaction())->getApp();
        if ($app === null) {
            throw PaymentException::asyncProcessInterrupted($transaction->getOrderTransaction()->getId(), 'App not defined');
        }

        $url = $this->getAppPaymentMethod($transaction->getOrderTransaction())->getPayUrl();
        if ($url === null) {
            throw PaymentException::asyncFinalizeInterrupted($transaction->getOrderTransaction()->getId(), 'Pay URL not defined');
        }

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