-
Notifications
You must be signed in to change notification settings - Fork 0
/
enrol.html
30 lines (30 loc) · 2.22 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
<div align="center">
<p><?php print_string("paymentrequired") ?></p>
<p><b><?php echo $instancename; ?></b></p>
<p><b><?php echo get_string("cost").": {$instance->currency} {$localisedcost}"; ?></b></p>
<p><img alt="<?php print_string('paypingaccepted', 'enrol_payping') ?>" src="moodle-gateway-payping/assets/img/icon.png" /></p>
<p><?php print_string("paymentinstant") ?></p>
<?php $paypingurl = $CFG->wwwroot.'/enrol/moodle-gateway-payping/request.php'; ?>
<form action="<?php echo $paypingurl ?>" method="post">
<input type="hidden" name="item_name" value="<?php p($coursefullname) ?>" />
<input type="hidden" name="item_number" value="<?php p($courseshortname) ?>" />
<input type="hidden" name="quantity" value="1" />
<input type="hidden" name="on0" value="<?php print_string('user') ?>" />
<input type="hidden" name="os0" value="<?php p($userfullname) ?>" />
<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="amount" value="<?php p($cost) ?>" />
<input type="hidden" name="notify_url" value="<?php echo "$CFG->wwwroot/enrol/moodle-gateway-payping/ipn.php"?>" />
<input type="hidden" name="return" value="<?php echo "$CFG->wwwroot/enrol/moodle-gateway-payping/return.php?id=$course->id" ?>" />
<input type="hidden" name="cancel_return" value="<?php echo $CFG->wwwroot ?>" />
<input type="hidden" name="rm" value="2" />
<input type="hidden" name="cbt" value="<?php print_string("continuetocourse") ?>" />
<input type="hidden" name="first_name" value="<?php p($userfirstname) ?>" />
<input type="hidden" name="last_name" value="<?php p($userlastname) ?>" />
<input type="hidden" name="address" value="<?php p($useraddress) ?>" />
<input type="hidden" name="city" value="<?php p($usercity) ?>" />
<input type="hidden" name="email" value="<?php p($USER->email) ?>" />
<input type="hidden" name="country" value="<?php p($USER->country) ?>" />
<input type="submit" value="<?php print_string("sendpaymentbutton", "enrol_payping") ?>" />
</form>
</div>