diff --git a/VERSION.txt b/VERSION.txt index 335b4cb15057..38a4061a893a 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -5.7.44 \ No newline at end of file +5.7.45 \ No newline at end of file diff --git a/app/PaymentDrivers/PayFast/CreditCard.php b/app/PaymentDrivers/PayFast/CreditCard.php index 393de3b9c697..f159e3b00a65 100644 --- a/app/PaymentDrivers/PayFast/CreditCard.php +++ b/app/PaymentDrivers/PayFast/CreditCard.php @@ -211,6 +211,8 @@ class CreditCard { $response_array = $request->all(); + nlog($request->all()); + $state = [ 'server_response' => $request->all(), 'payment_hash' => $request->input('m_payment_id'), diff --git a/app/Services/Invoice/EInvoice/FacturaEInvoice.php b/app/Services/Invoice/EInvoice/FacturaEInvoice.php index 36e76b0311ac..0f7907cde741 100644 --- a/app/Services/Invoice/EInvoice/FacturaEInvoice.php +++ b/app/Services/Invoice/EInvoice/FacturaEInvoice.php @@ -539,33 +539,35 @@ class FacturaEInvoice extends AbstractService private function buildBuyer(): self { - - $buyer = new FacturaeParty([ - "isLegalEntity" => $this->invoice->client->classification === 'individual' ? false : true, - "taxNumber" => $this->invoice->client->vat_number, - "name" => substr($this->invoice->client->present()->name(), 0, 40), - // "firstSurname" => substr($this->invoice->client->present()->last_name(), 0, 40), - // "lastSurname" => substr($this->invoice->client->present()->last_name(), 0, 40), - "address" => substr($this->invoice->client->address1, 0, 80), - "postCode" => substr($this->invoice->client->postal_code, 0, 5), - "town" => substr($this->invoice->client->city, 0, 50), - "province" => substr($this->invoice->client->state, 0, 20), - "countryCode" => $this->invoice->client->country->iso_3166_3, // Se asume España si se omite - "email" => substr($this->invoice->client->present()->email(), 0, 60), - "phone" => substr($this->invoice->client->present()->phone(), 0, 15), - "fax" => "", - "website" => substr($this->invoice->client->present()->website(), 0, 60), - "contactPeople" => substr($this->invoice->client->present()->first_name()." ".$this->invoice->client->present()->last_name(), 0, 40), - 'centres' => $this->setFace(), - // "cnoCnae" => "04791", // Clasif. Nacional de Act. Económicas - // "ineTownCode" => "280796" // Cód. de municipio del INE - ]); + $buyer_array = [ + "isLegalEntity" => $this->invoice->client->classification === 'individual' ? false : true, + "taxNumber" => $this->invoice->client->vat_number, + "name" => substr($this->invoice->client->present()->name(), 0, 40), + // "firstSurname" => substr($this->invoice->client->present()->last_name(), 0, 40), + // "lastSurname" => substr($this->invoice->client->present()->last_name(), 0, 40), + "address" => substr($this->invoice->client->address1, 0, 80), + "postCode" => substr($this->invoice->client->postal_code, 0, 5), + "town" => substr($this->invoice->client->city, 0, 50), + "province" => substr($this->invoice->client->state, 0, 20), + "countryCode" => $this->invoice->client->country->iso_3166_3, // Se asume España si se omite + "email" => substr($this->invoice->client->present()->email(), 0, 60), + "phone" => substr($this->invoice->client->present()->phone(), 0, 15), + "fax" => "", + "website" => substr($this->invoice->client->present()->website(), 0, 60), + "contactPeople" => substr($this->invoice->client->present()->first_name()." ".$this->invoice->client->present()->last_name(), 0, 40), + 'centres' => $this->setFace(), + // "cnoCnae" => "04791", // Clasif. Nacional de Act. Económicas + // "ineTownCode" => "280796" // Cód. de municipio del INE + ]; if($this->invoice->client->classification === 'individual') { - $buyer['name'] = $this->invoice->client->present()->first_name(); - $buyer['firstSurname'] = $this->invoice->client->present()->last_name(); + $buyer_array['name'] = $this->invoice->client->present()->first_name(); + $buyer_array['firstSurname'] = $this->invoice->client->present()->last_name(); } + $buyer = new FacturaeParty($buyer_array); + + $this->fac->setBuyer($buyer); return $this; diff --git a/config/ninja.php b/config/ninja.php index 0bac154778ea..3018a7dc7fea 100644 --- a/config/ninja.php +++ b/config/ninja.php @@ -15,8 +15,8 @@ return [ 'require_https' => env('REQUIRE_HTTPS', true), 'app_url' => rtrim(env('APP_URL', ''), '/'), 'app_domain' => env('APP_DOMAIN', 'invoicing.co'), - 'app_version' => env('APP_VERSION','5.7.44'), - 'app_tag' => env('APP_TAG','5.7.44'), + 'app_version' => env('APP_VERSION','5.7.45'), + 'app_tag' => env('APP_TAG','5.7.45'), 'minimum_client_version' => '5.0.16', 'terms_version' => '1.0.1', 'api_secret' => env('API_SECRET', false),