commence adding stripe integration

This commit is contained in:
Nathan Coad
2016-07-21 08:12:14 +10:00
parent bc881f3abb
commit ec6b7399e4
4 changed files with 20 additions and 3 deletions

View File

@@ -1,5 +1,4 @@
<?php <?php
// $Id: booking.events.inc,v 0.1 2012/02/28
/** /**
* @file * @file

View File

@@ -1,9 +1,9 @@
; $Id$
name = Booking System name = Booking System
description = "A module which provides a booking system for event registration." description = "A module which provides a booking system for event registration."
package = Booking System package = Booking System
dependencies[] = date dependencies[] = date
dependencies[] = token dependencies[] = token
dependencies[] = libraries
version = 0.2 version = 0.2
configure = admin/config/booking configure = admin/config/booking/general
core = 7.x core = 7.x

View File

@@ -605,6 +605,16 @@ function booking_update_7239() {
_booking_node_create_mysqlview(); _booking_node_create_mysqlview();
} }
/**
* Add stripe token field to booking_payments table
*/
function booking_update_7239() {
$spec = array('type' => 'varchar', 'length' => '200', 'not null' => FALSE);
db_add_field('booking_payment', 'booking_stripe_token', $spec);
//update the view to match the new table definition
_booking_node_create_mysqlview();
}
/** /**
* Implementation of hook_install(). * Implementation of hook_install().
*/ */
@@ -840,6 +850,7 @@ function booking_schema() {
'booking_payer_status' => array('type' => 'varchar', 'length' => '50', 'not null' => FALSE), 'booking_payer_status' => array('type' => 'varchar', 'length' => '50', 'not null' => FALSE),
'booking_item_name' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE), 'booking_item_name' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
'booking_ipn_track_id' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE)), 'booking_ipn_track_id' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE)),
'booking_stripe_token' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE)),
'primary key' => array('payid'), 'primary key' => array('payid'),
); );

7
booking.stripe.inc Normal file
View File

@@ -0,0 +1,7 @@
<?php
/**
* @file
* Functions for stripe payment integration
* @see https://github.com/ericthelast/drupal-stripe-form and https://www.webomelette.com/drupal-stripe-integration
*/