Merge pull request #5558 from turbo124/master

Fixes for migration
This commit is contained in:
David Bomba 2021-04-29 17:31:15 +10:00 committed by GitHub
commit b65c501f02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 2 deletions

View File

@ -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' => '',

View File

@ -4175,7 +4175,7 @@ $LANG = array(
'zoho' => 'Zoho',
'accounting' => 'Accounting',
'required_files_missing' => 'Please provide all CSVs.',
'migration_auth_label' => 'Let\'s continue by authenticating.',
'migration_auth_label' => 'Let\'s continue by authenticating. (These credentials should be identical across systems)',
'api_secret' => 'API secret',
'migration_api_secret_notice' => 'You can find API_SECRET in the .env file or Invoice Ninja v5. If property is missing, leave field blank.',
'billing_coupon_notice' => 'Your discount will be applied on the checkout.',

View File

@ -11,7 +11,11 @@
<h3 class="panel-title">{!! trans('texts.welcome_to_the_new_version') !!}</h3>
</div>
<div class="panel-body">
@if(Utils::isNinjaProd())
<h4>{!! trans('texts.migration_create_account_notice') !!}</h4><br/>
@else
<h4>{!! trans('texts.migration_auth_label')!!}</h4>
@endif
<form action="{{ url('/migration/auth') }}" method="post" id="auth-form">
{{ csrf_field() }}