Exemple #1
0
 /**
  * Get data to send to the api
  *
  * @return array
  * @throws Error\Required
  */
 protected function getData()
 {
     if (empty($this->transactionId)) {
         throw new Error\Required('TransactionId is niet geset');
     }
     $this->data['orderId'] = $this->transactionId;
     return parent::getData();
 }
Exemple #2
0
 /**
  * Get data to send to the api
  *
  * @return array
  * @throws Error\Required
  */
 protected function getData()
 {
     if (empty($this->transactionId)) {
         throw new Error\Required('TransactionId is niet geset');
     }
     $this->data['transactionId'] = $this->transactionId;
     if (!empty($this->amount)) {
         $this->data['amount'] = $this->amount;
     }
     return parent::getData();
 }
Exemple #3
0
 protected function getData()
 {
     // Checken of alle verplichte velden geset zijn
     Helper::requireServiceId();
     $data['serviceId'] = Config::getServiceId();
     if ($this->_testMode === true) {
         $data['testMode'] = '1';
     } else {
         $data['testMode'] = '0';
     }
     if (empty($this->_amount)) {
         throw new ErrorRequired('Amount is niet geset', 1);
     } else {
         $data['amount'] = $this->_amount;
     }
     if (!empty($this->_paymentOptionId)) {
         $data['paymentOptionId'] = $this->_paymentOptionId;
     }
     if (empty($this->_finishUrl)) {
         throw new ErrorRequired('FinishUrl is niet geset', 1);
     } else {
         $data['finishUrl'] = $this->_finishUrl;
     }
     if (!empty($this->_exchangeUrl)) {
         $data['transaction']['orderExchangeUrl'] = $this->_exchangeUrl;
     }
     if (!empty($this->_description)) {
         $data['transaction']['description'] = $this->_description;
     }
     if (isset($this->_currency)) {
         $data['transaction']['currency'] = $this->_currency;
     }
     if (!empty($this->_paymentOptionSubId)) {
         $data['paymentOptionSubId'] = $this->_paymentOptionSubId;
     }
     if (isset($this->_ipaddress)) {
         $data['ipAddress'] = $this->_ipaddress;
     } else {
         $data['ipAddress'] = Helper::getIp();
     }
     if (!empty($this->_products)) {
         $data['saleData']['orderData'] = $this->_products;
     }
     if (!empty($this->_enduser)) {
         $data['enduser'] = $this->_enduser;
     }
     if (!empty($this->_extra1)) {
         $data['statsData']['extra1'] = $this->_extra1;
     }
     if (!empty($this->_extra2)) {
         $data['statsData']['extra2'] = $this->_extra2;
     }
     if (!empty($this->_extra3)) {
         $data['statsData']['extra3'] = $this->_extra3;
     }
     if (!empty($this->_promotorId)) {
         $data['statsData']['promotorId'] = $this->_promotorId;
     }
     if (!empty($this->_info)) {
         $data['statsData']['info'] = $this->_info;
     }
     if (!empty($this->_tool)) {
         $data['statsData']['tool'] = $this->_tool;
     }
     if (!empty($this->_object)) {
         $data['statsData']['object'] = $this->_object;
     }
     if (!empty($this->_domainId)) {
         $data['statsData']['domain_id'] = $this->_domainId;
     }
     if (!empty($this->_transferData)) {
         $data['statsData']['transferData'] = $this->_transferData;
     }
     $this->data = array_merge($data, $this->data);
     return parent::getData();
 }
Exemple #4
0
 /**
  * Get data to send to the api
  *
  * @return array
  * @throws \Paynl\Error\Required\ServiceId
  */
 protected function getData()
 {
     Helper::requireServiceId();
     $this->data['serviceId'] = Config::getServiceId();
     return parent::getData();
 }