forked from abdulawal39/verify-envato-purchase-code
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
77 lines (74 loc) · 3.18 KB
/
index.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
<?php
/**
* Enato Purchase code verifier for authors
* Use this script to verify if a user has purchased your item by purchase code
* Original class was taken from Envato Forum : https://forums.envato.com/t/verify-purchase-class/3526
* Article Url: http://themencode.com/verify-your-envato-clients-using-purchase-code/
* Author @Abdul Awal
* Author url: abdulawal.com
*/
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Validate Envato Purchase Code - For Authors by ThemeNcode</title>
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="css/style.css" />
<script type="text/javascript" src="js/jquery-3.5.0.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="#">Verify Envato Purchase</a>
</div>
</div>
</nav>
<div class="container">
<div class="main-container">
<h1>Verify Envato Purchase Code <small>uses envato API v3</small></h1>
<p class="lead">provide purchase code in the input below and get the data.</p>
<div class="row">
<div class="col-md-8 col-md-offset-2">
<form action="verify.php" method="POST" id="verify-envato-purchase">
<div class="row">
<div class="col-md-8">
<input type="text" name="purchase_code" value="" class="form-control" id="input-purchase-code" placeholder="Enter Purchase Code" />
</div>
<div class="col-md-4">
<select name="result_type" id="" class="form-control">
<option value="">Select Result Display Type</option>
<option value="list">List</option>
<option value="table">Table</option>
</select>
</div>
</div>
<br>
<input type="submit" value="Verify Purchase" class="btn btn-success">
</form>
<div id="show-result"></div>
</div>
</div>
</div>
<div class="row"><center>Copyright © <?php echo date("Y") ?> ThemeNcode. <br> Powered by <a href="http://themencode.com/" target="_blank">ThemeNcode</a>, author of best selling <a href="https://codecanyon.net/item/pdf-viewer-for-wordpress/8182815/" target="_blank">PDF Viewer for WordPress plugin</a>. </center></div>
</div><!-- /.container -->
<script type="text/javascript">
$(document).ready( function() {
var form = $('#verify-envato-purchase');
$('#verify-envato-purchase').submit(function(e){
e.preventDefault();
$.ajax( {
type: "POST",
url: form.attr( 'action' ),
data: form.serialize(),
success: function( response ) {
$('#show-result').html(response);
}
} );
} );
} );
</script>
</body>
</html>