[更新]修改兼容代码

This commit is contained in:
Anyon 2018-12-19 15:58:04 +08:00
parent 9587b125b8
commit 9e11720287
3 changed files with 9 additions and 3 deletions

View File

@ -93,6 +93,7 @@ abstract class BasicAliPay
* @param string $out_trade_no
* @return array|boolean
* @throws InvalidResponseException
* @throws \WeChat\Exceptions\LocalCacheException
*/
public function query($out_trade_no = '')
{
@ -106,6 +107,7 @@ abstract class BasicAliPay
* @param null $refund_amount 退款金额
* @return array|boolean
* @throws InvalidResponseException
* @throws \WeChat\Exceptions\LocalCacheException
*/
public function refund($options, $refund_amount = null)
{
@ -119,6 +121,7 @@ abstract class BasicAliPay
* @param array|string $options
* @return array|boolean
* @throws InvalidResponseException
* @throws \WeChat\Exceptions\LocalCacheException
*/
public function close($options)
{
@ -210,6 +213,7 @@ abstract class BasicAliPay
* @param array $options
* @return array|boolean
* @throws InvalidResponseException
* @throws \WeChat\Exceptions\LocalCacheException
*/
protected function getResult($options)
{

View File

@ -274,8 +274,9 @@ class Tools
$build = false;
} elseif (is_object($value) && isset($value->datatype) && $value->datatype === 'MY_CURL_FILE') {
$build = false;
$data[$key] = ($myCurlFile = new MyCurlFile((array)$value))->get();
array_push(self::$cache_curl, $myCurlFile->tempname);
$mycurl = new MyCurlFile((array)$value);
$data[$key] = $mycurl->get();
array_push(self::$cache_curl, $mycurl->tempname);
} elseif (is_string($value) && class_exists('CURLFile', false) && stripos($value, '@') === 0) {
if (($filename = realpath(trim($value, '@'))) && file_exists($filename)) {
$build = false;

View File

@ -30,7 +30,8 @@ class Bill extends BasicWePay
* @param array $options 静音参数
* @param null|string $outType 输出类型
* @return bool|string
* @throws \WeChat\Exceptions\InvalidResponseException
* @throws InvalidResponseException
* @throws \WeChat\Exceptions\LocalCacheException
*/
public function download(array $options, $outType = null)
{