protected function _getPostData() { $data = parent::_getPostData(); if ($this->_apiToken == '') { throw Mage::exception('Pay_Payment_Helper_Api', 'apiToken not set', 1); } else { $data['token'] = $this->_apiToken; } if (!isset($this->_postData['transactionId'])) { throw Mage::exception('Pay_Payment_Helper_Api', 'transactionId is not set', 1); } return $data; }
protected function _getPostData() { $data = parent::_getPostData(); // Checken of alle verplichte velden geset zijn if ($this->_apiToken == '') { throw Mage::exception('Pay_Payment_Helper_Api', 'apiToken not set', 1); } else { $data['token'] = $this->_apiToken; } if (empty($this->_serviceId)) { throw Mage::exception('Pay_Payment_Helper_Api', 'apiToken not set', 1); } else { $data['serviceId'] = $this->_serviceId; } return $data; }
protected function _getPostData() { $data = parent::_getPostData(); /* * Verplicht * * amount * paymentOptionId * finishUrl * exchangeUrl * orderId * * * Optioneel * * costs * paymentOptionSubId */ // Checken of alle verplichte velden geset zijn if ($this->_apiToken == '') { throw Mage::exception('Pay_Payment_Helper_Api', 'apiToken not set', 1); } else { $data['token'] = $this->_apiToken; } if (empty($this->_serviceId)) { throw Mage::exception('Pay_Payment_Helper_Api', 'apiToken not set', 1); } else { $data['serviceId'] = $this->_serviceId; } if (empty($this->_amount)) { throw Mage::exception('Pay_Payment_Helper_Api', 'Amount is niet geset', 1); } else { $data['amount'] = $this->_amount; } if (!empty($this->_currency)) { $data['transaction']['currency'] = $this->_currency; } if (empty($this->_paymentOptionId)) { throw Mage::exception('Pay_Payment_Helper_Api', 'PaymentOptionId is niet geset', 1); } else { $data['paymentOptionId'] = $this->_paymentOptionId; } if (empty($this->_finishUrl)) { throw Mage::exception('Pay_Payment_Helper_Api', 'FinishUrl is niet geset', 1); } else { $data['finishUrl'] = $this->_finishUrl; } if (empty($this->_exchangeUrl)) { throw Mage::exception('Pay_Payment_Helper_Api', 'exchangeUrl is niet geset', 1); } else { $data['transaction']['orderExchangeUrl'] = $this->_exchangeUrl; } if (empty($this->_orderId)) { throw Mage::exception('Pay_Payment_Helper_Api', 'orderId is niet geset', 1); } else { $data['statsData']['extra1'] = $this->_orderId; } if (empty($this->_description)) { $data['transaction']['description'] = $this->_orderId; } else { $data['transaction']['description'] = $this->_description; } if (!empty($this->_extra2)) { $data['statsData']['extra2'] = $this->_extra2; } if (!empty($this->_extra3)) { $data['statsData']['extra3'] = $this->_extra3; } if ($this->_costs_for_customer == 1) { $data['transaction']['costs'] = 1; } // $data['transaction']['currency'] = 'EUR'; if (!empty($this->_paymentOptionSubId)) { $data['paymentOptionSubId'] = $this->_paymentOptionSubId; } //ip en browserdata setten $data['ipAddress'] = Pay_Payment_Helper_Data::getIp(); $data['browserData'] = array('browser_name_regex' => '^mozilla/5\\.0 (windows; .; windows nt 5\\.1; .*rv:.*) gecko/.* firefox/0\\.9.*$', 'browser_name_pattern' => 'Mozilla/5.0 (Windows; ?; Windows NT 5.1; *rv:*) Gecko/* Firefox/0.9*', 'parent' => 'Firefox 0.9', 'platform' => 'WinXP', 'browser' => 'Firefox', 'version' => 0.9, 'majorver' => 0, 'minorver' => 9, 'cssversion' => 2, 'frames' => 1, 'iframes' => 1, 'tables' => 1, 'cookies' => 1); if (!empty($this->_products)) { $data['saleData']['invoiceDate'] = date('d-m-Y'); $data['saleData']['deliveryDate'] = date('d-m-Y', strtotime('+1 day')); $data['saleData']['orderData'] = $this->_products; } $data['enduser'] = array(); if (!empty($this->_enduser)) { $data['enduser'] = $this->_enduser; } //taal instellen $data['enduser']['language'] = Pay_Payment_Helper_Data::getLanguage(); return $data; }