Markette\Gopay\Service\PreAuthorizedPaymentService::payPreAuthorized PHP Метод

payPreAuthorized() публичный Метод

Executes payment via redirecting to GoPay payment gate
public payPreAuthorized ( Markette\Gopay\Entity\PreAuthorizedPayment $payment, string $channel, callable $callback ) : Nette\Application\Responses\RedirectResponse
$payment Markette\Gopay\Entity\PreAuthorizedPayment
$channel string
$callback callable
Результат Nette\Application\Responses\RedirectResponse
    public function payPreAuthorized(PreAuthorizedPayment $payment, $channel, $callback)
    {
        $paymentSessionId = $this->buildPreAuthorizedPayment($payment, $channel);
        $url = GopayConfig::fullIntegrationURL() . "?sessionInfo.targetGoId=" . $this->gopay->config->getGopayId() . "&sessionInfo.paymentSessionId=" . $paymentSessionId . "&sessionInfo.encryptedSignature=" . $this->createSignature($paymentSessionId);
        call_user_func_array($callback, [$paymentSessionId]);
        return new RedirectResponse($url);
    }