| 12694 |
anikendra |
1 |
<?php //print_r($review_process);
|
|
|
2 |
if(!empty($review_process)){
|
|
|
3 |
if(isset($review_process['baseSubTotal']) && !empty($review_process['baseSubTotal'])){
|
|
|
4 |
$baseSubTotal = $review_process['baseSubTotal'];
|
|
|
5 |
$baseSubTotal = number_format((float)$baseSubTotal, 2, '.', '');
|
|
|
6 |
}
|
|
|
7 |
if(isset($review_process['subTotal']) && !empty($review_process['subTotal'])){
|
|
|
8 |
$subTotal = $review_process['subTotal'];
|
|
|
9 |
$subTotal = number_format((float)$subTotal, 2, '.', '');
|
|
|
10 |
}
|
|
|
11 |
if(isset($review_process['discount_amount']) && !empty($review_process['discount_amount'])){
|
|
|
12 |
$discount = $review_process['discount_amount'];
|
|
|
13 |
$discount = number_format((float)$discount, 2, '.', '');
|
|
|
14 |
}
|
|
|
15 |
if(isset($review_process['shipping']) && !empty($review_process['shipping'])){
|
|
|
16 |
$shippingAmount = $review_process['shipping'];
|
|
|
17 |
$shippingAmount = number_format((float)$shippingAmount, 2, '.', '');
|
|
|
18 |
}
|
|
|
19 |
if(isset($review_process['currency']) && !empty($review_process['currency'])){
|
|
|
20 |
$currency_code = $review_process['currency'];
|
|
|
21 |
}
|
|
|
22 |
}
|
|
|
23 |
$paymentMethod = $this->session->userdata('paymentMethod');
|
|
|
24 |
if($paymentMethod === 'ccavenue'){
|
|
|
25 |
$MerchantId = 'M_cs33520_33520';
|
|
|
26 |
$WorkingKey = 'jt9a0316u07s67lqht';
|
|
|
27 |
$orderId = $this->session->userdata('orderId');
|
|
|
28 |
$redirectUrl = base_url().'checkout/orderconfirmation';
|
|
|
29 |
$amount = $subTotal;
|
|
|
30 |
$Checksum = getChecksum($MerchantId,$orderId,$amount,$redirectUrl,$WorkingKey);
|
|
|
31 |
}
|
|
|
32 |
$shipping =$this->session->userdata('shipping');
|
|
|
33 |
$authorized = $this->session->userdata('authorized');
|
|
|
34 |
$email = $authorized['email'];
|
|
|
35 |
//print_r($this->session->userdata);
|
|
|
36 |
?>
|
|
|
37 |
<div class="checkout-login">
|
|
|
38 |
<h2 class="font16 bold">
|
|
|
39 |
Sign In
|
|
|
40 |
<div class="edit-btn"></div>
|
|
|
41 |
</h2>
|
|
|
42 |
</div>
|
|
|
43 |
|
|
|
44 |
<div class="checkout-shipping">
|
|
|
45 |
<h2 class="font16 bold ">
|
|
|
46 |
Shipping Address
|
|
|
47 |
<div class="edit-btn"></div>
|
|
|
48 |
</h2>
|
|
|
49 |
</div>
|
|
|
50 |
<div class="checkout-payment">
|
|
|
51 |
<h2 class="font16 bold ">
|
|
|
52 |
Shipping Method
|
|
|
53 |
<div class="edit-btn"></div>
|
|
|
54 |
</h2>
|
|
|
55 |
|
|
|
56 |
</div>
|
|
|
57 |
<div class="checkout-payment">
|
|
|
58 |
<h2 class="font16 bold ">
|
|
|
59 |
Payment Method
|
|
|
60 |
<div class="edit-btn"></div>
|
|
|
61 |
</h2>
|
|
|
62 |
|
|
|
63 |
</div>
|
|
|
64 |
<div class="checkout-billing">
|
|
|
65 |
<h2 class="font16 bold selected">
|
|
|
66 |
Review
|
|
|
67 |
<div class="edit-btn"></div>
|
|
|
68 |
</h2>
|
|
|
69 |
<div class="ck-billing-sub">
|
|
|
70 |
<div class="main_description">
|
|
|
71 |
<div class="description font12 bd-btm bold">
|
|
|
72 |
<div class="order-number">
|
|
|
73 |
S.No
|
|
|
74 |
</div>
|
|
|
75 |
<div class="order-desc">
|
|
|
76 |
Item Description
|
|
|
77 |
</div>
|
|
|
78 |
<div class="order-qty">
|
|
|
79 |
Qty</div>
|
|
|
80 |
<div class="order-value">
|
|
|
81 |
Price
|
|
|
82 |
</div>
|
|
|
83 |
</div>
|
|
|
84 |
<?php
|
|
|
85 |
unset($review_process['baseSubTotal']);
|
|
|
86 |
unset($review_process['subTotal']);
|
|
|
87 |
unset($review_process['discount_amount']);
|
|
|
88 |
unset($review_process['shipping']);
|
|
|
89 |
unset($review_process['currency']);
|
|
|
90 |
$i=1;
|
|
|
91 |
foreach ($review_process as $value) {
|
|
|
92 |
?>
|
|
|
93 |
<div class="description">
|
|
|
94 |
<div class="order-number font12 ">
|
|
|
95 |
<?php echo $i;?>
|
|
|
96 |
</div>
|
|
|
97 |
|
|
|
98 |
<div class="order-desc">
|
|
|
99 |
<p class="font12">
|
|
|
100 |
<?php echo $value['productname'];?>
|
|
|
101 |
</p>
|
|
|
102 |
<span class="l-hldr font11 mt5">Item-Code: <span class="bold"><?php echo $value['productcode'];?></span></span>
|
|
|
103 |
<!--<span class="l-hldr font11 mt5">Item-Weight: <span class="bold"><?php echo $value['weight'];?></span></span>-->
|
|
|
104 |
</div>
|
|
|
105 |
<div class="order-qty font12">
|
|
|
106 |
<?php echo $value['quantity'];?>
|
|
|
107 |
</div>
|
|
|
108 |
|
|
|
109 |
<div class="order-value font12">
|
|
|
110 |
<?php echo number_format((float)$value['productprice'], 2, '.', '');;?>
|
|
|
111 |
</div>
|
|
|
112 |
|
|
|
113 |
</div>
|
|
|
114 |
<?php $i++;} ?>
|
|
|
115 |
<div class="details-hldr">
|
|
|
116 |
<ul class="details">
|
|
|
117 |
<li class="font12">
|
|
|
118 |
<span class="key">Subtotal: </span>
|
|
|
119 |
|
|
|
120 |
<span class="value"><?php echo $baseSubTotal;?> </span>
|
|
|
121 |
</li>
|
|
|
122 |
<li class="font12 mt5">
|
|
|
123 |
<span class="key"> Shipping Charges: </span>
|
|
|
124 |
<span class="value"><?php echo $shippingAmount;?> </span>
|
|
|
125 |
</li>
|
|
|
126 |
<?php if(isset($discount) && !empty($discount)){?>
|
|
|
127 |
<li class="font12 mt5">
|
|
|
128 |
<span class="key"> Discount Amount: </span>
|
|
|
129 |
<span class="value"><?php echo $discount;?> </span>
|
|
|
130 |
</li>
|
|
|
131 |
<?php }?>
|
|
|
132 |
|
|
|
133 |
<li class="font14 mt5">
|
|
|
134 |
<span class="key"> You Pay: </span>
|
|
|
135 |
<span class="value c-orange"><?php
|
|
|
136 |
echo $currency_code." ".$subTotal;?> </span>
|
|
|
137 |
</li>
|
|
|
138 |
</ul>
|
|
|
139 |
</div>
|
|
|
140 |
</div>
|
|
|
141 |
<?php if (isset($paymentMethod) && $paymentMethod == 'ccavenue') { ?>
|
|
|
142 |
<form name="ccavenue" method="post" action="https://www.ccavenue.com/shopzone/cc_details.jsp">
|
|
|
143 |
<input type=hidden name="Merchant_Id" value="<?=$MerchantId?>">
|
|
|
144 |
<input type="hidden" name="Amount" value="<?=$amount?>">
|
|
|
145 |
<input type="hidden" name="Currency" value="<?=$currency_code?>">
|
|
|
146 |
<input type="hidden" name="Order_Id" value="<?=$orderId?>">
|
|
|
147 |
<input type="hidden" name="Redirect_Url" value="<?=$redirectUrl?>">
|
|
|
148 |
<input type="hidden" name="Cancel_Url" value="<?=base_url()?>">
|
|
|
149 |
<input type="hidden" name="TxnType" value="A">
|
|
|
150 |
<input type="hidden" name="ActionID" value="TXN">
|
|
|
151 |
<input type="hidden" name="Checksum" value="<?php echo $Checksum; ?>">
|
|
|
152 |
<input type="hidden" name="billing_cust_name" value="<?=$shipping['sfname'].' '.$shipping['slname']?>">
|
|
|
153 |
<input type="hidden" name="billing_cust_address" value="<?=$shipping['sstreet']?>">
|
|
|
154 |
<input type="hidden" name="billing_cust_country" value="<?=$shipping['scountry']?>">
|
|
|
155 |
<input type="hidden" name="billing_cust_state" value="<?=$shipping['sstate']?>">
|
|
|
156 |
<input type="hidden" name="billing_cust_city" value="<?=$shipping['scity']?>">
|
|
|
157 |
<input type="hidden" name="billing_zip" value="<?=$shipping['szipcode']?>">
|
|
|
158 |
<input type="hidden" name="billing_cust_tel" value="<?=$shipping['smobile']?>">
|
|
|
159 |
<input type="hidden" name="billing_cust_email" value="<?=$email?>">
|
|
|
160 |
<input type="hidden" name="delivery_cust_name" value="<?=$shipping['sfname'].' '.$shipping['slname']?>">
|
|
|
161 |
<input type="hidden" name="delivery_cust_address" value="<?=$shipping['sstreet']?>">
|
|
|
162 |
<input type="hidden" name="delivery_cust_country" value="<?=$shipping['scountry']?>">
|
|
|
163 |
<input type="hidden" name="delivery_cust_state" value="<?=$shipping['sstate']?>">
|
|
|
164 |
<input type="hidden" name="delivery_cust_tel" value="<?=$shipping['smobile']?>">
|
|
|
165 |
<input type="hidden" name="delivery_cust_notes" value="this is a test">
|
|
|
166 |
<input type="hidden" name="Merchant_Param" value="">
|
|
|
167 |
<input type="hidden" name="billing_zip_code" value="<?=$shipping['szipcode']?>">
|
|
|
168 |
<input type="hidden" name="delivery_cust_city" value="<?=$shipping['scity']?>">
|
|
|
169 |
</form>
|
|
|
170 |
<?php } ?>
|
|
|
171 |
<div class="clear"></div>
|
|
|
172 |
<button class="btn gold checkout-continue font14 bold mtb5" type="submit" name="submit" onCLick="paymentmethod('<?=$paymentMethod?>');"> Place Order </button>
|
|
|
173 |
<a class="btn gold font14 bold mtb5" href="<?=base_url()."checkout/payment"?>"> Back </a>
|
|
|
174 |
</div>
|
|
|
175 |
</div>
|
|
|
176 |
|