Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
毕凯
9 years ago
Commit
51ab67cb04aca200cf833b95a1587335db0e6828
1 parent
bd3068f0
修改接口地址
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
23 deletions
library/Api/Yohobuy.php
library/Api/Yohobuy.php
View file @
51ab67c
...
...
@@ -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
...
...
Please
register
or
login
to post a comment