我正在尝试编写支付网关 我收到了这个错误:
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
有什么问题?
由于
答案 0 :(得分:0)
您必须在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]);