mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Fixes for checkout reference lengths
This commit is contained in:
parent
6400ece913
commit
22b2a50526
@ -119,7 +119,8 @@ class CheckData extends Command
|
||||
$this->checkDuplicateRecurringInvoices();
|
||||
$this->checkOauthSanity();
|
||||
$this->checkVendorSettings();
|
||||
|
||||
$this->checkClientSettings();
|
||||
|
||||
if(Ninja::isHosted()){
|
||||
$this->checkAccountStatuses();
|
||||
$this->checkNinjaPortalUrls();
|
||||
@ -952,24 +953,24 @@ class CheckData extends Command
|
||||
|
||||
if ($this->option('fix') == 'true') {
|
||||
|
||||
Client::query()->whereNull('settings->currency_id')->cursor()->each(function ($client){
|
||||
// Client::query()->whereNull('settings->currency_id')->cursor()->each(function ($client){
|
||||
|
||||
if(is_array($client->settings) && count($client->settings) == 0)
|
||||
{
|
||||
$settings = ClientSettings::defaults();
|
||||
$settings->currency_id = $client->company->settings->currency_id;
|
||||
}
|
||||
else {
|
||||
$settings = $client->settings;
|
||||
$settings->currency_id = $client->company->settings->currency_id;
|
||||
}
|
||||
// if(is_array($client->settings) && count($client->settings) == 0)
|
||||
// {
|
||||
// $settings = ClientSettings::defaults();
|
||||
// $settings->currency_id = $client->company->settings->currency_id;
|
||||
// }
|
||||
// else {
|
||||
// $settings = $client->settings;
|
||||
// $settings->currency_id = $client->company->settings->currency_id;
|
||||
// }
|
||||
|
||||
$client->settings = $settings;
|
||||
$client->save();
|
||||
// $client->settings = $settings;
|
||||
// $client->save();
|
||||
|
||||
$this->logMessage("Fixing currency for # {$client->id}");
|
||||
// $this->logMessage("Fixing currency for # {$client->id}");
|
||||
|
||||
});
|
||||
// });
|
||||
|
||||
|
||||
Client::query()->whereNull('country_id')->cursor()->each(function ($client){
|
||||
|
@ -230,7 +230,7 @@ class CreditCard implements MethodInterface
|
||||
private function completePayment($paymentRequest, PaymentResponseRequest $request)
|
||||
{
|
||||
$paymentRequest->amount = $this->checkout->payment_hash->data->value;
|
||||
$paymentRequest->reference = $this->checkout->getDescription();
|
||||
$paymentRequest->reference = substr($this->checkout->getDescription(),0 , 49);
|
||||
$paymentRequest->customer = $this->checkout->getCustomer();
|
||||
$paymentRequest->metadata = ['udf1' => 'Invoice Ninja'];
|
||||
$paymentRequest->currency = $this->checkout->client->getCurrencyCode();
|
||||
|
Loading…
x
Reference in New Issue
Block a user