title: Razorpay is not defined
body: <p>I am first time integrating the payment gateway. I found some code using gateway doc and code is something like</p>
  
  <pre><code>&lt;form action="/purchase" method="POST"&gt;
           &lt;!--Note that the amount is in paise = 50 INR --&gt;
          &lt;script
              src="https://checkout.razorpay.com/v1/checkout.js"
              data-key="************"
              data-amount="100"
              data-buttontext="proceed to payment"
              data-name="test"
              data-description="Purchase Description"
              data-image="logo"
              data-prefill.name="mnbvc"
              data-prefill.email="adsdasdd"
              data-theme.color="#F37254"
          &gt;&lt;/script&gt;
          &lt;input type="hidden" value="Hidden Element" name="hidden"&gt;
  
          &lt;/form&gt;
  </code></pre>
  
  <p>and It's working If I clicked on <code>proceed to payment</code> button.</p>
  
  <p>Now What I did, I change the code and added one button called as </p>
  
  <pre><code>&lt;input type="button" id="proceedToPayment" name="proceedToPayment" value="Proceed To Payment"&gt;
  </code></pre>
  
  <p>If any user clicks on the button then it will call the function which is below but it's not working. In the console, I am getting the error <code>Razorpay is not defined</code>.</p>
  
  <pre><code>$("#proceedToPayment").click(function(e){
      payeeamount = $("#totalDetails").val();
      var options = {
      "key": "*******",
      "amount":payeeamount, // 2000 paise = INR 20
      "name": "dasd",
      "description": "Purchase Description",
      "image": "logo",
      "handler": function (response){
        /*.razorpay_payment_id*/
        confirmpayment(response);
      },
      "prefill": {
        "name": "",
        "email": ""
      },
      "theme": {
        "color": "#F37254"
      }
    };
    var rzp1 = new Razorpay(options);
      rzp1.open();
      e.preventDefault();
  });
  
  function confirmpayment(response){
      response['action']='processSessionReq';
      $.ajax({
        type:"POST",
        url:"processpage.php",
        data: response,       
        success: function (data) {
          window.location = "TransactionSuccess.php";
        }
      });
    }
  </code></pre>