public function authorizenotify() { //dump($_POST); $AuthorizeTypeOpen = $_POST["AuthorizeTypeOpen"]; $AuthorizeTypeClose = $_POST["AuthorizeTypeClose"]; $MoneymoremoreId = $_POST['MoneymoremoreId']; if ($_POST["ResultCode"] == '88') { import("ORG.Loan.Escrow"); $loan = new Escrow(); if ($loan->Authorizenotify($_POST)) { $escrow = M('escrow_account'); $open = $AuthorizeTypeOpen; strpos(',', $AuthorizeTypeOpen) && ($open = explode(',', $AuthorizeTypeOpen)); $close = $AuthorizeTypeClose; strpos(',', $AuthorizeTypeClose) && ($close = explode(',', $AuthorizeTypeClose)); if (strstr($close, '1')) { $auth['invest_auth'] = '0'; } else { if (strstr($open, '1')) { $auth['invest_auth'] = '1'; } } if (strstr($close, '2')) { $auth['repayment'] = '0'; } else { if (strstr($open, '2')) { $auth['repayment'] = '1'; } } if (strstr($close, '3')) { $auth['secondary_percent'] = '0'; } else { if (strstr($open, '3')) { $auth['secondary_percent'] = '1'; } } $info = $escrow->field('uid')->where(array(qdd_marked => $MoneymoremoreId))->find(); //dump($info); $nid = $escrow->where(array('uid' => $info['uid']))->save($auth); if ($nid) { echo 'SUCCESS'; } } } }
public function authorizenotify() { $MoneymoremoreId = $_POST["MoneymoremoreId"]; $PlatformMoneymoremore = $_POST["PlatformMoneymoremore"]; $AuthorizeTypeOpen = $_POST["AuthorizeTypeOpen"]; $AuthorizeTypeClose = $_POST["AuthorizeTypeClose"]; $AuthorizeType = $_POST["AuthorizeType"]; $RandomTimeStamp = $_POST["RandomTimeStamp"]; $Remark1 = $_POST["Remark1"]; $Remark2 = $_POST["Remark2"]; $Remark3 = $_POST["Remark3"]; $ResultCode = $_POST["ResultCode"]; $SignInfo = $_POST["SignInfo"]; //$dataStr = //$MoneymoremoreId.$PlatformMoneymoremore.$AuthorizeTypeOpen.$AuthorizeTypeClose.$AuthorizeType.$RandomTimeStamp.$Remark1.$Remark2.$Remark3.$ResultCode; import("ORG.Loan.Escrow"); $loan = new Escrow(); if ($verifySignature = $loan->Authorizenotify($_POST)) { } $model = M('escrow_account'); //dump($AuthorizeTypeOpen); $Open = explode(',', $AuthorizeTypeOpen); $close = explode(',', $AuthorizeTypeClose); if ($ResultCode == '88') { if (is_array($Open)) { if (in_array('1', $Open)) { $auth['invest_auth'] = '1'; } if (in_array('2', $Open)) { $auth['repayment'] = '1'; } if (in_array('3', $Open)) { $auth['secondary_percent'] = '1'; } } if (is_array($close)) { if (in_array('1', $close)) { $auth['invest_auth'] = '0'; } if (in_array('2', $close)) { $auth['repayment'] = '0'; } if (in_array('3', $close)) { $auth['secondary_percent'] = '0'; } } //dump($auth); $nid = $model->where("uid=" . $this->uid)->save($auth); //dump($nid);exit; } }