title: How Can I enforce TLS 1.2 when using nusoap?
body: <p>I am using nusoap to connect Eway legacy Api. Suddenly Eway enforce TLS 1.2 on their side. So I have set open ssl 1.0 and TLS 1.2 in my server. </p>
  
  <p>From that server I am connecting Eway rapid api which is working fine. As both Legacy and Rapid api needs TLS 1.2 and rapid is working fine that means our server setup i ok. But this legacy api connection is not working.</p>
  
  <p>I need to enforce TLS 1.2 by code when I am connecting Eway legacy API using nusoap.</p>
  
  <p>Code Example - </p>
  
  <pre><code>&lt;?php
  
  $client = new nusoap_client("https://www.eway.com.au/gateway/rebill/manageRebill.asmx");
  $client-&gt;namespaces['man'] = 'http://www.eway.com.au/gateway/rebill/manageRebill';
  $headers = "&lt;man:eWAYHeader&gt;&lt;man:eWAYCustomerID&gt;****&lt;/man:eWAYCustomerID&gt;&lt;man:Username&gt;****&lt;/man:Username&gt;&lt;man:Password&gt;****&lt;/man:Password&gt;&lt;/man:eWAYHeader&gt;";
  $client-&gt;setHeaders($headers);
  
  $requestbody = array();
  $soapactionUrl = 'http://www.eway.com.au/gateway/rebill/manageRebill/';
  $requestbody['man:RebillCustomerID'] = $eway_rebill_customer_id;
  $requestbody['man:RebillID'] = $eway_rebill_id;
  $soapaction = 'QueryRebillEvent';
  $client = $this-&gt;_creatEwayRebillRequestHeader();
  
  $result = $client-&gt;call('man:'.$soapaction, $requestbody, '', $soapactionUrl.$soapaction,true);
  $err_msg = $client-&gt;getError();
  echo $err_msg;
  ?&gt;
  </code></pre>
  
  <p>The error massage what I am getting is - </p>
  
  <blockquote>
    <p>wsdl error: Getting <code>https://www.eway.com.au/gateway/rebill/manageRebill.asmx</code> - HTTP ERROR: Unsupported HTTP response status 403 Forbidden (soapclient->response has contents of the response)</p>
  </blockquote>
  
  <p><strong>I am sure about my credentials, also eway support team also told me to enforce TLS 1.2 to solve the issue. But I don't know how to enforce TLS 1.2 in the nusoap library.</strong></p>