MDL-7838 Fixed wrong Paypal spelling, should be PayPal

MDL-7539 PayPal pay button XHTML compliance
MDL-3137 PayPal acceptace logo displayed on enrollment page
This commit is contained in:
skodak 2006-11-14 09:26:22 +00:00
parent 4849431074
commit 5599d142f6
7 changed files with 41 additions and 40 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="enrol/paypal/db" VERSION="20060807" COMMENT="XMLDB file for Moodle enrol/paypal">
<TABLES>
<TABLE NAME="enrol_paypal" COMMENT="Holds all known information about Paypal transactions">
<TABLE NAME="enrol_paypal" COMMENT="Holds all known information about PayPal transactions">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="business"/>
<FIELD NAME="business" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="receiver_email"/>

View File

@ -20,4 +20,4 @@ CREATE TABLE `prefix_enrol_paypal` (
`payment_type` varchar(30) NOT NULL default '',
`timeupdated` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM COMMENT='Holds all known information about Paypal transactions' ;
) TYPE=MyISAM COMMENT='Holds all known information about PayPal transactions' ;

View File

@ -2,41 +2,42 @@
<p><?php print_string("paymentrequired") ?></p>
<p><b><?php echo get_string("cost").": $CFG->enrol_currency $cost"; ?></b></p>
<p><img alt="PayPal" src="https://www.paypal.com/en_US/i/logo/PayPal_mark_60x38.gif" /></p>
<p><?php print_string("paymentinstant") ?></p>
<?php
$paypalurl = empty($CFG->usepaypalsandbox) ? 'https://www.paypal.com/cgi-bin/webscr' : 'https://www.sandbox.paypal.com/cgi-bin/webscr';
?>
<form action="<?php echo $paypalurl ?>" 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="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="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="no_shipping" 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="for_auction" value="false" />
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="no_shipping" 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="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") ?>">
<input type="submit" value="<?php print_string("sendpaymentbutton", "enrol_paypal") ?>" />
</form>

View File

@ -1,5 +1,5 @@
<?php // $Id$
// Implements all the main code for the Paypal plugin
// Implements all the main code for the PayPal plugin
require_once("$CFG->dirroot/enrol/enrol.class.php");

View File

@ -1,11 +1,11 @@
<?php // $Id$
/**
* Listens for Instant Payment Notification from Paypal
* Listens for Instant Payment Notification from PayPal
*
* This script waits for Payment notification from Paypal,
* then double checks that data by sending it back to Paypal.
* If Paypal verifies this then it sets up the enrolment for that
* This script waits for Payment notification from PayPal,
* then double checks that data by sending it back to PayPal.
* If PayPal verifies this then it sets up the enrolment for that
*
* Set the $user->timeaccess course array
*
@ -21,7 +21,7 @@
error("Sorry, you can not use the script that way.");
}
/// Read all the data from Paypal and get it ready for later
/// Read all the data from PayPal and get it ready for later
$req = 'cmd=_notify-validate';
@ -64,7 +64,7 @@
$paypaladdr = empty($CFG->usepaypalsandbox) ? 'www.paypal.com' : 'www.sandbox.paypal.com';
$fp = fsockopen ($paypaladdr, 80, $errno, $errstr, 30);
if (!$fp) { /// Could not open a socket to Paypal - FAIL
if (!$fp) { /// Could not open a socket to PayPal - FAIL
echo "<p>Error: could not access paypal.com</p>";
email_paypal_error_to_admin("Could not access paypal.com to verify payment", $data);
die;
@ -96,7 +96,7 @@
// Email user to let them know. Email admin.
if ($data->payment_status == "Pending" and $data->pending_reason != "echeck") {
email_to_user($user, get_admin(), "Moodle: Paypal payment", "Your Paypal payment is pending.");
email_to_user($user, get_admin(), "Moodle: PayPal payment", "Your PayPal payment is pending.");
email_paypal_error_to_admin("Payment pending", $data);
die;
}

View File

@ -2,10 +2,10 @@
// enrol_paypal.php - created with Moodle 1.7 beta + (2006101003)
$string['business'] = 'The email address of your business Paypal account';
$string['business'] = 'The email address of your business PayPal account';
$string['costorkey'] = 'Please choose one of the following methods of enrolment.';
$string['description'] = 'The Paypal module allows you to set up paid courses. If the cost for any course is zero, then students are not asked to pay for entry. There is a site-wide cost that you set here as a default for the whole site and then a course setting that you can set for each course individually. The course cost overrides the site cost.';
$string['enrolname'] = 'Paypal';
$string['sendpaymentbutton'] = 'Send payment via Paypal';
$string['description'] = 'The PayPal module allows you to set up paid courses. If the cost for any course is zero, then students are not asked to pay for entry. There is a site-wide cost that you set here as a default for the whole site and then a course setting that you can set for each course individually. The course cost overrides the site cost.';
$string['enrolname'] = 'PayPal';
$string['sendpaymentbutton'] = 'Send payment via PayPal';
?>

View File

@ -1,7 +1,7 @@
<p align="center"><b>Course Cost</b></p>
<p>If the site has been configured to use an enrolment method
that requires payment (such as the Paypal module), then
that requires payment (such as the PayPal module), then
you can enter a course cost here with no symbol (the currency
is set by the enrolment plugin). For example, 19.95.</p>