Update from remote.

This commit is contained in:
Matt
2019-10-04 21:05:43 -05:00
parent 017b4b731c
commit 01a5a1b15f
7 changed files with 923 additions and 361 deletions

View File

@ -92,6 +92,57 @@ function uc_stripe_install() {
variable_set('uc_credit_validate_numbers', FALSE);
}
/**
* Implements hook_uninstall().
*/
function uc_stripe_uninstall() {
variable_del('uc_stripe_authentication_required_email');
}
/**
* Implements hook_schema().
*/
function uc_stripe_schema() {
$schema['uc_stripe_pending_auth'] = array(
'description' => 'Ubercart Stripe - Track orders pending authentication',
'fields' => array(
'id' => array(
'description' => 'id of entry',
'type' => 'serial',
'not null' => TRUE
),
'order_id' => array(
'description' => 'Order Id of pending order',
'type' => 'int',
'not null' => TRUE
),
'rfee_id' => array(
'description' => 'Recurring Fee Id of pending order',
'type' => 'int',
'not null' => TRUE
),
'completed' => array(
'description' => 'Competion status of this pending order',
'type' => 'int',
'not null' => TRUE
),
'hash' => array (
'description' => 'The unqiue has of order and payment id',
'type' => 'varchar',
'length' => '100',
'not null' => TRUE
),
),
'unique keys' => array(
'hash' => array(
'hash'
)
),
'primary key' => array('id'),
);
return $schema;
}
/**
* Enable triggered renewals, as uc_recurring manages renewals with this version.
*/
@ -181,3 +232,61 @@ function _uc_stripe_move_customer_id(&$sandbox) {
$sandbox['#finished'] = $sandbox['progress'] / $sandbox['max'];
}
}
/**
* Creates table to track orders that require extra authentication verification.
*/
function uc_stripe_update_7301() {
$table = array(
'description' => 'Ubercart Stripe - Track orders pending authentication',
'fields' => array(
'id' => array(
'description' => 'id of entry',
'type' => 'serial',
'not null' => TRUE
),
'order_id' => array(
'description' => 'Order Id of pending order',
'type' => 'int',
'not null' => TRUE
),
'rfee_id' => array(
'description' => 'Recurring Fee Id of pending order',
'type' => 'int',
'not null' => TRUE
),
'completed' => array(
'description' => 'Competion status of this pending order',
'type' => 'int',
'not null' => TRUE
),
'hash' => array(
'description' => 'The unqiue has of order and payment id',
'type' => 'varchar',
'length' => '100',
'not null' => TRUE
),
),
'unique keys' => array(
'hash' => array(
'hash'
)
),
'primary key' => array('id'),
);
db_create_table('uc_stripe_pending_auth', $table);
}
/**
* Changes typo in variable uc_stripe_authenticaiton_required_email.
*/
function uc_stripe_update_7302() {
$typo_var_name = 'uc_stripe_authenticaiton_required_email';
$value = variable_get($typo_var_name, '');
if (!empty($value)) {
variable_set('uc_stripe_authentication_required_email', $value);
variable_del($typo_var_name);
}
}