/** * 支付宝异步通知方法 */ public function notify() { $notify = new AlipayNotify($this->config); $verify = $notify->verifyNotify(); if ($verify) { // 订单号 $orderId = Input::get('out_trade_no', 0); //支付宝交易号 $tradeId = Input::get('trade_no', 0); //交易状态 $tradeStatus = Input::get('trade_status', null); if ($tradeStatus == 'TRADE_FINISHED' or $tradeStatus == 'TRADE_SUCCESS') { AlipayCore::logResult($orderId . '-' . $tradeStatus); $this->updateOrderPayStatus($orderId, $tradeId); echo 'success'; } else { echo 'fail'; } } else { echo 'fail'; } }
public function test() { AlipayCore::logResult(Input::get('name')); }