public function hamed_pdateBack($inp, $saat = TRUE) { $out = FALSE; $tmp = explode("/", $inp); if (count($tmp) == 3) { $out = audit_class::hamed_jalalitomiladi(audit_class::perToEn($inp)); } return $out . ($saat ? " 12:00:00" : ''); }
function hamed_pdateBack1($inp) { $out = FALSE; $tmp = explode("/", $inp); if (count($tmp) == 3) { $y = (int) $tmp[2]; $m = (int) $tmp[1]; $d = (int) $tmp[0]; if ($d > $y) { $tmp = $y; $y = $d; $d = $tmp; } if ($y < 1000) { $y = $y + 1300; } $inp = "{$y}/{$m}/{$d}"; $out = audit_class::hamed_jalalitomiladi(audit_class::perToEn($inp)); } return $out; }
public function pay($reserve_id, $amount) { $conf = new conf(); $out = FALSE; $client = new soapclient_nu($conf->mellat_wsdl); //'https://pgws.bpm.bankmellat.ir/pgwchannel/services/pgw?wsdl'); $namespace = $conf->mellat_namespace; //'http://interfaces.core.sw.bps.com/'; $terminalId = $conf->mellat_terminalId; $userName = $conf->mellat_userName; $userPassword = $conf->mellat_userPassword; $orderId = $reserve_id; $amount = audit_class::perToEn($amount); $localDate = date("Ymd"); $localTime = date("His"); $additionalData = ''; $callBackUrl = $conf->mellat_callBackUrl; $payerId = 0; $parameters = array('terminalId' => $terminalId, 'userName' => $userName, 'userPassword' => $userPassword, 'orderId' => $orderId, 'amount' => $amount, 'localDate' => $localDate, 'localTime' => $localTime, 'additionalData' => $additionalData, 'callBackUrl' => $callBackUrl, 'payerId' => $payerId); // Call the SOAP method $result = $client->call('bpPayRequest', $parameters, $namespace); if ($client->fault) { // } else { // Check for errors $resultStr = $result; $err = $client->getError(); if ($err) { // Display the error } else { $out = $result; } } return $out; }