Authored by 梁志锋

Merge remote-tracking branch 'origin/develop' into develop

... ... @@ -11,7 +11,7 @@
namespace Api;
use Plugin\Cache;
use WebPlugin\Cache;
class Yohobuy
{
/* 正式环境 */
... ... @@ -22,21 +22,21 @@ class Yohobuy
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
//java API
const API_URL = 'http://api.yoho.yohoops.org/';//
const API_URL2 = 'http://api.yoho.yohoops.org/';//
const SERVICE_URL = 'http://service.yoho.yohoops.org/';
const YOHOBUY_URL = 'http://www.yohobuy.com/';
const API_OLD = 'http://api2.open.yohobuy.com/';
// 支付回调地址
const SERVICE_NOTIFY = 'http://service.yoho.cn/';
// const API_URL = 'http://api.yoho.yohoops.org/';//
// const API_URL2 = 'http://api.yoho.yohoops.org/';//
// const SERVICE_URL = 'http://service.yoho.yohoops.org/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
// const API_OLD = 'http://api2.open.yohobuy.com/';
// 支付回调地址
// const SERVICE_NOTIFY = 'http://service.yoho.cn/';
// 测试环境 */
// const API_URL = 'http://testapi.yoho.cn:28078/'; // 'http://192.168.102.205:8080/gateway/'
// const SERVICE_URL = 'http://testservice.yoho.cn:28077/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
// const API_OLD = 'http://test2.open.yohobuy.com/';
// // 支付回调地址
// const SERVICE_NOTIFY = 'http://testservice.yoho.cn:28077/';
const API_URL = 'http://testapi.yoho.cn:28078/'; // 'http://192.168.102.205:8080/gateway/'
const SERVICE_URL = 'http://testservice.yoho.cn:28077/';
const YOHOBUY_URL = 'http://www.yohobuy.com/';
const API_OLD = 'http://test2.open.yohobuy.com/';
// 支付回调地址
const SERVICE_NOTIFY = 'http://testservice.yoho.cn:28077/';
/* 预览环境 */
// const API_URL = 'http://preapi.yoho.cn/';
... ... @@ -44,13 +44,13 @@ class Yohobuy
// const SERVICE_URL = 'http://preservice.yoho.cn/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
// const API_OLD = 'http://api2.open.yohobuy.com/';
/**
* 登录老接口Api配置
*/
const API_LOGIN_URL = 'http://api.open.yohobuy.com';
const API_LOGIN_URL_TEST = 'http://test.open.yohobuy.com';
/**
* 私钥列表
*
... ... @@ -63,7 +63,7 @@ class Yohobuy
'web' => '0ed29744ed318fd28d2c07985d3ba633',
'h5' => 'fd4ad5fcfa0de589ef238c0e7331b585',
);
/**
... ... @@ -77,7 +77,7 @@ class Yohobuy
else {
return 'web';
}
// // 苹果设备
// if (strstr($_SERVER['HTTP_USER_AGENT'], 'iPhone')) {
// return 'iphone';
... ... @@ -187,7 +187,7 @@ class Yohobuy
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
if ($useGzip) {
if ($useGzip) {
curl_setopt($ch, CURLOPT_ENCODING, 'gzip');
}
if (!empty($userAgent)) {
... ... @@ -230,7 +230,7 @@ class Yohobuy
public static function post($url, $data = array(), $returnJson = false, $timeout = 10, $header = array(), $cookie = array())
{
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
if (!empty($header)) {
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
... ... @@ -352,7 +352,7 @@ class Yohobuy
continue;
}
$result[$name] = $response['data'];
}
}
else {
$result[$name] = $response;
}
... ... @@ -496,7 +496,7 @@ class Yohobuy
return $result;
}
/**
* 获取用户User-Agent
* @return bool
... ... @@ -508,7 +508,7 @@ class Yohobuy
}
return $_SERVER['HTTP_USER_AGENT'];
}
/**
* 判断是否手机
* @return bool
... ...
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.

48.3 KB | W: | H:

48.3 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

8.64 KB | W: | H:

8.64 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin