mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-04 02:54:35 -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->checkDuplicateRecurringInvoices();
|
||||||
$this->checkOauthSanity();
|
$this->checkOauthSanity();
|
||||||
$this->checkVendorSettings();
|
$this->checkVendorSettings();
|
||||||
|
$this->checkClientSettings();
|
||||||
|
|
||||||
if(Ninja::isHosted()){
|
if(Ninja::isHosted()){
|
||||||
$this->checkAccountStatuses();
|
$this->checkAccountStatuses();
|
||||||
$this->checkNinjaPortalUrls();
|
$this->checkNinjaPortalUrls();
|
||||||
@ -952,24 +953,24 @@ class CheckData extends Command
|
|||||||
|
|
||||||
if ($this->option('fix') == 'true') {
|
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)
|
// if(is_array($client->settings) && count($client->settings) == 0)
|
||||||
{
|
// {
|
||||||
$settings = ClientSettings::defaults();
|
// $settings = ClientSettings::defaults();
|
||||||
$settings->currency_id = $client->company->settings->currency_id;
|
// $settings->currency_id = $client->company->settings->currency_id;
|
||||||
}
|
// }
|
||||||
else {
|
// else {
|
||||||
$settings = $client->settings;
|
// $settings = $client->settings;
|
||||||
$settings->currency_id = $client->company->settings->currency_id;
|
// $settings->currency_id = $client->company->settings->currency_id;
|
||||||
}
|
// }
|
||||||
|
|
||||||
$client->settings = $settings;
|
// $client->settings = $settings;
|
||||||
$client->save();
|
// $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){
|
Client::query()->whereNull('country_id')->cursor()->each(function ($client){
|
||||||
|
@ -230,7 +230,7 @@ class CreditCard implements MethodInterface
|
|||||||
private function completePayment($paymentRequest, PaymentResponseRequest $request)
|
private function completePayment($paymentRequest, PaymentResponseRequest $request)
|
||||||
{
|
{
|
||||||
$paymentRequest->amount = $this->checkout->payment_hash->data->value;
|
$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->customer = $this->checkout->getCustomer();
|
||||||
$paymentRequest->metadata = ['udf1' => 'Invoice Ninja'];
|
$paymentRequest->metadata = ['udf1' => 'Invoice Ninja'];
|
||||||
$paymentRequest->currency = $this->checkout->client->getCurrencyCode();
|
$paymentRequest->currency = $this->checkout->client->getCurrencyCode();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user