title: How to integrate razorpay payment gateway in codeigniter
body: <p>Hi i am trying to integrate razorpay payment gateway in codeigniter. The code that I'm using is</p>
  
  <p>View Code</p>
  
  <pre><code>&lt;?php echo form_open_multipart('user/addcredit/'); ?&gt;
      &lt;div class="form-group"&gt;
          &lt;script
              src="https://checkout.razorpay.com/v1/checkout.js"
              data-key="razorpay_key"&gt;
          &lt;/script&gt;
      &lt;/div&gt;
  &lt;?php echo form_close(); ?&gt;
  </code></pre>
  
  <p>Controller code</p>
  
  <pre><code>class User extends CI_Controller
  {
      public function addcredit()
      {
          require_once (APPPATH . 'base_url()/litehires/assets/razorpay-php/Razorpay.php');
  
          use Razorpay\Api\Api;
  
          $api = new Api('rzp_test_KEY_ID', ''rzp_test_KEY_ID');
  
          if (isset($_POST['razorpay_payment_id']) === false) {
              die("Payment id not provided");
          }
  
          $id = $_POST['razorpay_payment_id'];
  
          echo json_encode($payment-&gt;toArray());
      }
  }
  </code></pre>
  
  <p>What I got to know is that I cannot use 'use' keyword inside the function. But I'm not able to find alternative way to do the integration. I haven't use composer, so would appreciate if anyone could please tell me how to integrate this payment without composer</p>