I am integrating a payment gateway using SOAP. When i am calling service function using Wamp its working well. But on my live server it is giving folloing error- Class 'SoapClient' not found
the code i am using is
<?php
try
{
$soap_client=new SoapClient("WebServiceLink/service.asmx?WSDL");
$quote=$soap_client->PGI_TRANS("PassedParameter");
echo $quote->PGI_TRANSResult;
}
catch(SoapFault $exception)
{
echo $exception->getmessage();
}
?>
enable your soap extension in php. open php.ini find the line have "php_soap" and uncomment this line, restart web server, problem solved.
You shouldn't have to modify php.ini to enable soap on modern distributions. If it's not enabled, the package probably isn't installed. Once you install the correct package, your distro should enable the correct php.ini settings for you.
On Ubuntu:
sudo apt-get install php-soap
will install and enable the soap extensions for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With