Схема
public mixed
doSearch (
)
Аргументы
| Аргумент |
Возможный тип |
Описание |
|
У метода нет аргументов
|
Описание
Метод пока еще не документирован.
Исходный код
/**
* used to search for transactions from a user account
*/
if(isset($this->request->post['date_start'])) {
$this->load->model('payment/pp_express');
$call_data = array();
$call_data['METHOD'] = 'TransactionSearch';
$call_data['STARTDATE'] = gmdate($this->request->post['date_start']."\TH:i:s\Z");
if(!empty($this->request->post['date_end'])) {
$call_data['ENDDATE'] = gmdate($this->request->post['date_end']."\TH:i:s\Z");
}
if(!empty($this->request->post['transaction_class'])) {
$call_data['TRANSACTIONCLASS'] = $this->request->post['transaction_class'];
}
if(!empty($this->request->post['status'])) {
$call_data['STATUS'] = $this->request->post['status'];
}
if(!empty($this->request->post['buyer_email'])) {
$call_data['EMAIL'] = $this->request->post['buyer_email'];
}
if(!empty($this->request->post['merchant_email'])) {
$call_data['RECEIVER'] = $this->request->post['merchant_email'];
}
if(!empty($this->request->post['receipt_id'])) {
$call_data['RECEIPTID'] = $this->request->post['receipt_id'];
}
if(!empty($this->request->post['transaction_id'])) {
$call_data['TRANSACTIONID'] = $this->request->post['transaction_id'];
}
if(!empty($this->request->post['invoice_number'])) {
$call_data['INVNUM'] = $this->request->post['invoice_number'];
}
if(!empty($this->request->post['auction_item_number'])) {
$call_data['AUCTIONITEMNUMBER'] = $this->request->post['auction_item_number'];
}
if(!empty($this->request->post['amount'])) {
$call_data['AMT'] = number_format($this->request->post['amount'], 2);
$call_data['CURRENCYCODE'] = $this->request->post['currency_code'];
}
if(!empty($this->request->post['profile_id'])) {
$call_data['PROFILEID'] = $this->request->post['profile_id'];
}
if(!empty($this->request->post['name_salutation'])) {
$call_data['SALUTATION'] = $this->request->post['name_salutation'];
}
if(!empty($this->request->post['name_first'])) {
$call_data['FIRSTNAME'] = $this->request->post['name_first'];
}
if(!empty($this->request->post['name_middle'])) {
$call_data['MIDDLENAME'] = $this->request->post['name_middle'];
}
if(!empty($this->request->post['name_last'])) {
$call_data['LASTNAME'] = $this->request->post['name_last'];
}
if(!empty($this->request->post['name_suffix'])) {
$call_data['SUFFIX'] = $this->request->post['name_suffix'];
}
$result = $this->model_payment_pp_express->call($call_data);
if($result['ACK'] != 'Failure' && $result['ACK'] != 'FailureWithWarning') {
$response['error'] = false;
$response['result'] = $this->formatRows($result);
$this->response->setOutput(json_encode($response));
} else {
$response['error'] = true;
$response['error_msg'] = $result['L_LONGMESSAGE0'];
}
$this->response->setOutput(json_encode($response));
} else {
$response['error'] = true;
$response['error_msg'] = 'Enter a start date';
$this->response->setOutput(json_encode($response));
}