[英]SOAP-ERROR: Parsing WSDL in PHP 5.2.17
我正在嘗試編寫一個支付網關。
我收到此錯誤:
SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://pgwstest.bpm.bankmellat.ir/pgwchannel/services/pgw?wsdl' : Start tag expected, '<' not found
生成此代碼是:
$mclient = new SoapClient('https://pgws.bpm.bankmellat.ir/pgwchannel/services/pgw?wsdl',array('soap_version'=>SOAP_1_2,'trace'=>1));
我的PHP版本是5.2.17
問題是什么?
謝謝
您必須在SoapClient對象中為Mellat Bank創建stream_context並將其作為對象的第二個參數傳遞,我希望它能正常工作
$stream_context = stream_context_create(
[
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false
)
]
);
$your_soap_service_url='https://bpm.shaparak.ir/pgwchannel/services/pgw?wsdl';
$soap = new SoapClient($your_soap_service_url, ['stream_context' => $stream_context]);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.