title: Integration Of Razorpayx using curl php
body: <p>Razorpayx curl code :</p>
  
  <pre><code>curl -u &lt;YOUR_KEY&gt;:&lt;YOUR_SECRET&gt; \-X POST https://api.razorpay.com/v1/contacts \-H "Content-Type: application/json" \-d '{  "name": "Gaurav Kumar",  "email": "gaurav.kumar@example.com",  "contact": "9123456789",  "type": "employee",  "reference_id": "Acme Contact ID 12345",  "notes": {    "note_key": "Beam me up Scotty"  }}'
  </code></pre>
  
  <p>Trying to implement the same from curl-php:</p>
  
  <pre><code>$ch = curl_init();
  
  $curlConfig = array(
      CURLOPT_URL            =&gt; "https://api.razorpay.com/v1/contacts/",
      CURLOPT_POST           =&gt; true,
      CURLOPT_RETURNTRANSFER =&gt; true,
      CURLOPT_HTTPHEADER     =&gt; array(
          'api-key' =&gt; '&lt;KEY&gt;:&lt;SECRET-KEY&gt;'
  
          ),
      CURLOPT_POSTFIELDS     =&gt; array(
          'name' =&gt; 'ABCD',
          'email' =&gt; "abcd@gmail.com",
          'type' =&gt; 'customer'
      )
  );
  curl_setopt_array($ch, $curlConfig);
  $result = curl_exec($ch);
  curl_close($ch);
  </code></pre>
  
  <p>Now it is given the error that "Please provide your api key for authentication purposes."
  I have already passed the keys via curl header; but it throws error. Please guide how to solve this issue.</p>