Commit 7aa7d4e8 authored by mattwire's avatar mattwire
Browse files

Add upgrader for 6.2 to add civicrm_stripe_paymentintent table

parent 155328f1
......@@ -3,6 +3,8 @@
* https://civicrm.org/licensing
*/
use CRM_Stripe_ExtensionUtil as E;
/**
* Collection of upgrade steps.
* DO NOT USE a naming scheme other than upgrade_N, where N is an integer.
......@@ -424,4 +426,11 @@ class CRM_Stripe_Upgrader extends CRM_Stripe_Upgrader_Base {
return TRUE;
}
public function upgrade_5024() {
$this->ctx->log->info('Applying Stripe update 5024. Add the civicrm_stripe_paymentintent database table');
CRM_Utils_File::sourceSQLFile(CIVICRM_DSN, E::path('/sql/paymentintent_install.sql'));
CRM_Utils_System::flushCache();
return TRUE;
}
}
......@@ -41,12 +41,16 @@ ONLINE contribution, event registration tests
### Manual Tests
1. Test webform submission with payment and user-select, single processor.
1. Test webform submission with payment and user-select , single processor.
1. TODO: Are we testing offline contribution with single/multi-processor properly when stripe is/is not default with katalon tests?
1. Test online contribution page on Wordpress.
1. Test online contribution page on Joomla.
1. Test online event registration.
1. Test online event registration (single processor).
1. Test online event registration (no confirmation page).
1. Test online event registration (multiple participants).
1. Test online event registration (multiple processors, Stripe default).
1. Test online event registration (multiple processors, Stripe not default).
1. Test online event registration (cart checkout).
#### Drupal Webform Tests
......
......@@ -13,9 +13,9 @@
<author>Matthew Wire (MJW Consulting)</author>
<email>mjw@mjwconsult.co.uk</email>
</maintainer>
<releaseDate>2019-10-06</releaseDate>
<version>6.1.6</version>
<develStage>stable</develStage>
<releaseDate>2019-10-15</releaseDate>
<version>6.2beta1</version>
<develStage>beta</develStage>
<compatibility>
<ver>5.13</ver>
</compatibility>
......
-- +--------------------------------------------------------------------+
-- | CiviCRM version 5 |
-- +--------------------------------------------------------------------+
-- | Copyright CiviCRM LLC (c) 2004-2019 |
-- +--------------------------------------------------------------------+
-- | This file is a part of CiviCRM. |
-- | |
-- | CiviCRM is free software; you can copy, modify, and distribute it |
-- | under the terms of the GNU Affero General Public License |
-- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
-- | |
-- | CiviCRM is distributed in the hope that it will be useful, but |
-- | WITHOUT ANY WARRANTY; without even the implied warranty of |
-- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
-- | See the GNU Affero General Public License for more details. |
-- | |
-- | You should have received a copy of the GNU Affero General Public |
-- | License and the CiviCRM Licensing Exception along |
-- | with this program; if not, contact CiviCRM LLC |
-- | at info[AT]civicrm[DOT]org. If you have questions about the |
-- | GNU Affero General Public License or the licensing of CiviCRM, |
-- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
-- +--------------------------------------------------------------------+
--
-- Generated from schema.tpl
-- DO NOT EDIT. Generated by CRM_Core_CodeGen
--
-- +--------------------------------------------------------------------+
-- | CiviCRM version 5 |
-- +--------------------------------------------------------------------+
-- | Copyright CiviCRM LLC (c) 2004-2019 |
-- +--------------------------------------------------------------------+
-- | This file is a part of CiviCRM. |
-- | |
-- | CiviCRM is free software; you can copy, modify, and distribute it |
-- | under the terms of the GNU Affero General Public License |
-- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
-- | |
-- | CiviCRM is distributed in the hope that it will be useful, but |
-- | WITHOUT ANY WARRANTY; without even the implied warranty of |
-- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
-- | See the GNU Affero General Public License for more details. |
-- | |
-- | You should have received a copy of the GNU Affero General Public |
-- | License and the CiviCRM Licensing Exception along |
-- | with this program; if not, contact CiviCRM LLC |
-- | at info[AT]civicrm[DOT]org. If you have questions about the |
-- | GNU Affero General Public License or the licensing of CiviCRM, |
-- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
-- +--------------------------------------------------------------------+
--
-- Generated from drop.tpl
-- DO NOT EDIT. Generated by CRM_Core_CodeGen
--
-- /*******************************************************
-- *
-- * Clean up the exisiting tables
-- *
-- *******************************************************/
SET FOREIGN_KEY_CHECKS=0;
DROP TABLE IF EXISTS `civicrm_stripe_paymentintent`;
SET FOREIGN_KEY_CHECKS=1;
-- /*******************************************************
-- *
-- * Create new tables
-- *
-- *******************************************************/
-- /*******************************************************
-- *
-- * civicrm_stripe_paymentintent
-- *
-- * Stripe PaymentIntents
-- *
-- *******************************************************/
CREATE TABLE `civicrm_stripe_paymentintent` (
`id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID',
`paymentintent_id` varchar(255) COMMENT 'The PaymentIntent ID',
`contribution_id` int unsigned COMMENT 'FK ID from civicrm_contribution',
`payment_processor_id` int unsigned COMMENT 'Foreign key to civicrm_payment_processor.id',
`description` varchar(255) NULL COMMENT 'Description of this paymentIntent',
`status` varchar(25) NULL COMMENT 'The status of the paymentIntent',
`identifier` varchar(255) NULL COMMENT 'An identifier that we can use in CiviCRM to find the paymentIntent if we do not have the ID (eg. session key)',
`contact_id` int unsigned COMMENT 'FK to Contact',
`created_date` timestamp DEFAULT CURRENT_TIMESTAMP COMMENT 'When was paymentIntent created',
`flags` varchar(100) NULL COMMENT 'Flags associated with this PaymentIntent (NC=no contributionID when doPayment called)'
,
PRIMARY KEY (`id`)
, UNIQUE INDEX `UI_paymentintent_id`(
paymentintent_id
)
, CONSTRAINT FK_civicrm_stripe_paymentintent_payment_processor_id FOREIGN KEY (`payment_processor_id`) REFERENCES `civicrm_payment_processor`(`id`) ON DELETE SET NULL, CONSTRAINT FK_civicrm_stripe_paymentintent_contact_id FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact`(`id`) ON DELETE CASCADE
) ;
CREATE TABLE IF NOT EXISTS `civicrm_stripe_customers` (
`id` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`contact_id` int(10) UNSIGNED DEFAULT NULL COMMENT 'FK ID from civicrm_contact',
`processor_id` int(10) DEFAULT NULL COMMENT 'ID from civicrm_payment_processor',
UNIQUE KEY `id` (`id`),
CONSTRAINT `FK_civicrm_stripe_customers_contact_id` FOREIGN KEY (`contact_id`)
REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE IF NOT EXISTS `civicrm_stripe_paymentintent` (
`id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID',
`paymentintent_id` varchar(255) COMMENT 'The PaymentIntent ID',
`contribution_id` int unsigned COMMENT 'FK ID from civicrm_contribution',
`payment_processor_id` int unsigned COMMENT 'Foreign key to civicrm_payment_processor.id',
`description` varchar(255) NULL COMMENT 'Description of this paymentIntent',
`status` varchar(25) NULL COMMENT 'The status of the paymentIntent',
`identifier` varchar(255) NULL COMMENT 'An identifier that we can use in CiviCRM to find the paymentIntent if we do not have the ID (eg. session key)',
`contact_id` int unsigned COMMENT 'FK to Contact',
`created_date` timestamp DEFAULT CURRENT_TIMESTAMP COMMENT 'When was paymentIntent created',
`flags` varchar(100) NULL COMMENT 'Flags associated with this PaymentIntent (NC=no contributionID when doPayment called)'
,
PRIMARY KEY (`id`)
, UNIQUE INDEX `UI_paymentintent_id`(
paymentintent_id
)
, CONSTRAINT FK_civicrm_stripe_paymentintent_payment_processor_id FOREIGN KEY (`payment_processor_id`) REFERENCES `civicrm_payment_processor`(`id`) ON DELETE SET NULL, CONSTRAINT FK_civicrm_stripe_paymentintent_contact_id FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact`(`id`) ON DELETE CASCADE
) ;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment