MMCT TEAM
Server IP : 103.53.40.154  /  Your IP : 18.221.167.11
Web Server : Apache
System : Linux md-in-35.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : ppcad7no ( 715)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0750) :  /home2/ppcad7no/2by2mart.in/../etc/../perl5/../adisgauges.com/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home2/ppcad7no/2by2mart.in/../etc/../perl5/../adisgauges.com/PayUMoney_form.php
<?php 
ob_start();
require_once("includes/dbsmain.inc.php");
$page_name=basename($_SERVER['PHP_SELF'],'.php');
include("site-main-query.php");
 session_start();

$site_url=$compDATA['admin_website_url'];
$author = str_replace("http://","","$site_url");
?>
<?php
$MERCHANT_KEY = "PnBdj5pb";
$SALT = "f4BhXFhcsg";
// Merchant Key and Salt as provided by Payu.

//$PAYU_BASE_URL = "https://sandboxsecure.payu.in";		// For Sandbox Mode
$PAYU_BASE_URL = "https://secure.payu.in";			// For Production Mode

$action = '';

$posted = array();
if(!empty($_POST)) {
    //print_r($_POST);
  foreach($_POST as $key => $value) {    
    $posted[$key] = $value; 
	
  }
}

$formError = 0;

if(empty($posted['txnid'])) {
  // Generate random transaction id
  $txnid = substr(hash('sha256', mt_rand() . microtime()), 0, 20);
} else {
  $txnid = $posted['txnid'];
}
$hash = '';
// Hash Sequence
$hashSequence = "key|txnid|amount|productinfo|firstname|email|udf1|udf2|udf3|udf4|udf5|udf6|udf7|udf8|udf9|udf10";
if(empty($posted['hash']) && sizeof($posted) > 0) {
  if(
          empty($posted['key'])
          || empty($posted['txnid'])
          || empty($posted['amount'])
          || empty($posted['firstname'])
          || empty($posted['email'])
          || empty($posted['phone'])
          || empty($posted['productinfo'])
          || empty($posted['surl'])
          || empty($posted['furl'])
		  || empty($posted['service_provider'])
  ) {
    $formError = 1;
  } else {
    //$posted['productinfo'] = json_encode(json_decode('[{"name":"tutionfee","description":"","value":"500","isRequired":"false"},{"name":"developmentfee","description":"monthly tution fee","value":"1500","isRequired":"false"}]'));
	$hashVarsSeq = explode('|', $hashSequence);
    $hash_string = '';	
	foreach($hashVarsSeq as $hash_var) {
      $hash_string .= isset($posted[$hash_var]) ? $posted[$hash_var] : '';
      $hash_string .= '|';
    }

    $hash_string .= $SALT;


    $hash = strtolower(hash('sha512', $hash_string));
    $action = $PAYU_BASE_URL . '/_payment';
  }
} elseif(!empty($posted['hash'])) {
  $hash = $posted['hash'];
  $action = $PAYU_BASE_URL . '/_payment';
}
?>
<html>
  <head>
  <script>
    var hash = '<?php echo $hash ?>';
    function submitPayuForm() {
   /*   if(hash == '') {
        return;
      }*/
      var payuForm = document.forms.payuForm;
      payuForm.submit();
    }
  </script>
  </head>
  <body onload="submitPayuForm()">

    <br/>

    <form action="<?php echo $action; ?>" method="post" name="payuForm">
      <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 ?>" />
      <table>

        <tr>
    
          <td><input type="hidden" name="amount" value="<?=$_SESSION['payable_amount']?>" /></td>
         
          <td><input type="hidden" name="firstname" id="firstname" value="<?=$_SESSION['firstname']?>" /></td>
        </tr>
        <tr>
  
          <td><input type="hidden" name="email" id="email" value="<?=$_SESSION['email']?>" /></td>
          
          <td><input type="hidden" name="phone" value="<?=$_SESSION['phone']?>" /></td>
        </tr>
        <tr>
        
          <td colspan="3">
           
              <input type="hidden" name="productinfo" value="<?=$_SESSION['company_namee']?>" />
              </td>
        </tr>
        <tr>
<?php

$session_var='?cart_session_id='.$_SESSION[cart_session_id].'&
login_id='.$_SESSION[login_id].'&
payable_amount='.$_SESSION[payable_amount].'&
tax='.$_SESSION[tax].'&
shipping_charges='.$_SESSION[shipping_charges].'&
sub_total='.$_SESSION[sub_total].'&
payment_method='.$_SESSION[payment_method].'&
comment='.$_SESSION[comment].'&
firstname='.$_SESSION[firstname].'&
email='.$_SESSION[email].'&
phone='.$_SESSION[phone].'&
website_url='.$_SESSION[website_url].'&
company_namee='.$_SESSION[company_namee].'';
?>
          <td colspan="3"><input type="hidden" name="surl" value="<?=$_SESSION['website_url']?>/create_order.php<?=$session_var?>" size="64" /></td>
        </tr>
        <tr>
   
          <td colspan="3"><input type="hidden" name="furl" value="<?=$_SESSION['website_url']?>/fail.html" size="64" /></td>
        </tr>

        <tr>
          <td colspan="3"><input type="hidden" name="service_provider" value="payu_paisa" size="64" /></td>
        </tr>

      </table>
    </form>
  </body>
</html>

MMCT - 2023