adjustments
authorgreg gay <ggay@ocad.ca>
Mon, 4 Jun 2007 18:35:16 +0000 (18:35 -0000)
committergreg gay <ggay@ocad.ca>
Mon, 4 Jun 2007 18:35:16 +0000 (18:35 -0000)
mods/ecomm/include/payments.lib.php
mods/ecomm/index_admin.php
mods/ecomm/module.xml
mods/ecomm/payment.php
mods/ecomm/readme

index 2fd5364..ed8ab8c 100644 (file)
@@ -7,7 +7,7 @@ if (!defined('AT_INCLUDE_PATH')) { exit; }
 * @access  public
 * @param   int $payment_id             Payment Identifier generated by ATutor  
 * @param   dbl $amount the fee for the course
-* @param   int $format_type            timestamp format, an AT_DATE constant
+* @param   int $course_id              the numeric identifier for the course being paid for
 * @return  $_POST data         Pruchase information sent to Paypal
 * @author  Greg Gay
 */
@@ -40,7 +40,6 @@ function paypal_print_form($payment_id, $amount, $course_id) {
 }
 
 function paypal_authenticate_user_response() {
-       // nothing to do but set the feedback
        global $_config, $msg;
        if($_config['ec_gateway'] == 'PayPal'){ 
                if (isset($_GET['pid'], $_GET['amt'], $_GET['tx'], $_GET['sig'])) {
index 0b27029..e209766 100644 (file)
@@ -23,9 +23,9 @@ if (isset($_POST['cancel'])) {
        if (!$_POST['ec_vendor_id']){\r
                $msg->addError('EC_ID_EMPTY');\r
        }\r
-       if (!$_POST['ec_password']){\r
-               $msg->addError('EC_PASSWORD_EMPTY');\r
-       }               \r
+       //if (!$_POST['ec_password']){\r
+               //$msg->addError('EC_PASSWORD_EMPTY');\r
+       //}             \r
        if (!$msg->containsErrors()) {\r
                $_POST['ec_gateway'] = $addslashes($_POST['ec_gateway']);\r
                $sql = "REPLACE INTO ".TABLE_PREFIX."config VALUES ('ec_gateway', '$_POST[ec_gateway]')";\r
index 3491f3b..de6bf1d 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="ISO-8859-1"?> \r
 <module version="0.1"> \r
     <name lang="en">Payments</name> \r
-    <description lang="en">This module can be used to connect to a payment service to collect fees for course enrollment. By default it comes with a MiraPay configuration, but can be adapted without too much effort to work with other credit card payment services.</description> \r
+    <description lang="en">This module can be used to connect to a payment service to collect fees for course enrollment. By default it comes with PayPal and MiraPay configurations, but can be adapted without too much effort to work with other credit card payment services.</description> \r
     <maintainers>\r
         <maintainer> \r
             <name>ATutor Team</name> \r
@@ -12,8 +12,8 @@
     <license>BSD</license> \r
        <release> \r
         <version>0.2</version> \r
-        <date>2007-05-01</date> \r
+        <date>2007-05-04</date> \r
         <state>Beta</state> \r
-        <notes></notes> \r
+        <notes>See the readme file included with the source code for details about setting up either a Paypal or MiraPay merchant account.</notes> \r
     </release> \r
 </module>
\ No newline at end of file
index 0017b44..295dc71 100644 (file)
@@ -70,8 +70,7 @@ $payment_id = mysql_insert_id($db);
 
        <?php
                /*
-                * this payment form can be replaced by any other payment gateway.
-                * a paypal version will be added soon, which will submit the form to paypal.
+                * these payment forms below can be replaced by any other payment gateway.
                 * when the gateway sends back the response then it is authenticated and if
                 * the amounts match then the `payments` transaction is updated and approved.
                */
index fafd946..8be2c73 100644 (file)
@@ -17,7 +17,7 @@ https://www.paypal.com/cgi-bin/webscr
 
 ---------------
 MiraPay Test Account
-#A test account is available. Enter the following information into the admin payments settings screen. You will need to setup a proper merchant account with Mirapay to actually use the system for collecting your own payments, but to test the module the test account works well enough.
+#A test account is available. Enter the following information into the admin payments settings screen. You will need to setup a proper merchant account with Mirapay to actually use the system for collecting your own payments, but to test the module the test account works well enough. MiraPay has the advantage over PayPal of not requiring the customer to have an account on their system.
 
 Test Location:
 https://www3.eigendev.com/mirapay/secure_credit.php
@@ -41,7 +41,7 @@ PayPal Merchant Account Setup
 See the details for setting up a PayPal account at:
 http://www.paypal.com/cgi-bin/webscr?cmd=_merchant-outside
 
-The ATutor Payments module is written to run with PayPal "Buy Now Buttons" which allows customers to purchase one item at a time, in the case of ATutor, a single course at a time.
+The ATutor Payments module is written to run with PayPal "Buy Now Buttons" which allows customers to purchase one item at a time, in the case of ATutor, a single course at a time. Note that payees will have to setup their own PayPal customer account before they can make payments through PayPal. Also note that after a payment is made through PayPal, there is a 10 second delay befpre the payee is redirected back to ATutor, and the payments tabe updated with the transaction ID from PayPal. If a users decides to go off to some other web site before being redirected back to ATutor, the payments table will not be updated. In such a case to admin, or the instructor of a course if instructors are given payment management privileges, will need to manually update the payments table, and if auto enroll is turned on, also update the enrolment for the course, manually enrolling the person in the course.  This problem is less likely to occur when using MiraPay, which automatically redirectls back to ATutor without any delay during which the users can go off somewhere else on the Internet.
 
 Once you have your paypal account setup, enter the URL to the PayPal Credit Card processing in the Payments>Settings screen, followed theVendor ID (leave the password field empty)