public function getData() { $data = parent::getData(); $data['txn_type'] = $this->txn_type; $this->validate('transactionReference'); // Fetch the original transaction reference and tdate from the // concatenated transactionReference returned by the authorize() // request. $transaction_reference = $this->getTransactionReference(); list($orderid, $tdate) = explode('::', $transaction_reference); $data['reference_no'] = $orderid; return $data; }
public function getData() { $data = parent::getData(); $data['txn_type'] = $this->txn_type; // We have to make the transactionId a required parameter because // it is returned as the transactionReference, and required for // voids, refunds, and captures. The accountId parameter is also // required by First Data. $this->validate('amount', 'card', 'transactionId', 'accountId'); $data['amount'] = $this->getAmount(); $data['reference_no'] = $this->getTransactionId(); $data['ip'] = $this->getClientIp(); // Add account details $data['account_id'] = $this->getAccountId(); // add credit card details $data['card_number'] = $this->getCard()->getNumber(); $data['card_name'] = $this->getCard()->getName(); $data['card_expiry_month'] = $this->getCard()->getExpiryDate('m'); $data['card_expiry_year'] = $this->getCard()->getExpiryDate('y'); $data['card_address1'] = $this->getCard()->getBillingAddress1(); $data['card_address2'] = $this->getCard()->getBillingAddress2(); $data['card_city'] = $this->getCard()->getBillingCity(); $data['card_state'] = $this->getCard()->getBillingState(); $data['card_postcode'] = $this->getCard()->getBillingPostcode(); $data['card_country'] = $this->getCard()->getBillingCountry(); $data['card_email'] = $this->getCard()->getEmail(); $data['cvd_code'] = $this->getCard()->getCvv(); return $data; }