You are here

uc_paypal.install in Ubercart 8.4

Install, update and uninstall functions for the uc_paypal module.

File

payment/uc_paypal/uc_paypal.install
View source
<?php

/**
 * @file
 * Install, update and uninstall functions for the uc_paypal module.
 */

/**
 * Implements hook_schema().
 */
function uc_paypal_schema() {
  $schema = [];
  $schema['uc_payment_paypal_ipn'] = [
    'description' => 'Logs PayPal Instant Payment Notifications.',
    'fields' => [
      'order_id' => [
        'description' => 'The order ID.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ],
      'txn_id' => [
        'description' => 'The transaction ID from PayPal.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ],
      'txn_type' => [
        'description' => 'The transaction type from PayPal.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ],
      'mc_gross' => [
        'description' => 'The payment amount from PayPal.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ],
      'status' => [
        'description' => 'The IPN status from PayPal.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ],
      'receiver_email' => [
        'description' => 'The e-mail address of the PayPal account.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ],
      'payer_email' => [
        'description' => 'The e-mail address of the buyer.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ],
      'received' => [
        'description' => 'The IPN receipt timestamp.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ],
    ],
    'indexes' => [
      'order_id' => [
        'order_id',
      ],
    ],
    'foreign keys' => [
      'uc_orders' => [
        'table' => 'uc_orders',
        'columns' => [
          'order_id' => 'order_id',
        ],
      ],
    ],
  ];
  return $schema;
}

Functions

Namesort descending Description
uc_paypal_schema Implements hook_schema().