<?php
namespace Payment\Common\Ali\Data\Query; use Payment\Common\Ali\Data\AliBaseData; use Payment\Common\PayException; use Payment\Utils\ArrayUtil; class ChargeQueryData extends AliBaseData { protected function getBizContent() { $content = [ 'out_trade_no' => $this->out_trade_no, 'trade_no' => $this->trade_no, ]; return $content; } protected function checkDataParam() { $tradeNo = $this->trade_no; $outTradeNo = $this->out_trade_no; if (empty($outTradeNo) && empty($tradeNo)) { throw new PayException('必须提供支付宝交易号或者商户网站唯一订单号。建议使用支付宝交易号'); } } } 