You are here

stripe_payment.install in Stripe 7

Install, update and uninstall functions for the Stripe Payment module.

File

stripe_payment/stripe_payment.install
View source
<?php

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

/**
 * Implements hook_schema().
 */
function stripe_payment_schema() {
  $schema['stripe_payment_keys'] = array(
    'description' => 'Stripe keys for Payment Methods not using the site-wide keys sets.',
    'fields' => array(
      'pmid' => array(
        'description' => 'The {payment_method}.pmid this line item belongs to.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'secret' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
      'publishable' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'pmid',
    ),
  );
  $schema['stripe_payment_data'] = array(
    'description' => 'Stripe data for Payments.',
    'fields' => array(
      'pid' => array(
        'description' => 'The {payment}.pid this line item belongs to.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'type' => array(
        'description' => "Type of stored ID, either 'charge', 'token'.",
        'type' => 'varchar',
        'length' => '6',
        'not null' => TRUE,
      ),
      'id' => array(
        'description' => 'ID of the Stripe Token/Charge for the payment.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'pid',
    ),
  );
  return $schema;
}

Functions

Namesort descending Description
stripe_payment_schema Implements hook_schema().