4420257fde70289e1e3ea65780b9f960c4f6ff3f
[atutor.git] / mods / ecomm / module.sql
1 # sql file for ATutor Ecommerce module\r
2 \r
3 CREATE TABLE `payments` (\r
4 `payment_id` SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,\r
5 `timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ,\r
6 `approved` TINYINT NOT NULL DEFAULT '0',\r
7 `transaction_id` CHAR( 100 ) NOT NULL ,\r
8 `member_id` MEDIUMINT UNSIGNED NOT NULL ,\r
9 `course_id` MEDIUMINT UNSIGNED NOT NULL ,\r
10 `amount` DECIMAL( 7, 2 ) NOT NULL DEFAULT '0'\r
11 ) ENGINE=MYISAM ;\r
12 \r
13 \r
14 CREATE TABLE `ec_course_fees` (\r
15   `course_id` smallint( 8 )  NOT  NULL ,\r
16   `course_fee` DECIMAL( 7, 2 ) NOT  NULL DEFAULT '0',\r
17   `auto_approve` tinyint( 1 )  default NULL ,\r
18   `auto_email` tinyint( 1 )  default NULL ,\r
19  PRIMARY  KEY ( `course_id` )\r
20 ) ENGINE=MyISAM;\r
21 \r
22 \r
23 \r
24 INSERT INTO `language_text` VALUES ('en', '_module','ec_transaction_id','Transaction ID',NOW(),'');\r
25 INSERT INTO `language_text` VALUES ('en', '_module','ec_settings','Settings',NOW(),'');\r
26 INSERT INTO `language_text` VALUES ('en', '_module','ec_payments','Payments',NOW(),'');\r
27 INSERT INTO `language_text` VALUES ('en', '_module','ec_approve_manually','Approve Manually',NOW(),'');\r
28 INSERT INTO `language_text` VALUES ('en', '_module','ecomm','Payments',NOW(),'');\r
29 INSERT INTO `language_text` VALUES ('en', '_module','ec_confirm_info','Review the following information before proceeding. If the information is correct, click the Pay by Credit Card button (or Pay by Cheque if enabled) to move on to the next step.',NOW(),'');\r
30 INSERT INTO `language_text` VALUES ('en', '_module','ec_course','Course',NOW(),'');\r
31 INSERT INTO `language_text` VALUES ('en', '_module','ec_amount','Amount',NOW(),'');\r
32 INSERT INTO `language_text` VALUES ('en', '_module','ec_firstname','First Name',NOW(),'');\r
33 INSERT INTO `language_text` VALUES ('en', '_module','ec_lastname','Last Name',NOW(),'');\r
34 INSERT INTO `language_text` VALUES ('en', '_module','ec_organization','Organization',NOW(),'');\r
35 INSERT INTO `language_text` VALUES ('en', '_module','ec_email','Email',NOW(),'');\r
36 INSERT INTO `language_text` VALUES ('en', '_module','ec_address','Address',NOW(),'');\r
37 INSERT INTO `language_text` VALUES ('en', '_module','ec_postal','Postal/Zip Code',NOW(),'');\r
38 INSERT INTO `language_text` VALUES ('en', '_module','ec_telephone','Telephone',NOW(),'');\r
39 INSERT INTO `language_text` VALUES ('en', '_module','ec_country','Country',NOW(),'');\r
40 INSERT INTO `language_text` VALUES ('en', '_module','ec_comments','Comments',NOW(),'');\r
41 INSERT INTO `language_text` VALUES ('en', '_module','ec_payment_message','%s has registered in the course %s. To review the payment, login to ATutor as an Administrator then click on the Payments tab.',NOW(),'');\r
42 INSERT INTO `language_text` VALUES ('en', '_module','ec_invalid_fields','The following fields are invalid',NOW(),'');\r
43 INSERT INTO `language_text` VALUES ('en', '_module','ec_requirements','Requirements to proceed',NOW(),'');\r
44 INSERT INTO `language_text` VALUES ('en', '_module','ec_requirements_ssl','SSL enabled, with 128-bit encryption. ',NOW(),'');\r
45 INSERT INTO `language_text` VALUES ('en', '_module','ec_requirements_cookies','Cookies enabled.',NOW(),'');\r
46 INSERT INTO `language_text` VALUES ('en', '_module','ec_requirements_javascript','Javascript enabled.',NOW(),'');\r
47 INSERT INTO `language_text` VALUES ('en', '_module','ec_requirements_comment','Note that most current browsers will have these enabled by default. If you are unable to complete the transaction, check these settings in your browser to be sure they are enabled.',NOW(),'');\r
48 INSERT INTO `language_text` VALUES ('en', '_module','ec_modify','Modify ',NOW(),'');\r
49 INSERT INTO `language_text` VALUES ('en', '_module','ec_select_creditcard','Select the Pay by Credit Card button below to move to the secure credit card payment site. Following a payment,  a printable receipt will be generated and email will be sent to the payee with details of the transaction. Or, select Pay by Cheque to send payment by regular mail.',NOW(),'');\r
50 INSERT INTO `language_text` VALUES ('en', '_module','ec_paybycredit','Pay by Credit Card',NOW(),'');\r
51 INSERT INTO `language_text` VALUES ('en', '_module','ec_paybycheque','Pay by Cheque',NOW(),'');\r
52 INSERT INTO `language_text` VALUES ('en', '_module','ec_date','Date Paid',NOW(),'');\r
53 INSERT INTO `language_text` VALUES ('en', '_module','ec_acceptvisa','Accepting Visa',NOW(),'');\r
54 INSERT INTO `language_text` VALUES ('en', '_module','ec_acceptmastercard','Accepting Master Card',NOW(),'');\r
55 INSERT INTO `language_text` VALUES ('en', '_module','ec_payfeesfor','Pay Fees',NOW(),'');\r
56 INSERT INTO `language_text` VALUES ('en', '_module','ec_fees','Fees',NOW(),'');\r
57 INSERT INTO `language_text` VALUES ('en', '_module','ec_complete_thisinfo','Complete the information below. ',NOW(),'');\r
58 INSERT INTO `language_text` VALUES ('en', '_module','ec_next_toproceed','Use the <em>Next Step</em> button to review your information before proceding to the secure credit card payment site.',NOW(),'');\r
59 INSERT INTO `language_text` VALUES ('en', '_module','ec_purchaser_info','Purchaser Information',NOW(),'');\r
60 INSERT INTO `language_text` VALUES ('en', '_module','ec_required','Required ',NOW(),'');\r
61 INSERT INTO `language_text` VALUES ('en', '_module','ec_next_step','Next Step ',NOW(),'');\r
62 INSERT INTO `language_text` VALUES ('en', '_module','ec_location_text','Enter the following settings for your credit card processing service. ',NOW(),'');\r
63 INSERT INTO `language_text` VALUES ('en', '_module','ec_location','Credit card processing location URL ',NOW(),'');\r
64 INSERT INTO `language_text` VALUES ('en', '_module','ec_payments','ATutor Payments ',NOW(),'');\r
65 INSERT INTO `language_text` VALUES ('en', '_module','ec_payment_confirmation','Payment Confirmation ',NOW(),'');\r
66 INSERT INTO `language_text` VALUES ('en', '_module','ec_payment_received','An ATutor Payment Received ',NOW(),'');\r
67 INSERT INTO `language_text` VALUES ('en', '_module','ec_payment_retrieve_admin','An ATutor payment has been received. To review the payment login to ATutor as the administrator, choose the Payments tab, then select Review Payments  ',NOW(),'');\r
68 INSERT INTO `language_text` VALUES ('en', '_module','ec_this_course_fee','Course Fee ',NOW(),'');\r
69 INSERT INTO `language_text` VALUES ('en', '_module','ec_vendor_id','Vendor ID assigned by credit card payment service ',NOW(),'');\r
70 INSERT INTO `language_text` VALUES ('en', '_module','ec_password','Password assigned by credit card payment service ',NOW(),'');\r
71 INSERT INTO `language_text` VALUES ('en', '_module','ec_currency','Currency ',NOW(),'');\r
72 INSERT INTO `language_text` VALUES ('en', '_module','ec_currency_symbol','Currency Symbol ',NOW(),'');\r
73 INSERT INTO `language_text` VALUES ('en', '_module','ec_currency_other','Other Currency ',NOW(),'');\r
74 INSERT INTO `language_text` VALUES ('en', '_module','ec_gateway','Payment Gateway ',NOW(),'');\r
75 INSERT INTO `language_text` VALUES ('en', '_module','ec_course_fee','Fee to charge for this course ',NOW(),'');\r
76 INSERT INTO `language_text` VALUES ('en', '_module','ec_auto_approve','Auto approve enrollment when fee has been paid ',NOW(),'');\r
77 INSERT INTO `language_text` VALUES ('en', '_module','ec_payment_made','Course Fees Received ',NOW(),'');\r
78 \r
79 INSERT INTO `language_text` VALUES ('en', '_module','ec_enrollpay_confirmed_manual','Your payment has been received, and you have been enrolled in <strong>%s</strong>. You should receive confirmation by email, and access to the course, once approved by the instructor. ',NOW(),'');\r
80 INSERT INTO `language_text` VALUES ('en', '_module','ec_enrollpay_confirmed_auto','Your payment has been received, and you have been enrolled in <strong>%s</strong>. You can now <a href="login.php?course=%s">login to the course</a>. ',NOW(),'');\r
81 \r
82 INSERT INTO `language_text` VALUES ('en', '_module','ec_payment_mail_instruction','Course fees have been received for the course: %s. Login as the course instructor and review the payment through the Manage tab, then choose Payments. ',NOW(),'');\r
83 INSERT INTO `language_text` VALUES ('en', '_module','ec_payment_mail_instruction','Course fees have been recieved for course %. Login to the Payments utility to review the payment, and to approved the enrollment if Auto Approve Enrollment has not been set. ',NOW(),'');\r
84 INSERT INTO `language_text` VALUES ('en', '_module','ec_payment_made','Fees Received ',NOW(),'');\r
85 INSERT INTO `language_text` VALUES ('en', '_module','ec_allow_instructors','Allow instructors to manage payments ',NOW(),'');\r
86 INSERT INTO `language_text` VALUES ('en', '_module','ec_cancel','Cancel',NOW(),'');\r
87 INSERT INTO `language_text` VALUES ('en', '_module','ec_auto_email','Email instructor when a payment has been received',NOW(),'');\r
88 INSERT INTO `language_text` VALUES ('en', '_module','ec_requirements_comments','Note that most current browsers will have these enabled by default. If you are unable to complete the transaction, check these settings in your browser to be sure they are enabled.',NOW(),'');\r
89 INSERT INTO `language_text` VALUES ('en', '_module','ec_remove','Remove/Un-Enroll',NOW(),'');\r
90 INSERT INTO `language_text` VALUES ('en', '_module','ec_this_course_fee','Course Fee',NOW(),'');\r
91 INSERT INTO `language_text` VALUES ('en', '_module','ec_payment_made','Payment Received',NOW(),'');\r
92 INSERT INTO `language_text` VALUES ('en', '_module','ec_enroll_approved','Enrollment Approved',NOW(),'');\r
93 INSERT INTO `language_text` VALUES ('en', '_module','ec_action','Action',NOW(),'');\r
94 INSERT INTO `language_text` VALUES ('en', '_module','ec_full_payment_recieved','Fees Paid',NOW(),'');\r
95 INSERT INTO `language_text` VALUES ('en', '_module','ec_make_payment','Make Payment',NOW(),'');\r
96 INSERT INTO `language_text` VALUES ('en', '_module','ec_student_name','Name',NOW(),'');\r
97 INSERT INTO `language_text` VALUES ('en', '_module','ec_payment_failed','Payment Failed/Cancelled',NOW(),'');\r
98 INSERT INTO `language_text` VALUES ('en', '_module','ec_course_name','Course Title',NOW(),'');\r
99 INSERT INTO `language_text` VALUES ('en', '_module','ec_balance_due','Balance Due',NOW(),'');\r
100 INSERT INTO `language_text` VALUES ('en', '_module','ec_amount_recieved','Amount Received',NOW(),'');\r
101 INSERT INTO `language_text` VALUES ('en', '_module','ec_email_admin','Email payment notices to the administrator',NOW(),'');\r
102 INSERT INTO `language_text` VALUES ('en', '_module','ec_admin_payment_mail_instruction','A payment has been made for course: %s. To review the payment login to ATutor as an administrator and select the Payments tab.',NOW(),'');\r
103 INSERT INTO `language_text` VALUES ('en', '_module','ec_login','login',NOW(),'');\r
104 INSERT INTO `language_text` VALUES ('en', '_module','ec_payments_settings','Payment Settings',NOW(),'');\r
105 INSERT INTO `language_text` VALUES ('en', '_module','ec_payments_received','Payments Received',NOW(),'');\r
106 INSERT INTO `language_text` VALUES ('en', '_module','ec_return_to_payments','Return to Payments',NOW(),'');\r
107 INSERT INTO `language_text` VALUES ('en', '_module','ec_start_date','Start Date',NOW(),'');\r
108 INSERT INTO `language_text` VALUES ('en', '_module','ec_end_date','End Date',NOW(),'');\r
109 INSERT INTO `language_text` VALUES ('en', '_module','ec_set_date','Set Dates',NOW(),'');\r
110 INSERT INTO `language_text` VALUES ('en', '_module','ec_invoice','Invoice',NOW(),'');\r
111 INSERT INTO `language_text` VALUES ('en', '_module','ec_print_invoice','Print_invoice',NOW(),'');\r
112 INSERT INTO `language_text` VALUES ('en', '_module','ec_paybypaypal','Pay by PayPal',NOW(),'');\r
113 INSERT INTO `language_text` VALUES ('en', '_module','ec_store_log','Keep transaction log ',NOW(),'');\r
114 INSERT INTO `language_text` VALUES ('en', '_module','ec_log_file','Full path to writable transaction log file. (required if log is enable, create writable  file manually if necessary) ',NOW(),'');\r
115 INSERT INTO `language_text` VALUES ('en', '_module','ec_export_data','Export Data Displayed Below',NOW(),'');\r
116 INSERT INTO `language_text` VALUES ('en', '_module','ec_date_picker','Select a date range to display. (e.g. 2007-2-6)',NOW(),'');\r
117 INSERT INTO `language_text` VALUES ('en', '_module','ec_contact_email','EMail notification of payments to: (if different from the ATutor contact email, set in System Preferences)',NOW(),'');\r
118 INSERT INTO `language_text` VALUES ('en', '_module','ec_contact_address','Address where cheques should be sent. (leave empty to disabled cheque payments)',NOW(),'');\r
119 INSERT INTO `language_text` VALUES ('en', '_module','ec_date_picker','The table below shows by default the past 30 payments. Use the date selectors to select a specific date range.',NOW(),'');\r
120 INSERT INTO `language_text` VALUES ('en', '_module','ec_cc_number','Credit Card Number',NOW(),'');\r
121 INSERT INTO `language_text` VALUES ('en', '_module','ec_cc_expiry_month','Expiry Month',NOW(),'');\r
122 INSERT INTO `language_text` VALUES ('en', '_module','ec_cc_expiry_year','Expiry Year',NOW(),'');\r
123 INSERT INTO `language_text` VALUES ('en', '_module','ec_more_info_required','<strong>The following additional information is needed to complete your payment request:</strong><br/>',NOW(),'');\r
124 INSERT INTO `language_text` VALUES ('en', '_module','ec_province','State/Province',NOW(),'');\r
125 INSERT INTO `language_text` VALUES ('en', '_module','ec_cc_cvd_number','Card CVD Number',NOW(),'');\r
126 INSERT INTO `language_text` VALUES ('en', '_module','ec_cc_cvd_info','(3 or 4 digit number on the back of the card)',NOW(),'');\r
127 INSERT INTO `language_text` VALUES ('en', '_module','ec_cc_cvd_number','Card CVD Number',NOW(),'');\r
128 INSERT INTO `language_text` VALUES ('en', '_msgs','AT_INFOS_EC_NO_PAID_COURSES','You have not enrolled in any courses that require fees to be paid. <a href="./users/browse.php">Browse</a> courses. ',NOW(),'');\r
129 INSERT INTO `language_text` VALUES ('en', '_msgs','AT_FEEDBACK_EC_ADD_SAVED','Payment settings were successfully saved. ',NOW(),'');\r
130 INSERT INTO `language_text` VALUES ('en', '_msgs','AT_INFOS_EC_NO_STUDENTS_ENROLLED','No students have requested enrollment. ',NOW(),'');\r
131 INSERT INTO `language_text` VALUES ('en', '_msgs','AT_FEEDBACK_EC_PAYMENT_CONFIRMED_AUTO','Your payment has been received, and your course enrollment has been approved. You may now <a href="login.php?course=%s" style="color:red;">login to the course</a>. ',NOW(),'');\r
132 INSERT INTO `language_text` VALUES ('en', '_msgs','AT_FEEDBACK_EC_PAYMENT_CONFIRMED_MANUAL','Your payment has been received. You will receive a notice by email when your enrollment in the course has been manually approved. ',NOW(),'');\r
133 INSERT INTO `language_text` VALUES ('en', '_msgs','AT_FEEDBACK_EC_COURSE_PAYMENT_SETTINGS_SAVED','Course payment settings have been saved.',NOW(),'');\r
134 INSERT INTO `language_text` VALUES ('en', '_msgs','AT_FEEDBACK_EC_COURSE_PAYMENT_SETTINGS_NOT_SAVED','Unable to save course payment settings. Contact your system administrator to report the problem',NOW(),'');\r
135 INSERT INTO `language_text` VALUES ('en', '_msgs','AT_ERROR_EC_PAYMENT_FAILED','The payment was cancelled or  failed.',NOW(),'');\r
136 INSERT INTO `language_text` VALUES ('en', '_msgs','AT_INFOS_EC_PAYMENTS_TURNED_OFF','Course fees are being managed by the systems administrator.',NOW(),'');\r
137 INSERT INTO `language_text` VALUES ('en', '_msgs','AT_ERROR_EC_INVOICE_NOT_FOUND','Invoice number cannot be found.',NOW(),'');\r
138 INSERT INTO `language_text` VALUES ('en', '_msgs','AT_ERROR_EC_INVOICE_APPROVED','Invoice number has already been approved.',NOW(),'');\r
139 INSERT INTO `language_text` VALUES ('en', '_msgs','AT_FEEDBACK_ACTION_PENDING_CC_CONFIRM','Your enrollment is conditional on your credit card payment being approved',NOW(),'');\r
140 REPLACE INTO `language_text` VALUES ('en', '_msgs','AT_FEEDBACK_APPROVAL_PENDING','Your enrolment request has been made. To complete your enrolment, open the <a href="mods/ecomm/index.php" style="color:red;">Payments tab</a> above, then click on <a href="mods/ecomm/index.php" style="color:red;">Make Payment</a> next to the listing for the course you enrolled in.',NOW(),'');\r