php - how to integrate payumoney payment gateway with codeigniter -


i have developed project booking appointments doctors in html,javascript,php web services(codeigniter framework) both website , mobile app.now iam in need of integration payumoney payment gateway.so please me of step step instructions in code.iam new payment integration.

don't take otherwise there no sufficient document payumoney integration in codeigniter in internet in stackoverflow... have solve it... please process step step

  1. if have 'user' controller(say user.php) add function payum() or that. adding code bellow

     function payum()  {  $userid = $this->ion_auth->get_user_id();                 if(is_numeric($userid)) {   $this->data['title'] = 'payu money cash deposit'; $this->data['records']= $this->base_model->run_query("select *      users id=".$userid ); $this->data['content']          = 'user/payum'; $this->_render_page('user/payum', $this->data); } else {     $this->prepare_flashmessage('session expired!', 2);     redirect('auth/login', 'refresh'); } }   
  2. then add page payum.php in view/user (you can modify it...).. adding detail code

    <?php    if(count($records)) { foreach($records $d) { ?> <div class="row margin" style="padding:10%"> <fieldset> <legend>subscription info</legend> <div class="form-group"> <label>name:</label>  <?php echo $d->username;?> <br/>  <label>amount:</label>  <?php echo $d->fees;?><br/>   <label>e-mail:</label>  <?php echo $d->email;?> <br/>  <label>phone:</label>  <?php echo $d->phone;?>  <br/>  </div> </fieldset> <?php  }}  ?> </div> <?php $price=$d->fees; // merchant key here provided payu $merchant_key = 'pay money merchant key'; // merchant salt provided payu $salt =  "pay money salt"; $txnid = $d->id ; $hash_string = $merchant_key."|".$txnid."|".$price."|subscription fess mcques|".$d->username."|".$d->email."|".$d->id."||||||||||".$salt; $hash = hash('sha512', $hash_string); ?> <div class="col-sm-12" style="padding:8%; font-family: georgia; font-size: 18px;"> <form method="post" action="https://secure.payu.in/_payment"> <input type="hidden" name="key" value="<?php echo $merchant_key; ?>" /> <input type="hidden" name="hash" value="<?php echo $hash; ?>"/> <input type="hidden" name="txnid" value="<?php echo $txnid; ?>" />  can change contact number <input type="text" name="phone" value="<?php echo $d->phone;?>" /> <br><br><input type="hidden" name="amount" value="<?php echo $price;?>" /> <input type="hidden" name="firstname" id="firstname" value="<?php echo $d->username;?>" > <input type="hidden"  name="email" id="email" value="<?php echo $d->email;?>"  /> <input type="hidden"  name="productinfo" value="subscription fess mcques"> <input type="hidden"  name="surl" value="<?php echo base_url();?>payu/success.php" size="64" /> <input type="hidden"  name="furl" value="<?php echo base_url();?>payu/failure.php" size="64" /> <input type="hidden"   name="service_provider" value="payu_paisa" size="64" /> <input  type="hidden"  name="udf1" value="<?php echo $d->id;?>"> <input type="submit" value="continue" class="btn btn-success" > </form> </div> 

just change fields according needs.... thank you...


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -