mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Added database controls for Paypal module
This commit is contained in:
parent
9b720f926a
commit
f7052e9117
19
enrol/paypal/db/mysql.php
Normal file
19
enrol/paypal/db/mysql.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?PHP //$Id$
|
||||
|
||||
// MySQL commands for upgrading this enrolment module
|
||||
|
||||
function paypal_upgrade($oldversion=0) {
|
||||
|
||||
global $CFG, $THEME, $db;
|
||||
|
||||
$result = true;
|
||||
|
||||
if ($oldversion == 0) {
|
||||
$result = modify_database("$CFG->dirroot/enrol/paypal/db/mysql.sql");
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
||||
|
||||
?>
|
23
enrol/paypal/db/mysql.sql
Normal file
23
enrol/paypal/db/mysql.sql
Normal file
@ -0,0 +1,23 @@
|
||||
CREATE TABLE `enrol_paypal` (
|
||||
`id` int(10) unsigned NOT NULL auto_increment,
|
||||
`business` varchar(255) NOT NULL default '',
|
||||
`receiver_email` varchar(255) NOT NULL default '',
|
||||
`receiver_id` varchar(255) NOT NULL default '',
|
||||
`item_name` varchar(255) NOT NULL default '',
|
||||
`courseid` int(10) unsigned NOT NULL default '0',
|
||||
`userid` int(10) unsigned NOT NULL default '0',
|
||||
`memo` varchar(255) NOT NULL default '',
|
||||
`tax` varchar(255) NOT NULL default '',
|
||||
`option_name1` varchar(255) NOT NULL default '',
|
||||
`option_selection1_x` varchar(255) NOT NULL default '',
|
||||
`option_name2` varchar(255) NOT NULL default '',
|
||||
`option_selection2_x` varchar(255) NOT NULL default '',
|
||||
`payment_status` varchar(255) NOT NULL default '',
|
||||
`pending_reason` varchar(255) NOT NULL default '',
|
||||
`reason_code` varchar(30) NOT NULL default '',
|
||||
`txn_id` varchar(255) NOT NULL default '',
|
||||
`parent_txn_id` varchar(255) NOT NULL default '',
|
||||
`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' ;
|
19
enrol/paypal/db/postgres7.php
Normal file
19
enrol/paypal/db/postgres7.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?PHP //$Id$
|
||||
|
||||
// PostgreSQL commands for upgrading this enrolment module
|
||||
|
||||
function paypal_upgrade($oldversion=0) {
|
||||
|
||||
global $CFG, $THEME, $db;
|
||||
|
||||
$result = true;
|
||||
|
||||
if ($oldversion == 0) {
|
||||
$result = modify_database("$CFG->dirroot/enrol/paypal/db/postgres7.sql");
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
||||
|
||||
?>
|
22
enrol/paypal/db/postgres7.sql
Normal file
22
enrol/paypal/db/postgres7.sql
Normal file
@ -0,0 +1,22 @@
|
||||
CREATE TABLE prefix_enrol_paypal (
|
||||
id SERIAL PRIMARY KEY,
|
||||
business varchar(255) NOT NULL default '',
|
||||
receiver_email varchar(255) NOT NULL default '',
|
||||
receiver_id varchar(255) NOT NULL default '',
|
||||
item_name varchar(255) NOT NULL default '',
|
||||
courseid integer NOT NULL default '0',
|
||||
userid integer NOT NULL default '0',
|
||||
memo varchar(255) NOT NULL default '',
|
||||
tax varchar(255) NOT NULL default '',
|
||||
option_name1 varchar(255) NOT NULL default '',
|
||||
option_selection1_x varchar(255) NOT NULL default '',
|
||||
option_name2 varchar(255) NOT NULL default '',
|
||||
option_selection2_x varchar(255) NOT NULL default '',
|
||||
payment_status varchar(255) NOT NULL default '',
|
||||
pending_reason varchar(255) NOT NULL default '',
|
||||
reason_code varchar(30) NOT NULL default '',
|
||||
txn_id varchar(255) NOT NULL default '',
|
||||
parent_txn_id varchar(255) NOT NULL default '',
|
||||
payment_type varchar(30) NOT NULL default '',
|
||||
timeupdated integer NOT NULL default '0'
|
||||
);
|
Loading…
x
Reference in New Issue
Block a user