mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-11 05:32:39 +01:00
commit
75f7455192
@ -1 +1 @@
|
||||
5.3.8
|
||||
5.3.9
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Requests\Gateways\Checkout3ds;
|
||||
|
||||
use App\Libraries\MultiDB;
|
||||
use App\Models\Client;
|
||||
use App\Models\Company;
|
||||
use App\Models\CompanyGateway;
|
||||
@ -37,6 +38,7 @@ class Checkout3dsRequest extends FormRequest
|
||||
|
||||
public function getCompany()
|
||||
{
|
||||
MultiDB::findAndSetDbByCompanyKey($this->company_key);
|
||||
return Company::where('company_key', $this->company_key)->first();
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ class InvoiceTransformer extends BaseTransformer {
|
||||
|
||||
if ( $transformed['balance'] < $transformed['amount'] ) {
|
||||
$transformed['payments'] = [[
|
||||
'date' => date( 'Y-m-d' ),
|
||||
'date' => isset( $invoice_data['Last Payment Date'] ) ? date( 'Y-m-d', strtotime( $invoice_data['Invoice Date'] ) ) : date( 'Y-m-d' ),
|
||||
'amount' => $transformed['amount'] - $transformed['balance'],
|
||||
]];
|
||||
}
|
||||
@ -75,3 +75,4 @@ class InvoiceTransformer extends BaseTransformer {
|
||||
return $transformed;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -640,6 +640,7 @@ class Import implements ShouldQueue
|
||||
$client->updated_at = Carbon::parse($modified['updated_at']);
|
||||
|
||||
$client->save(['timestamps' => false]);
|
||||
$client->fresh();
|
||||
|
||||
$client->contacts()->forceDelete();
|
||||
|
||||
@ -650,7 +651,7 @@ class Import implements ShouldQueue
|
||||
$modified_contacts[$key]['company_id'] = $this->company->id;
|
||||
$modified_contacts[$key]['user_id'] = $this->processUserId($resource);
|
||||
$modified_contacts[$key]['client_id'] = $client->id;
|
||||
$modified_contacts[$key]['password'] = 'mysuperpassword'; // @todo, and clean up the code..
|
||||
$modified_contacts[$key]['password'] = Str::random(8);
|
||||
unset($modified_contacts[$key]['id']);
|
||||
}
|
||||
|
||||
@ -685,6 +686,8 @@ class Import implements ShouldQueue
|
||||
'old' => $resource['id'],
|
||||
'new' => $client->id,
|
||||
];
|
||||
|
||||
$client = null;
|
||||
}
|
||||
|
||||
Client::reguard();
|
||||
|
@ -62,9 +62,10 @@ class SupportMessageSent extends Mailable
|
||||
$company = auth()->user()->company();
|
||||
$user = auth()->user();
|
||||
$db = str_replace("db-ninja-", "", $company->db);
|
||||
$is_large = $company->is_large ? "L" : "";
|
||||
|
||||
if(Ninja::isHosted())
|
||||
$subject = "{$priority}Hosted-{$db}-[{$company->is_large}] :: {$plan} :: ".date('M jS, g:ia');
|
||||
$subject = "{$priority}Hosted-{$db}{$is_large} :: {$plan} :: ".date('M jS, g:ia');
|
||||
else
|
||||
$subject = "{$priority}Self Hosted :: {$plan} :: ".date('M jS, g:ia');
|
||||
|
||||
|
@ -92,7 +92,7 @@ class ClientContact extends Authenticatable implements HasLocalePreference
|
||||
'custom_value4',
|
||||
'email',
|
||||
'is_primary',
|
||||
'client_id',
|
||||
// 'client_id',
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -362,9 +362,14 @@ class StripePaymentDriver extends BaseDriver
|
||||
$response = null;
|
||||
|
||||
try {
|
||||
$response = $this->stripe
|
||||
->refunds
|
||||
->create(['charge' => $payment->transaction_reference, 'amount' => $this->convertToStripeAmount($amount, $this->client->currency()->precision, $this->client->currency())], $meta);
|
||||
// $response = $this->stripe
|
||||
// ->refunds
|
||||
// ->create(['charge' => $payment->transaction_reference, 'amount' => $this->convertToStripeAmount($amount, $this->client->currency()->precision, $this->client->currency())], $meta);
|
||||
|
||||
$response = \Stripe\Refund::create([
|
||||
'charge' => $payment->transaction_reference,
|
||||
'amount' => $this->convertToStripeAmount($amount, $this->client->currency()->precision, $this->client->currency())
|
||||
], $meta);
|
||||
|
||||
if ($response->status == $response::STATUS_SUCCEEDED) {
|
||||
SystemLogger::dispatch(['server_response' => $response, 'data' => request()->all(),], SystemLog::CATEGORY_GATEWAY_RESPONSE, SystemLog::EVENT_GATEWAY_SUCCESS, SystemLog::TYPE_STRIPE, $this->client, $this->client->company);
|
||||
|
@ -56,9 +56,11 @@ class ClientContactRepository extends BaseRepository
|
||||
|
||||
if (! $update_contact) {
|
||||
$update_contact = ClientContactFactory::create($client->company_id, $client->user_id);
|
||||
$update_contact->client_id = $client->id;
|
||||
}
|
||||
|
||||
//10-09-2021 - enforce the client->id and remove client_id from fillables
|
||||
$update_contact->client_id = $client->id;
|
||||
|
||||
/* We need to set NULL email addresses to blank strings to pass authentication*/
|
||||
if(array_key_exists('email', $contact) && is_null($contact['email']))
|
||||
$contact['email'] = '';
|
||||
@ -88,5 +90,7 @@ class ClientContactRepository extends BaseRepository
|
||||
$new_contact->email = ' ';
|
||||
$new_contact->save();
|
||||
}
|
||||
|
||||
$client = null;
|
||||
}
|
||||
}
|
||||
|
@ -14,8 +14,8 @@ return [
|
||||
'require_https' => env('REQUIRE_HTTPS', true),
|
||||
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
||||
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
|
||||
'app_version' => '5.3.8',
|
||||
'app_tag' => '5.3.8',
|
||||
'app_version' => '5.3.9',
|
||||
'app_tag' => '5.3.9',
|
||||
'minimum_client_version' => '5.0.16',
|
||||
'terms_version' => '1.0.1',
|
||||
'api_secret' => env('API_SECRET', ''),
|
||||
|
Loading…
Reference in New Issue
Block a user