PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.6.5
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.6.5
1.6.6 1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 1.3.19 All 49 releases
← All changes | database/Migrations/OrderTransactionsMigrator.php +6 -1 1.6.2 → 1.6.5 View file →
@@ -17,9 +17,9 @@
17 17 `order_id` BIGINT UNSIGNED NOT NULL DEFAULT '0',
18 18 `order_type` VARCHAR(100) NOT NULL DEFAULT '',
19 19 `transaction_type` varchar(192) DEFAULT 'charge',
20 20 `subscription_id` int(11) NULL,
21 - `card_last_4` int(4),
21 + `card_last_4` VARCHAR(4) NULL,
22 22 `card_brand` varchar(100),
23 23 `vendor_charge_id` VARCHAR(192) NOT NULL DEFAULT '',
24 24 `payment_method` VARCHAR(100) NOT NULL DEFAULT '',
25 25 `payment_mode` VARCHAR(100) NOT NULL DEFAULT '',
@@ -51,6 +51,11 @@
51 51 // Subscription views eager-load transactions filtered by
52 52 // subscription_id (SubscriptionController, customer portal) — without
53 53 // this, every detail view scans the transactions table.
54 54 static::addIndexIfNotExists(static::getDbPrefix() . 'fct_ot__subscription_id_idx', 'subscription_id');
55 +
56 + // card_last_4 was int(4), which silently strips a leading zero
57 + // (e.g. "0042" -> 42) on write. Widen to VARCHAR so gateway-provided
58 + // last-4 strings survive intact. modifyColumnIfExists is idempotent.
59 + static::modifyColumnIfExists('card_last_4', 'VARCHAR(4) NULL');
55 60 }
56 61 }