function uc_paypal_schema in Ubercart 7.3
Same name and namespace in other branches
- 8.4 payment/uc_paypal/uc_paypal.install \uc_paypal_schema()
- 6.2 payment/uc_paypal/uc_paypal.install \uc_paypal_schema()
Implements hook_schema().
File
- payment/
uc_paypal/ uc_paypal.install, line 35 - Install, update and uninstall functions for the uc_paypal module.
Code
function uc_paypal_schema() {
$schema = array();
$schema['uc_payment_paypal_ipn'] = array(
'description' => 'Logs PayPal Instant Payment Notifications.',
'fields' => array(
'order_id' => array(
'description' => 'The order ID.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'txn_id' => array(
'description' => 'The transaction ID from PayPal.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'txn_type' => array(
'description' => 'The transaction type from PayPal.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'mc_gross' => array(
'description' => 'The payment amount from PayPal.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'status' => array(
'description' => 'The IPN status from PayPal.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'receiver_email' => array(
'description' => 'The e-mail address of the PayPal account.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'payer_email' => array(
'description' => 'The e-mail address of the buyer.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'received' => array(
'description' => 'The IPN receipt timestamp.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
),
'indexes' => array(
'order_id' => array(
'order_id',
),
),
'foreign keys' => array(
'uc_orders' => array(
'table' => 'uc_orders',
'columns' => array(
'order_id' => 'order_id',
),
),
),
);
return $schema;
}