MDL-23767 PayPal instance name printed on the enrol page
[moodle.git] / enrol / paypal / enrol.html
CommitLineData
3d970777 1<div align="center">
2
3<p><?php print_string("paymentrequired") ?></p>
2c3e42fd 4<p><b><?php echo $instancename; ?></b></p>
24df3e1a 5<p><b><?php echo get_string("cost").": {$instance->currency} {$cost}"; ?></b></p>
2bbaf749 6<p><img alt="<?php print_string('paypalaccepted', 'enrol_paypal') ?>" src="https://www.paypal.com/en_US/i/logo/PayPal_mark_60x38.gif" /></p>
3d970777 7<p><?php print_string("paymentinstant") ?></p>
48494310 8<?php
9 $paypalurl = empty($CFG->usepaypalsandbox) ? 'https://www.paypal.com/cgi-bin/webscr' : 'https://www.sandbox.paypal.com/cgi-bin/webscr';
547e5e7a 10?>
48494310 11<form action="<?php echo $paypalurl ?>" method="post">
04f47a89 12
5599d142 13<input type="hidden" name="cmd" value="_xclick" />
934bdbee 14<input type="hidden" name="charset" value="utf-8" />
24df3e1a 15<input type="hidden" name="business" value="<?php p($this->get_config('paypalbusiness'))?>" />
5599d142 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) ?>" />
24df3e1a 21<input type="hidden" name="custom" value="<?php echo "{$USER->id}-{$course->id}-{$instance->id}" ?>" />
5599d142 22
24df3e1a 23<input type="hidden" name="currency_code" value="<?php p($instance->currency) ?>" />
5599d142 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") ?>" />
04f47a89 43
44</form>
45
3d970777 46</div>