SOAP 错误:在 PHP 5.2.17 中解析 WSDL

发布于 2024-12-25 08:31:22 字数 447 浏览 0 评论 0原文

我正在尝试编写一个支付网关。
我收到此错误:

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

有什么问题吗?

谢谢

I'm trying to write a payment gateway.
I'm getting this error:

SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://pgwstest.bpm.bankmellat.ir/pgwchannel/services/pgw?wsdl' : Start tag expected, '<' not found 

the code that is generating this is:

$mclient = new SoapClient('https://pgws.bpm.bankmellat.ir/pgwchannel/services/pgw?wsdl',array('soap_version'=>SOAP_1_2,'trace'=>1));

My PHP version is 5.2.17

What is the problem?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不寐倦长更 2025-01-01 08:31:22

您必须在 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]);

You've to create stream_context for Mellat Bank in SoapClient object and pass it as 2nd parameter of object I hope it will work fine

$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]);
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文