<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\PayCenter\Web\Support; use Illuminate\Support\Facades\Log; use Module\PayCenter\Type\PayType; use Module\PayCenter\Util\PayOrderUtil; use Payment\Notify\PayNotifyInterface; class PayAlipayWebNotify implements PayNotifyInterface { private $payType = null; public function __construct($xN3qr) { $this->payType = $xN3qr; } public function notifyProcess(array $smBDO) { switch ($smBDO['trade_status']) { case 'TRADE_SUCCESS': case 'TRADE_FINISHED': goto W5dG2; ltYKa: $Gs3Xd = PayOrderUtil::handleOrderPay($this->payType, $smBDO['out_trade_no'], array('payOrderId' => $smBDO['trade_no'])); goto FFcW9; UKuGj: return true; goto NkUEi; FFcW9: if ($Gs3Xd['code']) { return false; } goto UKuGj; W5dG2: Log::info('PayCenter.PayAlipayWebNotify.Success', array('out_trade_no' => $smBDO['out_trade_no'], 'trade_no' => $smBDO['trade_no'])); goto ltYKa; NkUEi: } return true; } }