Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SoapFault exception: [HTTP] Could not connect to host #158

Open
rochmat007 opened this issue Nov 15, 2018 · 1 comment
Open

SoapFault exception: [HTTP] Could not connect to host #158

rochmat007 opened this issue Nov 15, 2018 · 1 comment

Comments

@rochmat007
Copy link

rochmat007 commented Nov 15, 2018

hello,

i have a problem with soapwrapper and got SoapFault exception: [HTTP] Could not connect to host
below my code
public function delimaH2HRequest($data,$signature){
try{

   Log::info("delimaH2H Request ".print_r($data,true));
   SoapWrapper::add('transaction',function ($service) {
                $service
                 ->wsdl(env('DELIMA_URL'))
                 ->cache(WSDL_CACHE_NONE)
                 ->trace(true);
              });
    
  
	  $response=SoapWrapper::call('transaction.billpayment',[
	      'inputBillPayment'   =>[
                            'userName'        => $data['userName'],
		        'signature'       => $signature,
		        'productCode'     => $data['productCode'],
		        'merchantCode'    => $data['merchantCode'],
		        'terminal'        => $data['terminal'],
		        'merchantNumber'  => $data['merchantNumber'],
		        'transactionType' => $data['transactionType'],
		        'billNumber'      => $data['billNumber'],
		        'bit61'           => $data['bit61'],
		        'amount'          => $data['amount'],
		        'feeAmount'       => $data['feeAmount'],
		        'traxId'          => $data['traxId'],
		        'timeStamp'       => $data['timeStamp'],
		        'mcNoHP'          => '',
		        'mcNoeVA'         => '',
		        'pin'             => '',
		        'changePN'        => '',
		        'merchant'        => '',
		        'changeAmount'    => ''
		    ]
      ]); 

    Log::info('delimaH2H response : '.$response->getBody());
	
	
   }catch(\Exception $e){
	
   	  Log::error($e);
	  return $e->getMessage();
   }


   return $response;
}

log Error :

[2018-11-15 11:17:42] development.ERROR: SoapFault exception: [HTTP] Could not connect to host in /var/www/html/finbox/vendor/artisaninweb/laravel-soap/src/Artisaninweb/SoapWrapper/Client.php:189
Stack trace:
#0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'https://demos.f...', 'urn:routeDx2#ro...', 1, 0)
#1 /var/www/html/finbox/vendor/artisaninweb/laravel-soap/src/Artisaninweb/SoapWrapper/Client.php(189): SoapClient->__soapCall('billpayment', Array, Array, NULL, Array)
#2 /var/www/html/finbox/vendor/artisaninweb/laravel-soap/src/Artisaninweb/SoapWrapper/SoapWrapper.php(137): Artisaninweb\SoapWrapper\Client->SoapCall('billpayment', Array, Array)
#3 /var/www/html/finbox/vendor/artisaninweb/laravel-soap/src/Artisaninweb/SoapWrapper/SoapWrapper.php(117): Artisaninweb\SoapWrapper\SoapWrapper->Artisaninweb\SoapWrapper{closure}(Object(Artisaninweb\SoapWrapper\Client))
#4 /var/www/html/finbox/vendor/artisaninweb/laravel-soap/src/Artisaninweb/SoapWrapper/SoapWrapper.php(138): Artisaninweb\SoapWrapper\SoapWrapper->client('transaction', Object(Closure))
#5 /var/www/html/finbox/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(221): Artisaninweb\SoapWrapper\SoapWrapper->call('transaction.bil...', Array)
#6 /var/www/html/finbox/app/MyClass/ApiHandler.php(141): Illuminate\Support\Facades\Facade::__callStatic('call', Array)

@TechNov
Copy link

TechNov commented Sep 30, 2020

Hi have you solve this issue? i face the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants