简体   繁体   中英

failed to load external entity “https://ws.hipay.com/soap/payment-v2?wsdl”

I'm using a hipay account and used there webservices to integrate in my website laravel.

i used the same code sharing in other project and its works fine but now in other projet it generate an error in the begining of file Saop

SoapFault SOAP-ERROR: Parsing WSDL: Couldn't load from ' https://ws.hipay.com/soap/payment-v2?wsdl ' : failed to load external entity " https://ws.hipay.com/soap/payment-v2?wsdl "

and there is my code

    `$options = array(
    'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP,
    'cache_wsdl' => WSDL_CACHE_NONE,
    'soap_version' => SOAP_1_1,
    'encoding' => 'UTF-8'
    );

    $client = new SoapClient('https://ws.hipay.com/soap/payment-v2?wsdl', 
    $options);`

i used an OVH hosted , Thank you

test this code :

<?php

$opts = array(
'http' => array(
    'user_agent' => 'PHPSoapClient'
)
);
$context = stream_context_create($opts);
$options = [
'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP,
'cache_wsdl' => WSDL_CACHE_NONE,
'soap_version' => SOAP_1_1,
'encoding' => 'UTF-8',
'stream_context' => $context,
];

$client = new SoapClient('https://ws.hipay.com/soap/payment-v2?wsdl',$options);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM