-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.php
55 lines (48 loc) · 4.99 KB
/
main.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
<script src="https://code.jquery.com/jquery-3.6.1.js"> integrity="sha256-3zlB5s2uwoUzrXK3BT7AX3FyvojsraNFxCc2vC/7pNI=" crossorigin="anonymous"></script>
<script src="https://checkout.razorpay.com/v1/checkout.js"></script>
<!-- <input type="text" name="name" placeholder="Enter Name :" id="name"><br><br> -->
<script>
<?php
include 'config.php';
$select_product=mysqli_query($conn,"select * from `orders` where id=28") or die('query faild');
$fetch=mysqli_fetch_assoc($select_product);
?>
var name = $("#<?php echo $fetch['name']?>").val();
var amount = $("#<?php echo $fetch['total_price']?>").val();
var options = {
"key": "rzp_test_dpTrvksozDWVJ2", // Enter the Key ID generated from the Dashboard
"amount": <?php echo $fetch['total_price']?>*100, // Amount is in currency subunits. Default currency is INR. Hence, 50000 refers to 50000 paise
"currency": "INR",
"name": "<?php echo $fetch['name']?>",
"description": "Test Transaction",
"image": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAsJCQcJCQcJCQkJCwkJCQkJCQsJCwsMCwsLDA0QDBEODQ4MEhkSJRodJR0ZHxwpKRYlNzU2GioyPi0pMBk7IRP/2wBDAQcICAsJCxULCxUsHRkdLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCz/wAARCAClAJUDASIAAhEBAxEB/8QAHAABAQADAAMBAAAAAAAAAAAAAAEGBwgCAwUE/8QAQBAAAQMDAQMHBgwGAwAAAAAAAQACAwQFEQYSIVEHExciMUGUFFNhZXHTFSMyVnKBgpGV0dLUJEJSVaGxM0Zm/8QAFAEBAAAAAAAAAAAAAAAAAAAAAP/EABQRAQAAAAAA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pAXTcckcrI5YnNfHIxskb2kFr2OAcHNI7ig80REBERAREQEREBERAREQVFEQXiinFEBc468sHwDqCsiiYW0Nbmuodx2WxyuO3EPoOyO3sxxXRywjlKsJu9glq4WZrLRt1kWBlz6fHx7Pu632PSg5+W+OS6+/CVjNtmfmqs7mwtByXOpJMuiP2cFv1DitDrI9F306fv9BWPfs0sx8jr+Hk0xALj9EhrvsoOlQVV4gggEYwd4I3gjiCqgqKIgqKIgKqIgqKIgIiICIiBxROKICjgHAhwBaQQQRkEHtBBVRBzRrGxO0/f7hQtaRSvcKqhJzvppiS0DP9Jy0/RWPLe3KjYRcbKy6QMzVWcmR5aMufRyYEg3f0nDvYDxWiUHQnJxfjedP08Mz9qttRbQz5OXPia3MMhzxb1Se8tPFZouduT6/wDwHqClEz9mhuOzQ1efktLz8VKe7quxk8CV0SgImEQEREBERAREQEREFRREF4opxRAVURB4SxRTxywzMbJFKx8UrHjLXxvBa5rhwIXOV80ZqO33a5UdHaLrVUkM7vJaimo6ieOSB3XZ142FuQCA70grpBEHLw0zq4f9evn1W2s92ugtI11zrrDb33Skq6W4U7fJKplbDLBJI+EBolDZWtJDhg5x25HcvvogqKIgqKIgKqIgqKIgIiICIiBxREQEREBERAREQEREBERAREQEREBERB//2Q==",
//"order_id": "order_9A33XWu170gUtm", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1
"callback_url": "https://eneqd3r9zrjok.x.pipedream.net/",
"handler": function (response){
jQuery.ajax({
type:"POST",
url:"payment.php",
data:"pay_id="+response.razorpay_payment_id+"&amount="+amount+"&name"+name,
success:function(result){
window.location.href="success.php";
}
});
}
,
"prefill": {
"name": "",
"email": "",
"contact": ""
},
"notes": {
"address": "Razorpay Corporate Office"
},
"theme": {
"color": "#3399cc"
}
};
var rzp1 = new Razorpay(options);
{
rzp1.open();
}
</script>