1 |
efrain |
1 |
<div align="center">
|
|
|
2 |
|
|
|
3 |
<p><?php print_string("paymentrequired") ?></p>
|
|
|
4 |
<p><b><?php echo $instancename; ?></b></p>
|
|
|
5 |
<p><b><?php echo get_string("cost").": {$instance->currency} {$localisedcost}"; ?></b></p>
|
|
|
6 |
<p><img alt="<?php print_string('paypalaccepted', 'enrol_paypal') ?>" src="https://www.paypal.com/en_US/i/logo/PayPal_mark_60x38.gif" /></p>
|
|
|
7 |
<p><?php print_string("paymentinstant") ?></p>
|
|
|
8 |
<?php
|
|
|
9 |
$paypalurl = empty($CFG->usepaypalsandbox) ? 'https://www.paypal.com/cgi-bin/webscr' : 'https://www.sandbox.paypal.com/cgi-bin/webscr';
|
|
|
10 |
?>
|
|
|
11 |
<form action="<?php echo $paypalurl ?>" method="post">
|
|
|
12 |
|
|
|
13 |
<input type="hidden" name="cmd" value="_xclick" />
|
|
|
14 |
<input type="hidden" name="charset" value="utf-8" />
|
|
|
15 |
<input type="hidden" name="business" value="<?php p($this->get_config('paypalbusiness'))?>" />
|
|
|
16 |
<input type="hidden" name="item_name" value="<?php p($coursefullname) ?>" />
|
|
|
17 |
<input type="hidden" name="item_number" value="<?php p($courseshortname) ?>" />
|
|
|
18 |
<input type="hidden" name="quantity" value="1" />
|
|
|
19 |
<input type="hidden" name="on0" value="<?php print_string("user") ?>" />
|
|
|
20 |
<input type="hidden" name="os0" value="<?php p($userfullname) ?>" />
|
|
|
21 |
<input type="hidden" name="custom" value="<?php echo "{$USER->id}-{$course->id}-{$instance->id}" ?>" />
|
|
|
22 |
|
|
|
23 |
<input type="hidden" name="currency_code" value="<?php p($instance->currency) ?>" />
|
|
|
24 |
<input type="hidden" name="amount" value="<?php p($cost) ?>" />
|
|
|
25 |
|
|
|
26 |
<input type="hidden" name="for_auction" value="false" />
|
|
|
27 |
<input type="hidden" name="no_note" value="1" />
|
|
|
28 |
<input type="hidden" name="no_shipping" value="1" />
|
|
|
29 |
<input type="hidden" name="notify_url" value="<?php echo "$CFG->wwwroot/enrol/paypal/ipn.php"?>" />
|
|
|
30 |
<input type="hidden" name="return" value="<?php echo "$CFG->wwwroot/enrol/paypal/return.php?id=$course->id" ?>" />
|
|
|
31 |
<input type="hidden" name="cancel_return" value="<?php echo $CFG->wwwroot ?>" />
|
|
|
32 |
<input type="hidden" name="rm" value="2" />
|
|
|
33 |
<input type="hidden" name="cbt" value="<?php print_string("continuetocourse") ?>" />
|
|
|
34 |
|
|
|
35 |
<input type="hidden" name="first_name" value="<?php p($userfirstname) ?>" />
|
|
|
36 |
<input type="hidden" name="last_name" value="<?php p($userlastname) ?>" />
|
|
|
37 |
<input type="hidden" name="address" value="<?php p($useraddress) ?>" />
|
|
|
38 |
<input type="hidden" name="city" value="<?php p($usercity) ?>" />
|
|
|
39 |
<input type="hidden" name="email" value="<?php p($USER->email) ?>" />
|
|
|
40 |
<input type="hidden" name="country" value="<?php p($USER->country) ?>" />
|
|
|
41 |
|
|
|
42 |
<input type="submit" value="<?php print_string("sendpaymentbutton", "enrol_paypal") ?>" />
|
|
|
43 |
|
|
|
44 |
</form>
|
|
|
45 |
|
|
|
46 |
</div>
|