title: convert curl to php OAuth2.0 Token Generate Error
body: <pre><code>&lt;?php
  
  $certFile = &quot;/etc/apache2/ssl/thasaix/thasaix_com.crt&quot;;
  $keyFile = &quot;/etc/apache2/ssl/thasaix/thasaix.com.key&quot;;
  $curl = curl_init();
  curl_setopt($curl, CURLOPT_SSLCERT, $certFile);
  curl_setopt($curl, CURLOPT_SSLKEY, $keyFile);
  curl_setopt($curl, CURLOPT_URL, 'https://openapi-test.kasikornbank.com/v2/oauth/token');
  curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($curl, CURLOPT_POST, 1);
  $headers = array();
  $headers[] = 'Content-Type: application/x-www-form-urlencoded';
  $headers[] = 'Authorization: Basic R1FRWkZWcGpJQ0E5Y2xScUFQZVowODhSQTVYTFgzNzk6QTNLNkxjVHU3OTZ1QTZtxxyy';
  curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
  $data = array('grant_type' =&gt; 'client_credentials');
  curl_setopt($curl, CURLOPT_POST, true);
  curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
  $response = curl_exec($curl);
  curl_close($curl);
  print $response;
  
  ?&gt;
  
  
  </code></pre>
  <p>curl --cert /etc/apache2/ssl/thasaix/thasaix_com.crt <br />
  --key /etc/apache2/ssl/thasaix/thasaix.com.key <br />
  --location --request POST 'https://openapi-test.kasikornbank.com/v2/oauth/token' <br />
  --header 'Content-Type: application/x-www-form-urlencoded' <br />
  --header 'Authorization: Basic R1FRWkZWcGpJQ0E5Y2xScUFQZVowODhSQTVYTFgzNzk6QTNLNkxjVHU3OTZ1QTZtxxyy' <br />
  --data-urlencode 'grant_type=client_credentials'</p>
  <p>the result is</p>
  <p>{ &quot;code&quot;: &quot;openapi_error&quot;, &quot;message&quot;: &quot;OAuth2.0 Token Generate Error&quot; }</p>