Razorpay Payment Gateway Ko Codeigniter Website Me Kaise Integrate Kare

Razorpay  payment Gateway Integration in codeigniter


Hello Friends Ajj Me Apko Btaunga Ki Aap Kis Parkar Apne Codeignitor Website Me Razorpay Payment Gateway Integrate Kar Sakte Ho.
Steps-
·         Sabse Pehle Aap Codeignitor Ko Open Karke   Wanha  Application  Folder Open Kijiye Ab Application Folder Ke Ander View Folder Open Kijiye
·         Ab View Folder Me home.php Name Se Ek File Create Kar Lijiye
·         Ab us home.php File Me Niche Diya Gya Code Paste Karke Save Kar Dijiye.

home.php  in view folder-


<br>

<br>

<br>

<center>



<html>

<head>





<meta name="viewport" content="width=device-width">



<script>

function loadDoc() {

  var xhttp;

  if (window.XMLHttpRequest) {

    // code for modern browsers

    xhttp = new XMLHttpRequest();

    } else {

    // code for IE6, IE5

    xhttp = new ActiveXObject("Microsoft.XMLHTTP");

  }

  xhttp.onreadystatechange = function() {

    if (this.readyState == 4 && this.status == 200) {

      document.getElementById("demo").innerHTML = this.responseText;

    }

  };

  xhttp.open("GET", "config.php", true);

  xhttp.send();

}

</script>

</head>

<form action="" method="POST">

<!-- Note that the amount is in paise = 50 INR -->

<script

    src="https://checkout.razorpay.com/v1/checkout.js"

    data-key="rzp_test_U0eIdyQGgrjflX"

    data-amount="5000"

    data-buttontext="Pay with Razorpay"

    data-name="sonuwap.ga"

    data-description="this is demo"

    data-image="https://your-awesome-site.com/your_logo.jpg"

    data-prefill.name="Harshil Mathur"

    data-prefill.email="support@razorpay.com"

    data-theme.color="#F37254"

></script>

<input type="hidden" value="Hidden Element" name="hidden">

</form>





<?php

echo "<pre>";

print_r($_POST);

die;

?>



</center>

·         Ab Apko Controller Folder Open Karke  Wanha Ek Controller home.php Create Karna Hai
·         home.php in controller folder
Ab Aap Niche Diye Gye Code ko home.php in Controller Folder Me Paste Karke Save Kar Dijiye.


home.php in controller folder-



<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');



class Home extends CI_Controller {



/**

* Index Page for this controller.

*

* Maps to the following URL

* http://example.com/index.php/welcome

* - or -

* http://example.com/index.php/welcome/index

* - or -

* Since this controller is set as the default controller in

* config/routes.php, it's displayed at http://example.com/

*

* So any other public methods not prefixed with an underscore will

* map to /index.php/welcome/<method_name>

* @see http://codeigniter.com/user_guide/general/urls.html

*/

public function index()

{

                $this->load->view('header');

$this->load->view('home');

}

     }



/* End of file welcome.php */

/* Location: ./application/controllers/welcome.php */

    Ab Apko Route Set Karna Hai Iske Liye Aap Apne
·         Config Folder Open Kijiye Wanha route.php File Open Kijiye  And Wanha

$route['default_controller'] = "home";
$route['404_override'] = '';

·         Default _controller home set kar lijiye.
·         Ab aap ise save kar dijiye.

 Youtube video link-https://youtu.be/9A8Ij76hWQQ
Is Parkar Apka Rajorpay Payment Gateway Codeigneter Me Integrate Ho Jayega.
Agar Apko Koi Be Problem A Rhe Hai To Aap Comment Section Me Puch Sakte Hai Me Apki Help Karunga
Thank You
Team Gajabwap Web In Hindi

Previous
Next Post »

1 comments:

Click here for comments
Anonymous
admin
25 May 2018 at 21:49 ×

nice information sir mujhe apke Blog ki ek bat bhut achi lagti hai aap mostly sbhi post ka demo link De dete Ho

Congrats bro Anonymous you got PERTAMAX...! hehehehe...
Reply
avatar
Thanks for your comment