在Windows XP Professional SP3上运行XAMPP 1.7.3
Zend包是最新版本,已于2011年1月11日更新
代码:
static function processCreditCard($account_number, $policy_number, $amount, $card_number, $card_exp, $first_name, $last_name, $street, $city, $state, $zip, $email, $ip) {
$return_obj = new stdclass();
$return_obj->reference_code = $request->merchantReferenceCode;
$return_obj->processor_request_id = $reply->requestID;
$return_obj->status = $reply->decision;
$return_obj->reason_code = $reply->reason_code;
//should return the object
return $return_obj;
}
响应:
Fatal error: Uncaught exception 'Zend_XmlRpc_Client_FaultException' with message 'Failed to parse response' in C:\xampp\xampp\php\PEAR\Zend\XmlRpc\Client.php:370
Stack trace:
0 C:\xampp\xampp\htdocs\dev\webserviceTest.php(130): Zend_XmlRpc_Client->call('Payment.process...', Array)
1 {main}
thrown in C:\xampp\xampp\php\PEAR\Zend\XmlRpc\Client.php on line 370
但是,如果我在本地调用此方法而不使用XML-RPC,我会得到以下内容,这与我对XML-RPC的期望类似:
stdClass Object
(
[reference_code] => 201101120000000093
[processor_request_id] => 2948483462210008284268
[status] => ACCEPT
[reason_code] =>
)
在Debian服务器上运行相同的代码时,我们没有这个问题。