forked from sslevins/erp-ebay
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1183716
Showing
5,786 changed files
with
1,366,660 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
/** | ||
* 对整个SDK进行配置的基类 | ||
* @package | ||
* @license | ||
* @author seaqi | ||
* @contact [email protected] / [email protected] | ||
* @version $Id: class.config.php 2011-07-20 15:56:00 | ||
*/ | ||
|
||
class Configuration { | ||
//在线订单操作 | ||
const ORDERS_OPERATION_URLS = 'http://api.4pxtech.com/OrderOnlineService.sv?wsdl'; | ||
|
||
//在线订单工具 | ||
const ORDERS_TOOLS_URLS = 'http://api.4pxtech.com/OrderOnlineToolService.sv?wsdl'; | ||
|
||
//const AUTHTOKEN = '1010'; | ||
|
||
const DEBUG = true; | ||
|
||
|
||
|
||
/* | ||
public static function debug($debugMessage) { | ||
$debug_logfile_path = 'D:/xampp/www/4px_sdk/log/myDEBUG-' . time() . '-' . mt_rand(1000,999999) . '.log';; | ||
if(self::DEBUG) { | ||
@ini_set('log_errors', 1); // store to file | ||
@ini_set('log_errors_max_len', 0); // unlimited length of message output | ||
@ini_set('display_errors', 1); // do not output errors to screen/browser/client | ||
@ini_set('error_log', $debug_logfile_path); // the filename to log errors into | ||
@ini_set('error_reporting', $debugMessage ); | ||
} else { | ||
@ini_set('display_errors', 0); | ||
} | ||
} | ||
*/ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
<?php | ||
/** | ||
* 在线订单操作类,负责核心的wsdl操作请求 | ||
* @package | ||
* @license | ||
* @author seaqi | ||
* @contact [email protected] / [email protected] | ||
* @version $Id: class.orderonline.php 2011-07-20 15:56:00 | ||
*/ | ||
class OrderOnline { | ||
private static $soapClient; | ||
|
||
|
||
public function __construct() { | ||
$fileName = 'Configuration.php'; | ||
isset($GLOBALS[$fileName]) or (($GLOBALS[$fileName] = 1) and require $fileName);//替代require_once | ||
|
||
$fileName = 'Struct.php'; | ||
isset($GLOBALS[$fileName]) or (($GLOBALS[$fileName] = 1) and require $fileName); | ||
if(is_null(self::$soapClient) || !is_object(self::$soapClient)) {//多次操作有明显效果 | ||
try { | ||
self::$soapClient = new SoapClient(Configuration::ORDERS_OPERATION_URLS,array(true));//这里的联网时间长达99.99%【应按需请求】 | ||
} catch (Exception $e) { | ||
if(Configuration::DEBUG) { | ||
printf("网络连接故障<br />Message = %s",$e->__toString()); | ||
} | ||
exit(); | ||
} | ||
} | ||
} | ||
|
||
private static function common($inputStructMethodName,$customerParameter) { | ||
try { | ||
$params = call_user_func_array(array('Struct',$inputStructMethodName),$customerParameter); | ||
|
||
$result = self::$soapClient->__soapCall($inputStructMethodName,array($params)); | ||
|
||
$arr = Struct::outputStruct($result); | ||
|
||
if(is_array($arr) && !empty($arr)) { | ||
return $arr; | ||
} else { | ||
return false; | ||
} | ||
|
||
} catch (Exception $e) { | ||
if(Configuration::DEBUG) { | ||
printf("方法执行错误<br />Message = %s",$e->__toString()); | ||
} | ||
exit(); | ||
} | ||
} | ||
|
||
public function __call($inputStructMethodName,$customerParameter) {//依赖接口开发的原则【有没有?接口说得算】 | ||
try { | ||
$tmp = self::$soapClient->__getFunctions(); | ||
if(is_array($tmp)) { | ||
foreach($tmp as $theValue) { | ||
$pos = strpos(strtolower($theValue), strtolower($inputStructMethodName)); | ||
if($pos === false) { | ||
continue; | ||
} else { | ||
return self::common($inputStructMethodName, $customerParameter); | ||
} | ||
} | ||
|
||
//以上没有正常return说明没有找到指定方法 | ||
throw new Exception('当前没有此服务方法,请检查方法名是否有误'); | ||
} else { | ||
$pos = strpos($tmp, (string)$inputStructMethodName); | ||
if($pos === false) | ||
throw new Exception('当前没有此服务方法,请检查方法名是否有误'); | ||
else | ||
return self::common($inputStructMethodName,$customerParameter); | ||
} | ||
} catch (Exception $e) { | ||
if(Configuration::DEBUG) { | ||
printf("检查方法时出错:<br />Message = %s",$e->__toString()); | ||
} | ||
exit(); | ||
} | ||
} | ||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
<?php | ||
/** | ||
* 在线订单操作工具类,负责核心的wsdl操作请求 | ||
* @package | ||
* @license | ||
* @author seaqi | ||
* @contact [email protected] / [email protected] | ||
* @version $Id: class.orderonlinetool.php 2011-07-20 15:56:00 | ||
*/ | ||
class OrderOnlineTools { | ||
private static $soapClient; | ||
|
||
|
||
public function __construct() { | ||
$fileName = 'Configuration.php'; | ||
isset($GLOBALS[$fileName]) or (($GLOBALS[$fileName] = 1) and require $fileName);//替代require_once | ||
|
||
$fileName = 'Struct.php'; | ||
isset($GLOBALS[$fileName]) or (($GLOBALS[$fileName] = 1) and require $fileName); | ||
|
||
if(is_null(self::$soapClient) || !is_object(self::$soapClient)) {//多次操作有明显效果 | ||
try { | ||
self::$soapClient = new SoapClient(Configuration::ORDERS_TOOLS_URLS,array(true));//这里的联网时间长达99.99%【应按需请求】 | ||
} catch (Exception $e) { | ||
if(Configuration::DEBUG) { | ||
printf("网络连接故障<br />Message = %s",$e->__toString()); | ||
} | ||
exit(); | ||
} | ||
} | ||
} | ||
|
||
private static function common($inputStructMethodName,$customerParameter) { | ||
try { | ||
$params = call_user_func_array(array('Struct',$inputStructMethodName),$customerParameter); | ||
|
||
$result = self::$soapClient->__soapCall($inputStructMethodName,array($params)); | ||
|
||
$arr = Struct::outputStruct($result); | ||
|
||
if(is_array($arr) && !empty($arr)) { | ||
return $arr; | ||
} else { | ||
return false; | ||
} | ||
|
||
} catch (Exception $e) { | ||
if(Configuration::DEBUG) { | ||
printf("方法执行错误<br />Message = %s",$e->__toString()); | ||
} | ||
exit(); | ||
} | ||
} | ||
|
||
public function __call($inputStructMethodName,$customerParameter) {//依赖接口开发的原则【有没有?接口说得算】 | ||
try { | ||
$tmp = self::$soapClient->__getFunctions(); | ||
if(is_array($tmp)) { | ||
foreach($tmp as $theValue) { | ||
$pos = strpos(strtolower($theValue), strtolower($inputStructMethodName)); | ||
if($pos === false) { | ||
continue; | ||
} else { | ||
return self::common($inputStructMethodName, $customerParameter); | ||
} | ||
} | ||
|
||
//以上没有正常return,说明没有找到指定方法 | ||
throw new Exception('当前没有此服务方法,请检查方法名是否有误'); | ||
} else { | ||
$pos = strpos($tmp, (string)$inputStructMethodName); | ||
if($pos === false) | ||
throw new Exception('当前没有此服务方法,请检查方法名是否有误'); | ||
else | ||
return self::common($inputStructMethodName,$customerParameter); | ||
} | ||
} catch (Exception $e) { | ||
if(Configuration::DEBUG) { | ||
printf("检查方法时出错:<br />Message = %s",$e->__toString()); | ||
} | ||
exit(); | ||
} | ||
} | ||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Oops, something went wrong.