mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
04ad0d91e8
some diacritics (spanish for now) break the enrol process. Only German and French diacritics are supported for now by PayPal. Functionality can be easily expanded to other characters. It make the sanitity when $CFG->sanitise_for_paypal is enabled. Merged from MOODLE_14_STABLE
41 lines
2.0 KiB
HTML
41 lines
2.0 KiB
HTML
<div align="center">
|
|
|
|
<p><?php print_string("paymentrequired") ?></p>
|
|
<p><b><?php echo get_string("cost").": $CFG->enrol_currency $cost"; ?></b></p>
|
|
<p><?php print_string("paymentinstant") ?></p>
|
|
|
|
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
|
|
|
<input type="hidden" name="cmd" value="_xclick">
|
|
<input type="hidden" name="business" value="<?php p($CFG->enrol_paypalbusiness)?>">
|
|
<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="custom" value="<?php echo "$USER->id-$course->id" ?>">
|
|
|
|
<input type="hidden" name="currency_code" value="<?php p($CFG->enrol_currency) ?>">
|
|
<input type="hidden" name="amount" value="<?php p($cost) ?>">
|
|
|
|
<input type="hidden" name="for_auction" value="false">
|
|
<input type="hidden" name="no_note" value="1">
|
|
<input type="hidden" name="notify_url" value="<?php echo "$CFG->wwwroot/enrol/paypal/ipn.php"?>">
|
|
<input type="hidden" name="return" value="<?php echo "$CFG->wwwroot/enrol/paypal/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_paypal") ?>">
|
|
|
|
</form>
|
|
|
|
</div>
|