changed git call from https to git readonly
[atutor.git] / mods / ecomm / readme
1 # ATutor Ecommerce Module Readme
2
3 ##This moldule is intended for use with ATutor 1.5.4+, though it should work with
4 ## older versions except for the admin enrollment functions, which were added in 1.5.4.
5
6 This module allows for payment of course fees, and automated enrollment when payments are recieved. It can be used with one (and only one at a time) of the following payment gateways.
7
8 Payment Gateways Supported
9 It is currently setup to run with the MiraPay credit card processing service:
10 https://ws1.eigendev.com/mira/
11
12 Or
13
14 It can be used with your PayPal account
15 https://www.paypal.com/cgi-bin/webscr 
16
17 Or
18
19 You can connect to a Beamstream server
20 https://www.beanstream.com/scripts/process_transaction.asp
21
22 ---------------
23 MiraPay Test Account
24 #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.
25
26 Test Location:
27 https://staging.eigendev.com/mirapay/secure_credit.php
28 Test Vendor ID:
29 e911ca205ec7c2a9436af9102c497fd4
30
31 Test Password:
32 test
33
34 # Use the following credit card info to make fake payments through the test account.
35
36 Test Credit Card #
37 4444333322221111
38
39 Test Expiry Date
40 2222
41
42 ------------------
43 PayPal Merchant Account Setup
44 See the details for setting up a PayPal account at:
45 http://www.paypal.com/cgi-bin/webscr?cmd=_merchant-outside
46
47 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 before the payee is redirected back to ATutor, and the payments table 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 may not be updated. In such a case the 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.
48
49 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)
50
51 PayPal Location
52 (for production)
53 https://www.paypal.com/cgi-bin/webscr 
54 or
55 (for testing)
56 https://www.sandbox.paypal.com/cgi-bin/webscr
57
58 See details on setting up a sandbox for testing the modules at:
59 https://www.paypal.com/en_US/ebook/PP_Sandbox_UserGuide/wwhelp/wwhimpl/js/html/wwhelp.htm
60
61 PayPal IPN Setup
62 For security purpose Instant Payment Notification (IPN) must be setup with your PayPal merchant account. You will be asked to provide a URL to the IPN notification verification script, included with the EComm module. While logged into your PayPal account, slect the Profile tab, then choose "Instant Payment Notification Preferences". Turn "ON" the service, and provide the URL. The URL should also include the password you entered when setting up the module Settings in ATutor. The URL would look something like this:
63
64
65 http://www.mysite.com/ATutor/mods/ecomm/response_ipn.php?secret=payment01
66
67
68 --------------------
69 Beanstream Setup
70 You will need to setup a Beanstream sandbox and merchant account at:
71 https://www.beanstream.com/public/index.asp
72
73 1. Once your Beanstream account is setup, in the administrator's Settings area of the Payments module enter the beanstream credit card processing location. This location is the same for your production system and sandbox. 
74
75 https://www.beanstream.com/scripts/process_transaction.asp
76
77 2. Enter the 9 digit Mercant ID assigned by Beanstrem into the "Vendor ID" field of the Payment Settings
78
79 3. Enter the password assigned by Beanstream in the filed below the Vendor ID field.
80
81 4. Set the other configuration options according to your requirements, described in more detail in the Installation & Setup instructions below.
82
83 Use your sandbox account to setup the module and do you testing, and once everything is functioning as it should, switch the Vendor ID and password to those for you production beanstream account.
84
85 In most cases Beanstream will create a sandbook area first, and when your ready, switch the account to live, using the same information previously used for the sandbox. You might however, request that another sandbox account be created once the initial account becomes live.
86
87 The following credit card num,bers can be used for testing. Note that the expiry date for any of these is any time into the future.
88
89 Visa - Use CVD/CVV code 123
90 Approved 4030000010001234
91 Approved $100 Limit 4504481742333
92 Approved VBV 4123450131003312 with VBV passcode 12345
93 Declined 4003050500040005
94
95 MasterCard - Use CVD/CVV code 123
96 Approved 5100000010001004
97 Approved 5194930004875020
98 Approved 5123450000002889
99 Approved 3D Secure 5123450000000000 passcode 12345
100 Declined 5100000020002000
101
102 For additional information, contact Beanstream for a copy of the Beanstream API documentation.
103
104
105
106 --------------------
107 Installation & Setup
108 1. Unpack the downloaded module into the ATutor mods directory. This will create an ecomm/ directory which contains all the module files.
109
110 2. As the ATutor administrator, under the Modules tab choose Install Module, and choose the Payments module from the list of available modules. If you do not see the module available, make sure you have unpacked it into to right place ( /ATutor/mods/ecomm/)
111
112 3. After installed, on the main admin modules screen enable the module.
113
114 4. Once enabled, go to the admin's Payments tab and enter the Test information listed above into the appropriate fields, along with the currency and curreny symbol, and save those setting.
115
116 5.Optionally, the admin can enter a mailing address to which cheques can be sent, if that is to be one of the payment method. Leave this field empty to disabled cheques as a method of payment.
117
118 6. Optionally, the admin can allow instructors to manage their own payments by selecting the associated checkbox in the payments settings.
119
120 7. Optionally, the administrator can receive an email notification when new payments are made by selecting  the associated checkbox in the payments settings
121
122
123 How the module works
124 Payments are course fees associated with an enrollment in a Private course. When a student attempts to enroll in a private course that has a fee associated with it, an entry will be added to the student's Payments screen, accessed through a tab in MyStart page. If the student clicks on Make Payment, and confirms the information as correct, they are redirectled to the secure payment site, where they enter their visa or master card number (availability of either depending on what the merchant account supports), and submit the payment. Just before being redirected to the secure site the information entered by the student is stored in the ec_shop table in ATutor, and it is updated when the payment service has confirmed the payment. Payments that have been completed will be updated with a confirmation code from the payment gateway. 
125
126 If the course has been set to auto-enroll students, they will immediately be given access to the course. If manual enrollment is set, they will receive a notice of their pending enrolment, which the instructor, or administrator must approve. 
127
128 Administrators can manage individual course payments and settings by logging into a specific course, then managing the course payment settings as describe below for Instructors.
129
130 If instrutors are allowed to manage their payments, set by the administrator in step 6 above, they can access Payments through the Manage screen, where they can set the price for the course, and set whether to auto-enroll students, and whether to send an email to the instructor when a payment  has been received. These settings are saved in the ec_course_fees table.
131
132 To make a payment students must first click on Enter Course in the Browse Course listing, then choose to enroll in the course. Then under the Payments Tab, click on Make Payment next to the course that is pending enrollment.
133
134
135