title: Paypal Integration Using NVP API
body: <p>I'm making ecommerce website for my client and i'm not familiar with payments gateways and API's so i'm facing problem to integrate paypal using Paypal NVP API . I found code snippets on stackoverflow that how to use api but i don't understand what is the html code i mean what is the code for paypal button (How paypal button will appear in webpage).</p>
  
  <pre><code>    $data = array(
      "METHOD" =&gt; "BMCreateButton",
      "VERSION" =&gt; "65.2",
      "USER" =&gt; "myname_api1.yahoo.com",
      "PWD" =&gt; "abcdefg",
      "SIGNATURE" =&gt; "adhiahduiahduohuaohdohaodhahoadhadhoa",
      "BUTTONCODE" =&gt; "ENCRYPTED",
      "BUTTONTYPE" =&gt; "BUYNOW",
      "BUTTONSUBTYPE" =&gt; "SERVICES",
      "BUTTONCOUNTRY" =&gt; "US",
      "BUTTONIMAGE" =&gt; "reg",
      "BUYNOWTEXT" =&gt; "BUYNOW",
      "L_BUTTONVAR0" =&gt; "bussiness=myname@yahoo.com",
      "L_BUTTONVAR1" =&gt; "item_number=$product_id_array",
      "L_BUTTONVAR2" =&gt; "item_name=$product_name",
      "L_BUTTONVAR3" =&gt; "amount=$price",
      "L_BUTTONVAR4" =&gt; "currency_code=US",
      "L_BUTTONVAR5" =&gt; "no_shipping=1",
      "L_BUTTONVAR6" =&gt; "no_note=1",
      "L_BUTTONVAR7" =&gt; "notify_url=https://mysite.net/ecommerce/storescripts/my_ipn.php",
      "L_BUTTONVAR8" =&gt; "cancel_return=https://mysite.net/ecommerce/paypal_cancel.php",
      "L_BUTTONVAR9" =&gt; "return=https://mysite.net/ecommerce/checkout_complete.php"
  );
  $curl = curl_init();
  curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
  curl_setopt($curl, CURLOPT_URL, 'https://api-3t.sandbox.paypal.com/nvp?'.http_build_query($data));
  $nvpPayReturn = curl_exec($curl);
  curl_close($curl);
  }
  </code></pre>
  
  <p><br><br></p>
  
  <p>I add all my api credentials and other things but i dont undertsand what is the html code for the payment button to send data through api using form.</p>
  
  <p>Any kind of help will be appreciated.</p>