src/ChenPay/AliPay.php
public function DataContrast($fee, $time, $Minute = 3, $Remarks = false)
    {
        // TODO: Implement DataContrast() method.
//        print_r($this->json['result']['detail']);
        if (isset($this->json['result']['detail']) && is_array($this->json['result']['detail']))
            foreach ($this->json['result']['detail'] as $item) {
                if ((
                        ($this->url && $item['tradeFrom'] == '外部商户' && $item['direction'] == '卖出' &&
                            strtotime($item['gmtCreate']) > $time - $Minute * 60 && strtotime($item['gmtCreate']) < $time &&
                            $item['totalAmount'] == $fee) ||
                        (!$this->url && $item['signProduct'] == '转账收款码' && $item['accountType'] == '交易' &&
                            strtotime($item['tradeTime']) > $time - $Minute * 60 && strtotime($item['tradeTime']) < $time &&
                            $item['tradeAmount'] == $fee)
                    ) && ($Remarks === false || ($Remarks != '' && (preg_match("/{$Remarks}/", $item['goodsTitle'])) ||
                            ($Remarks == '' && $item['goodsTitle'] == '商品')))) {
                    return $item['tradeNo'];
                }
            }

        return false;
    }
public function DataContrast($fee, $time, $Minute = 3, $Remarks = false)
    {
        // TODO: Implement DataContrast() method.
//        print_r($this->json['result']['detail']);
        if (isset($this->json['result']['detail']) && is_array($this->json['result']['detail']))
            foreach ($this->json['result']['detail'] as $item) {
                if ((
                        ($this->url && $item['tradeFrom'] == '外部商户' && $item['direction'] == '卖出' &&
                            strtotime($item['gmtCreate']) > $time - $Minute * 60 && strtotime($item['gmtCreate']) < $time &&
                            $item['totalAmount'] == $fee) ||
                        (!$this->url && $item['signProduct'] == '转账收款码' && $item['accountType'] == '交易' &&
                            strtotime($item['tradeTime']) > $time - $Minute * 60 && strtotime($item['tradeTime']) < $time &&
                            $item['tradeAmount'] == $fee)
                    ) && ($Remarks === false || ($Remarks != '' && (preg_match("/{$Remarks}/", $item['goodsTitle'])) ||
                            ($Remarks == '' && $item['goodsTitle'] == '商品')))) {
                    return $item['tradeNo'];
                }
            }

        return false;
    }
获取最新的订单号
@param $fee
@param $time
@param int $Minute
@param bool $Remarks
@return array|bool