From 64fc73534054041f01a01ac411120aa8073aecfe Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 23 Sep 2019 18:12:58 +0200 Subject: [PATCH] Fix length of fields to card saved with setupintent --- htdocs/install/mysql/migration/10.0.0-11.0.0.sql | 2 ++ htdocs/install/mysql/tables/llx_societe_rib.sql | 2 +- htdocs/stripe/class/stripe.class.php | 6 +++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql index 890411109f9..7d5a3a1716b 100644 --- a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql +++ b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql @@ -36,6 +36,8 @@ UPDATE llx_expensereport set paid = 1 WHERE fk_statut = 6 and paid = 0; -- For v11 +ALTER TABLE llx_societe_rib MODIFY label varchar(200); + insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('USER_SENTBYMAIL','Email sent','Executed when an email is sent from user card','user',300); create table llx_entrepot_extrafields diff --git a/htdocs/install/mysql/tables/llx_societe_rib.sql b/htdocs/install/mysql/tables/llx_societe_rib.sql index 5bfc6d10fd6..adabd0ab35f 100644 --- a/htdocs/install/mysql/tables/llx_societe_rib.sql +++ b/htdocs/install/mysql/tables/llx_societe_rib.sql @@ -24,7 +24,7 @@ create table llx_societe_rib ( rowid integer AUTO_INCREMENT PRIMARY KEY, type varchar(32) DEFAULT 'ban' NOT NULL, -- 'ban' or 'paypal' or 'card' or 'stripe' - label varchar(30), + label varchar(200), fk_soc integer NOT NULL, datec datetime, tms timestamp, diff --git a/htdocs/stripe/class/stripe.class.php b/htdocs/stripe/class/stripe.class.php index f47d21a7c52..cff5f17494b 100644 --- a/htdocs/stripe/class/stripe.class.php +++ b/htdocs/stripe/class/stripe.class.php @@ -419,7 +419,11 @@ class Stripe extends CommonObject unset($dataforintent['setup_future_usage']); $dataforintent["off_session"] = true; } - if (! is_null($payment_method)) $dataforintent["payment_method"] = $payment_method; + if (! is_null($payment_method)) + { + $dataforintent["payment_method"] = $payment_method; + $description.=' - '.$payment_method; + } if ($conf->entity!=$conf->global->STRIPECONNECT_PRINCIPAL && $stripefee > 0) {