/** * Get the data for the request. * * @return array * @throws \Omnipay\Common\Exception\InvalidRequestException */ public function getData() { $this->validate('apiKey', 'hash'); $data = parent::getBaseData(); $data['data']['hash'] = $this->getHash(); return $data; }
/** * Get the data for the request. * * @return array * @throws \Omnipay\Common\Exception\InvalidRequestException */ public function getData() { $this->validate('apiKey', 'hash'); $data = parent::getBaseData(); $data['data']['hash'] = $this->getHash(); $data['data'] = $this->addTracking($data['data']); $data['data'] = $this->addInvoiceNumber($data['data']); return $data; }
protected function getBaseData() { $data = parent::getBaseData(); $data['CustomerReferenceNumber'] = $this->getCustomerReference(); //if (false == ($data['Customer']['CustomerReferenceNumber'] = $this->getCardReference())) { // $this->validate('card'); //} if ($this->getCard()) { $data['Customer']['CardDetails'] = ['ExpiryMonth' => $this->getCard()->getExpiryDate('m'), 'ExpiryYear' => $this->getCard()->getExpiryDate('y'), 'Number' => $this->getCard()->getNumber(), 'Cvv' => $this->getCard()->getCvv()]; } return $data; }
/** * Get the data for the request. * * @return array * @throws \Omnipay\Common\Exception\InvalidRequestException */ public function getData() { $this->validate('apiKey', 'paymentType', 'urlSuccess', 'urlFailure'); $data = parent::getBaseData(); $data['data']['payment_type'] = $this->getPaymentType(); $data['data']['demo'] = parent::getDemoValue(); $data['data']['amount'] = $this->getAmount(); $data['data']['currency'] = $this->getCurrency(); $data['data']['url_success'] = $this->getUrlSuccess(); $data['data']['url_failure'] = $this->getUrlFailure(); $data['data']['url_push'] = $this->getUrlPush(); $data['data'] = $this->addCustomerDetails($data['data']); $data['data'] = $this->addPurpose($data['data']); $data['data'] = $this->addOrderId($data['data']); $data['data'] = $this->addDeliveryAddress($data['data']); $data['data'] = $this->addShopName($data['data']); $data['data'] = $this->addCustomFields($data['data']); $data['data'] = $this->addExperience($data['data']); return $data; }
protected function getBaseData() { $data = parent::getBaseData(); $data['TransactionType'] = $this->getTransactionType(); if ($this->getCardReference()) { $data['Customer']['TokenCustomerID'] = $this->getCardReference(); } else { $this->validate('card'); } if ($this->getCard()) { $data['Customer']['CardDetails'] = array(); $data['Customer']['CardDetails']['Name'] = $this->getCard()->getName(); $data['Customer']['CardDetails']['ExpiryMonth'] = $this->getCard()->getExpiryDate('m'); $data['Customer']['CardDetails']['ExpiryYear'] = $this->getCard()->getExpiryDate('y'); $data['Customer']['CardDetails']['CVN'] = $this->getCard()->getCvv(); if ($this->getEncryptedCardNumber()) { $data['Customer']['CardDetails']['Number'] = $this->getEncryptedCardNumber(); } else { $data['Customer']['CardDetails']['Number'] = $this->getCard()->getNumber(); } if ($this->getEncryptedCardCvv()) { $data['Customer']['CardDetails']['CVN'] = $this->getEncryptedCardCvv(); } else { $data['Customer']['CardDetails']['CVN'] = $this->getCard()->getCvv(); } if ($this->getCard()->getStartMonth() and $this->getCard()->getStartYear()) { $data['Customer']['CardDetails']['StartMonth'] = $this->getCard()->getStartDate('m'); $data['Customer']['CardDetails']['StartYear'] = $this->getCard()->getStartDate('y'); } if ($this->getCard()->getIssueNumber()) { $data['Customer']['CardDetails']['IssueNumber'] = $this->getCard()->getIssueNumber(); } } if ($this->getItems()) { $data['Items'] = $this->getItemData(); } return $data; }