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

buildPreAuthorizedPayment() защищенный Метод

Check and create pre authorized payment
protected buildPreAuthorizedPayment ( Markette\Gopay\Entity\PreAuthorizedPayment $payment, string $channel ) : integer
$payment Markette\Gopay\Entity\PreAuthorizedPayment
$channel string
Результат integer
    protected function buildPreAuthorizedPayment(PreAuthorizedPayment $payment, $channel)
    {
        $channels = $this->getPaymentChannels($channel);
        try {
            $customer = $payment->getCustomer();
            $paymentSessionId = $this->gopay->soap->createPreAutorizedPayment($this->gopay->config->getGopayId(), $payment->getProductName(), $payment->getSumInCents(), $payment->getCurrency(), $payment->getVariable(), $this->successUrl, $this->failureUrl, $channels, $channel, $this->gopay->config->getGopaySecretKey(), $customer->firstName, $customer->lastName, $customer->city, $customer->street, $customer->postalCode, $customer->countryCode, $customer->email, $customer->phoneNumber, NULL, NULL, NULL, NULL, $this->lang);
            return $paymentSessionId;
        } catch (Exception $e) {
            throw new GopayException($e->getMessage(), 0, $e);
        }
    }