-
Notifications
You must be signed in to change notification settings - Fork 0
/
enrol.html
executable file
·54 lines (44 loc) · 2.42 KB
/
enrol.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
<h3><?php print_string("paymentrequired") ?></h3>
<p><b><?php echo get_string('cost', 'enrol_hitpay').": {$instance->currency} {$localisedcost}"; ?></b></p>
<p><?php print_string("paymentinstant") ?></p>
<div class="container">
<div class="row">
<div class="col-md-8 order-md-1">
<form action="hitpay/checkout.php" method="POST" class="needs-validation">
<input type="hidden" name="name" class="form-control" id="customer_name" placeholder=""
value="<?php echo $USER->firstname . ' ' . $USER->lastname; ?>">
<input type="hidden" name="mobile" class="form-control" id="mobile" placeholder="Mobile"
value="<?php echo $USER->phone1; ?>">
<input type="hidden" name="email" class="form-control" id="email"
value="<?php echo $USER->email; ?>">
<input type="hidden" class="form-control" id="address" name="address"
value="<?php echo $USER->address; ?>">
<input type="hidden" value="<?=p($cost) ?>" name="amount" id="total_amount" required/>
<input type="hidden" value="<?php echo $course->fullname; ?>" name="coursename" id="coursename" required/>
<input type="hidden" value="<?php echo $USER->id; ?>" name="userid" id="userid" required/>
<input type="hidden" name="course_id" value="<?php echo $course->id; ?>" />
<input type="hidden" name="instance_id" value="<?php echo $instance->id; ?>" />
<input type="hidden" name="currency_code" value="<?php p($instance->currency) ?>" />
<button class="paynowbutton" type="submit"><?php echo get_string('button_name', 'enrol_hitpay')?></button>
</form>
</div>
</div>
</div>
<style>
<?php
include 'style_enrol_hitpay.css';
?>
</style>
<script>
(function (window, document) {
var loader = function () {
var script = document.createElement("script"), tag = document.getElementsByTagName("script")[0];
script.src = "https://sandbox.hitpay.com/embed.min.js?" + Math.random().toString(36).substring(7);
tag.parentNode.insertBefore(script, tag);
};
window.addEventListener ? window.addEventListener("load", loader, false) : window.attachEvent("onload", loader);
})(window, document);
</script>
<?php
echo html_writer::end_div();
?>