예제 #1
0
 function pre_confirmation_check()
 {
     parent::pre_confirmation_check();
     if ($_SERVER['REQUEST_METHOD'] == 'POST') {
         $_SESSION[$this->code] = array('country' => isset($_POST['p1_elv_country']) ? $_POST['p1_elv_country'] : '', 'accountnumber' => isset($_POST['p1_elv_accountnumber']) ? $_POST['p1_elv_accountnumber'] : '', 'bankcode' => isset($_POST['p1_elv_bankcode']) ? $_POST['p1_elv_bankcode'] : '', 'iban' => isset($_POST['p1_elv_iban']) ? $_POST['p1_elv_iban'] : '', 'bic' => isset($_POST['p1_elv_bic']) ? $_POST['p1_elv_bic'] : '');
     }
     $this->payone->log("verfication {$this->code} payment data");
     $standard_parameters = parent::_standard_parameters();
     unset($standard_parameters['request']);
     $request_parameters = array('aid' => $this->global_config['subaccount_id'], 'key' => $this->global_config['key']);
     $params = array_merge($standard_parameters, $request_parameters, $_SESSION[$this->code]);
     $builder = new Payone_Builder($this->payone->getPayoneConfig());
     $service = $builder->buildServiceVerificationBankAccountCheck();
     $request = new Payone_Api_Request_BankAccountCheck($params);
     $this->payone->log("elv BankAccountCheck request:\n" . print_r($request, true));
     $response = $service->check($request);
     $this->payone->log("elv BankAccountCheck response:\n" . print_r($response, true));
     if ($response instanceof Payone_Api_Response_Error || $response instanceof Payone_Api_Response_BankAccountCheck_Blocked || $response instanceof Payone_Api_Response_BankAccountCheck_Invalid) {
         $this->payone->log("ERROR verification bankaccount: " . $response->getErrorcode() . ' - ' . $response->getErrormessage());
         $_SESSION['payone_error'] = $response->getCustomermessage();
         xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error=' . $this->code, 'SSL'));
     }
 }
 function pre_confirmation_check()
 {
     parent::pre_confirmation_check();
 }
예제 #3
0
 function pre_confirmation_check()
 {
     parent::pre_confirmation_check();
     if ($_SERVER['REQUEST_METHOD'] == 'POST') {
         $_SESSION[$this->code]['cardtype'] = $_POST[$this->code . '_type'];
     }
 }
 function pre_confirmation_check()
 {
     global $order;
     parent::pre_confirmation_check();
     if ($_SESSION['sendto'] != $_SESSION['billto']) {
         $_SESSION['payone_error'] = ADDRESSES_MUST_BE_EQUAL;
         xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error=' . $this->code, 'SSL', true));
     }
     if (isset($_POST['payone_installment_type'])) {
         $_SESSION[$this->code]['installment_type'] = $_POST['payone_installment_type'];
     }
     if (empty($_SESSION[$this->code]['installment_type'])) {
         $_SESSION['payone_error'] = INSTALLMENT_TYPE_NOT_SELECTED;
         xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error=' . $this->code, 'SSL', true));
     }
     if ($_SESSION[$this->code]['installment_type'] == 'klarna' && !isset($this->klarnalocale[$order->billing['country']['iso_code_2']])) {
         $_SESSION['payone_error'] = INSTALLMENT_TYPE_COUNTRY_NOT_ALLOWED;
         xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error=' . $this->code, 'SSL', true));
     }
 }