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);
}
}