-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdusupay_order.php
115 lines (55 loc) · 2.27 KB
/
dusupay_order.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<?php
session_start();
require_once("includes/db.php");
if(!isset($_SESSION['seller_user_name'])){
echo "<script>window.open('login','_self');</script>";
}
$login_seller_user_name = $_SESSION['seller_user_name'];
$select_login_seller = $db->select("sellers",array("seller_user_name" => $login_seller_user_name));
$row_login_seller = $select_login_seller->fetch();
$login_seller_id = $row_login_seller->seller_id;
$status = (isset($_GET['status'])) ? $_GET['status'] : '';
if(isset($_GET['checkout_seller_id']) & $status == "COMPLETED"){
$seller_id = $input->get('checkout_seller_id');
$proposal_id = $input->get('proposal_id');
$proposal_qty = $input->get('proposal_qty');
$proposal_price = $input->get('proposal_price');
$_SESSION['checkout_seller_id'] = $seller_id;
$_SESSION['proposal_id'] = $proposal_id;
$_SESSION['proposal_qty'] = $proposal_qty;
$_SESSION['proposal_price'] = $proposal_price;
if(isset($_GET['proposal_extras'])){
$_SESSION['proposal_extras'] = unserialize(base64_decode($input->get('proposal_extras')));
}
$_SESSION['method'] = "mobile_money";
echo "<script>window.open('order','_self');</script>";
}
if(isset($_GET['cart_seller_id']) & $status == "COMPLETED"){
$seller_id = $input->get('cart_seller_id');
$_SESSION['cart_seller_id'] = $seller_id;
$_SESSION['method'] = "mobile_money";
echo "<script>window.open('order','_self');</script>";
}
if(isset($_GET['featured_listing']) & $status == "COMPLETED"){
$proposal_id = $input->get('proposal_id');
$_SESSION['proposal_id'] = $proposal_id;
echo "<script>window.open('order','_self');</script>";
}
if(isset($_GET["view_offers"]) & $status == "COMPLETED"){
$offer_id = $_GET["offer_id"];
$_SESSION['offer_id'] = $offer_id;
$_SESSION['offer_buyer_id'] = $login_seller_id;
$_SESSION['method'] = "mobile_money";
echo "<script>window.open('order','_self');</script>";
}
if(isset($_GET['message_offer_id']) & $status == "COMPLETED"){
$offer_id = $input->get('message_offer_id');
$_SESSION['message_offer_id'] = $offer_id;
$_SESSION['message_offer_buyer_id'] = $login_seller_id;
$_SESSION['method'] = "mobile_money";
echo "<script>window.open('order','_self');</script>";
}
if($status == "CANCELLED" or $status == "FAILED"){
echo "<script>window.open('index','_self');</script>";
}
?>