From f78443e6d9e433678e93ce6ac2ad3b71acd1ec80 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 29 Apr 2021 14:44:44 +1000 Subject: [PATCH] check decryption --- app/Traits/GenerateMigrationResources.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/Traits/GenerateMigrationResources.php b/app/Traits/GenerateMigrationResources.php index 975c0ea349cf..21ff2e0e5391 100644 --- a/app/Traits/GenerateMigrationResources.php +++ b/app/Traits/GenerateMigrationResources.php @@ -1286,6 +1286,15 @@ info("translated gateway_type = {$translated_gateway_type}"); $gateway_types = $account_gateway->paymentDriver()->gatewayTypes(); + $config = 'If you see this message - we were not able to decrypt your config'; + + try{ + $config = Crypt::decrypt($account_gateway->config); + } + catch(\Exception $e){ + + } + // foreach ($gateway_types as $gateway_type_id) { $transformed[] = [ 'id' => $account_gateway->id, @@ -1297,7 +1306,7 @@ info("translated gateway_type = {$translated_gateway_type}"); 'require_billing_address' => $account_gateway->show_billing_address, 'require_shipping_address' => $account_gateway->show_shipping_address, 'update_details' => $account_gateway->update_details, - 'config' => Crypt::decrypt($account_gateway->config), + 'config' => $config, 'fees_and_limits' => $this->buildFeesAndLimits($gateway_types), 'custom_value1' => '', 'custom_value2' => '',