我创建了一个PHP soap客户端,用于在我的网站中集成支付网关。但在处理过程中出现 ERROR Fault,提供了详细信息。在运行我的代码时
SOAP请求xml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://olp.bank.com/payement/service/olppaymentmanager/req">
<soapenv:Header/>
<soapenv:Body>
<req:initiatePaymentDetailsReq>
<olpIdAlias>****</olpIdAlias>
<merchantId>****</merchantId>
<merchantRefNum>897465161</merchantRefNum>
<paymentAmount>100</paymentAmount>
<paymentCurrency>USD</paymentCurrency>
<dynamicMerchantLandingURL></dynamicMerchantLandingURL>
<dynamicMerchantFailureURL></dynamicMerchantFailureURL>
</req:initiatePaymentDetailsReq>
</soapenv:Body>
</soapenv:Envelope>
php代码
include 'initiatePaymentDetailsReq.php';
$wsdl = dirname(__FILE__).'/librb/RB_OLP_INITIATE_PAYMENT.wsdl';
$endpoint = 'https://b2b.bank.com/soap?service=RB_OLP_INITIATE_PAYMENT';
$local_cert = dirname(__FILE__)."/key1.pem";
$passphrase = "*****";
$options = array(
'location' => $endpoint,
'keep_alive' => true,
'trace' => true,
'local_cert' => $local_cert,
'passphrase' => $passphrase,
'cache_wsdl' => WSDL_CACHE_NONE,
'exceptions' => 0
);
try{
$client = new SoapClient($wsdl,$options);
} catch (SoapFault $E) {
echo $E->getMessage();
}
if ($client) {
$in=new StdClass();
$in->olpIdAlias='****';
$in->merchantId='***';
$in->merchantRefNum='6484561464';
$in->paymentAmount='100';
$in->paymentCurrency='USD';
$in->dynamicMerchantLandingURL='';
$in->dynamicMerchantFailureURL='';
try{
$response = $client->executeRB_OLP_INITIATE_PAYMENT($in);
var_dump($response);
}catch(Exception $ex) {
die($ex->getMessage());
}
}
任何人都可以帮我找到代码中的错误吗??