forked from gspteck/TicketPool
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpurchase_tickets1.html
67 lines (65 loc) · 2.66 KB
/
purchase_tickets1.html
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
<html>
<head>
<link href="https://fonts.googleapis.com/css2?family=Heebo:wght@500&display=swap" rel="stylesheet">
</head>
<body>
<center>
<br><br>
<h2 style="font-family: 'Heebo', sans-serif;">Purchase <b>40</b> Golden coins</h2>
<br>
<a href="https://clicksgenie.com/default.aspx?u=1286928"><img src="https://clicksgenie.com/Images/b_ads/8.gif" alt="banner" /></a>
<br><br>
<div id="paypal-button"></div>
<br>
<br>
<a href="https://clicksgenie.com/default.aspx?u=1286928"><img src="https://clicksgenie.com/Images/b_ads/10.gif" alt="banner" /></a>
<br>
<a href="https://clicksgenie.com/default.aspx?u=1286928"><img src="https://clicksgenie.com/Images/b_ads/8.gif" alt="banner" /></a>
<br>
<br>
</center>
<!--PayPal checkout-->
<script src="https://www.paypalobjects.com/api/checkout.js"></script>
<script>
paypal.Button.render({
env: 'production',
client: {
production: 'AXFUGK8WliiysFWqMsujpRSCu8BBEqcZ0i-nhSU30pT06gbh5wknsCFAoa2k4cROxglRniEu9-3ichdE'
},
locale: 'en_US',
style: {
size: 'medium',
color: 'black',
shape: 'pill',
},
commit: true,
payment: function(data, actions) {
return actions.payment.create({
transactions: [{
amount: {
total: '1.00',
currency: 'PHP'
}
}]
});
},
onAuthorize: function(data, actions) {
return actions.payment.execute().then(function() {
window.alert('Thank you for your purchase!');
if (localStorage.getItem("tickets") == null) {
balance = 40;
localStorage.setItem("tickets", balance);
}
else {
var lcl = localStorage.getItem("tickets");
balance = JSON.parse(lcl) + 40;
localStorage.setItem("tickets", balance);
}
var add_tickets = document.getElementById("ticket_num");
add_tickets.innerHTML = balance;
});
}
}, '#paypal-button');
</script>
</body>
</html>