File: /home/barbeatleanalyti/www/mbaris.beatleanalytics.com/application/views/razorpay/checkout_new.php
<?php
//echo '<pre>'; print_r($userdata); die;
$amount = $userdata[0]->renewal_amount;
$gst = $userdata[0]->renewal_gst_amount;
$totalamount = $userdata[0]->renewal_total_amount;
//echo '<pre>'; print_r($propertydata);
$description = $userdata[0]->db_username;
$txnid = date("YmdHis");
$key_id = "rzp_live_rh6BGAvjmBxaX5";
$currency_code = $currency_code;
$total = $totalamount*100; //($propertydata[0]->property_investment_amount*100); // 100 = 1 indian rupees
$amount = $totalamount;//$propertydata[0]->property_investment_amount;
$merchant_order_id = "INV-".date("YmdHis");
$card_holder_name = 'Baris';
$email = $userdata[0]->db_email;
$phone = '';
$name = "Baris";
$userid = $userdata[0]->userId;
?>
<form name="razorpay-form" id="razorpay-form" action="<?php echo $callback_url; ?>" method="POST">
<input type="hidden" name="razorpay_payment_id" id="razorpay_payment_id" />
<input type="hidden" name="merchant_order_id" id="merchant_order_id" value="<?php echo $merchant_order_id; ?>"/>
<input type="hidden" name="merchant_trans_id" id="merchant_trans_id" value="<?php echo $txnid; ?>"/>
<input type="hidden" name="merchant_product_info_id" id="merchant_product_info_id" value="<?php echo $description; ?>"/>
<input type="hidden" name="merchant_surl_id" id="merchant_surl_id" value="<?php echo $surl; ?>"/>
<input type="hidden" name="merchant_furl_id" id="merchant_furl_id" value="<?php echo $furl; ?>"/>
<input type="hidden" name="card_holder_name_id" id="card_holder_name_id" value="<?php echo $card_holder_name; ?>"/>
<input type="hidden" name="merchant_total" id="merchant_total" value="<?php echo $total; ?>"/>
<input type="hidden" name="merchant_amount" id="merchant_amount" value="<?php echo $amount; ?>"/>
<input type="hidden" name="userid" id="userid" value="<?php echo $userid; ?>"/>
</form>
<div class="main-content side-content pt-0 invoice_latter">
<div class="container-fluid">
<div class="inner-body">
<div class="page-header">
<div class="headertext">
<div id="invoiceholder">
<div id="headerimage"></div>
<div id="invoice" class="effect2">
<div id="invoice-top">
<div class="logo"></div>
<div class="info">
<h2 style=" font-size: 18px; margin-top: 13px; font-weight: 700;"><?php echo $userdata[0]->db_username; ?></h2>
</div>
<!--End Info-->
<div class="title">
<h1>Invoice <?php echo $merchant_order_id;?></h1>
<p>Issued: <?php echo date("d, M Y"); ?></br>
</p>
</div>
<!--End Title-->
</div>
<!--End InvoiceTop-->
<div id="invoice-mid">
<div class="clientlogo"></div>
<div class="info">
<h2><?php echo $userdata[0]->db_username; ?></h2>
<p><?php echo $userdata[0]->db_email; ?></br>
<?php echo $userdata[0]->db_phone;?></br>
</div>
</div>
<!--End Invoice Mid-->
<div id="invoice-bot">
<div id="table">
<table>
<tr>
<td class="item">
<h2>Info </h2>
</td>
<td><?php echo 'Renewal Charges'; ?></td>
</tr>
<tr>
<td class="item">
<h2>Renewal Amount </h2>
</td>
<td><?php echo $userdata[0]->renewal_amount; ?></td>
</tr>
<tr>
<td class="item">
<h2>Gst</h2>
</td>
<td><?php echo $userdata[0]->renewal_gst_amount; ?>%</td>
</tr>
<td class="item">
<h2>Total Amount</h2>
</td>
<td><?php echo $totalamount ; ?></td>
</tr>
</table>
</div>
<!--<div id="table1">
<table>
<tr class="tabletitle">
<td class="item">
<h2>Info </h2>
</td>
<td class="Rate">
<h2>Invested Amount</h2>
</td>
<td class="item">
<h2>Estimate Return </h2>
</td>
<td class="subtotal">
<h2>Sub-total</h2>
</td>
</tr>
<tr class="service">
<td class="tableitem">
<p class="itemtext"><?php echo $propertydata[0]->property_name; ?> </p>
</td>
<td class="tableitem">
<p class="itemtext">$<?php echo $propertydata[0]->property_investment_amount; ?></p>
</td>
<td class="tableitem">
<p class="itemtext">$<?php echo $estimatereturn; ?></p>
</td>
<td class="tableitem">
<p class="itemtext">$<?php echo ($propertydata[0]->property_investment_amount+$estimatereturn); ?></p>
</td>
</tr>
<tr class="service">
<td class="tableitem">
<p class="itemtext">Investmatch Fees (3%) </p>
</td>
<td class="tableitem">
<p class="itemtext">$<?php echo $propertydata[0]->property_investment_amount; ?></p>
</td>
<td class="tableitem">
<p class="itemtext">$<?php echo $investmatchfees; ?></p>
</td>
<td class="tableitem">
<p class="itemtext">$<?php echo ($propertydata[0]->property_investment_amount-$investmatchfees); ?></p>
</td>
</tr>
<tr class="tabletitle">
<td class="Rate"><h2>Total</h2></td>
<td class="Rate">
$<?php echo $propertydata[0]->property_investment_amount; ?>
</td>
<td class="payment">
<h2>$51200</h2>
</td>
<td class="">
<h2>$51200</h2>
</td>
</tr>
</table>
</div>-->
<input id="pay-btn" type="submit" onclick="razorpaySubmit(this);" value="Pay Now" class="btn btn-primary" style="margin-top:20px;" />
<div id="legalcopy">
<p class="legal"><strong>Thank you for your business!</strong> Payment is expected within 31 days; please process this invoice within that time. There will be a 5% interest charge per month on late invoices.
</p>
<div style="clear: both;"></div>
</div>
</div>
<!--End InvoiceBot-->
</div>
<!--End Invoice-->
</div>
<!-- End Invoice Holder-->
</div>
</div>
</div>
</div>
</div>
<script src="https://checkout.razorpay.com/v1/checkout.js"></script>
<script>
var options = {
key: "<?php echo $key_id; ?>",
amount: "<?php echo $total; ?>",
name: "<?php echo $name; ?>",
description: "Order # <?php echo $merchant_order_id; ?>",
netbanking: true,
currency: "<?php echo $currency_code; ?>", // INR
prefill: {
name: "<?php echo $card_holder_name; ?>",
email: "<?php echo $email; ?>",
contact: "<?php echo $phone; ?>"
},
notes: {
soolegal_order_id: "<?php echo $merchant_order_id; ?>",
},
handler: function (transaction) {
document.getElementById('razorpay_payment_id').value = transaction.razorpay_payment_id;
document.getElementById('razorpay-form').submit();
},
"modal": {
"ondismiss": function(){
location.reload()
}
}
};
var razorpay_pay_btn, instance;
function razorpaySubmit(el) {
if(typeof Razorpay == 'undefined') {
setTimeout(razorpaySubmit, 200);
if(!razorpay_pay_btn && el) {
razorpay_pay_btn = el;
el.disabled = true;
el.value = 'Please wait...';
}
} else {
if(!instance) {
instance = new Razorpay(options);
if(razorpay_pay_btn) {
razorpay_pay_btn.disabled = false;
razorpay_pay_btn.value = "Pay Now";
}
}
instance.open();
}
}
</script>
<style>
.invoice_latter p.legal {
padding: 0px;
float: left;
text-align: left;
}
.invoice_latter p {
font-size: 12px;
}
tr.tabletitle h2 {
margin: 0px;
padding: 3px 0;
}
.invoice_latter .info {
text-align: left; margin-top: 6px;
}
div#project {
text-align: right;
}
div#project {
text-align: right;
}
div#invoice {
background: #fcfbfb;
border: 1px solid #ddd;
border-radius: 8px;
}
.invoice_latter #invoice {
position: relative;
top: -290px;
margin: 0 auto;
padding:20px;
width: 700px;
background: #fff;
box-shadow: 2px 2px 14px 6px #0000002e;
}
.invoice_latter .green , .invoice_latter span.green {
color: green !important;
font-weight: 600;
}
.invoice_latter div#project p {
margin: 0 0px 3px 0;
}
.invoice_latter h1{
font-size: 1.5em;
color: #222;
}
.invoice_latter h2 {
font-size: .9em;
font-weight: 600;
}
.invoice_latter h3{
font-size: 1.2em;
font-weight: 300;
line-height: 2em;
}
.invoice_latter p{
font-size: 11px;
color: #000;
line-height: 1.2em;
}
.invoice_latter #invoiceholder{
width:100%;
hieght: 100%;
padding-top: 50px;
}
.invoice_latter #headerimage {
position: relative;
background-size: 100%;
top: -50px;
height: 350px;
background-image: url(https://work.beatlebuddy.com/investex/assets/assets/images/profile_bg.jpg);
-webkit-box-shadow: inset 0 2px 4px rgb(0 0 0 / 15%), inset 0 -2px 4px rgb(0 0 0 / 15%);
-moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), inset 0 -2px 4px rgba(0,0,0,.15);
box-shadow: inset 0 2px 4px rgb(0 0 0 / 15%), inset 0 -2px 4px rgb(0 0 0 / 15%);
overflow: hidden;
background-attachment: fixed;
background-size: 1920px 80%;
background-position: 2% 16%;
}
[id*='invoice-']{ /* Targets all id with 'col-' */
border-bottom: 1px solid #EEE;
padding: 30px;
}
.invoice_latter #invoice-top{min-height: 120px;}
.invoice_latter #invoice-mid{min-height: 120px;}
.invoice_latter #invoice-bot{ min-height: 250px;}
.invoice_latter .logo{
float: left;
height: 60px;
width: 60px;
background: url(http://michaeltruong.ca/images/logo1.png) no-repeat;
background-size: 60px 60px;
}
.invoice_latter .clientlogo{
float: left;
height: 60px;
width: 60px;
background: url(http://michaeltruong.ca/images/client.jpg) no-repeat;
background-size: 60px 60px;
border-radius: 50px;
}
.invoice_latter .info{
display: block;
float:left;
margin-left: 20px;
}
.invoice_latter .title{
float: right;
}
..invoice_latter title p{text-align: right;}
.invoice_latter #project{margin-left: 52%;}
.invoice_latter table{
width: 100%;
border-collapse: collapse;
}
.invoice_latter td{
padding: 5px 0 5px 15px;
border: 1px solid #EEE
}
.invoice_latter .tabletitle{
padding: 5px;
background: #EEE;
}
.invoice_latter .service{border: 1px solid #EEE;}
.invoice_latter .item{width: 50%;}
.invoice_latter .itemtext {
font-size: .9em;
margin: 0px;
padding: 5px 0;
}
.invoice_latter #legalcopy{
margin-top: 30px;
}
.invoice_latter form{
float:right;
margin-top: 30px;
text-align: right;
}
.invoice_latter .effect2
{
position: relative;
}
.invoice_latter .effect2:before, .invoice_latter .effect2:after
{
z-index: -1;
position: absolute;
content: "";
bottom: 15px;
left: 10px;
width: 50%;
top: 80%;
max-width:300px;
background: #777;
-webkit-box-shadow: 0 15px 10px #777;
-moz-box-shadow: 0 15px 10px #777;
box-shadow: 0 15px 10px #777;
-webkit-transform: rotate(-3deg);
-moz-transform: rotate(-3deg);
-o-transform: rotate(-3deg);
-ms-transform: rotate(-3deg);
transform: rotate(-3deg);
}
.invoice_latter .effect2:after
{
-webkit-transform: rotate(3deg);
-moz-transform: rotate(3deg);
-o-transform: rotate(3deg);
-ms-transform: rotate(3deg);
transform: rotate(3deg);
right: 10px;
left: auto;
}
.invoice_latter .legal{
width:70%;
}
</style>