diff --git a/VERSION.txt b/VERSION.txt index 425ff09f9bf7..159fc671224b 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -5.5.115 \ No newline at end of file +5.5.116 \ No newline at end of file diff --git a/app/PaymentDrivers/PayPalExpressPaymentDriver.php b/app/PaymentDrivers/PayPalExpressPaymentDriver.php index 779d77be0210..6a59968b77eb 100644 --- a/app/PaymentDrivers/PayPalExpressPaymentDriver.php +++ b/app/PaymentDrivers/PayPalExpressPaymentDriver.php @@ -123,8 +123,6 @@ class PayPalExpressPaymentDriver extends BaseDriver { $this->initializeOmnipayGateway(); - dd('here'); - $response = $this->omnipay_gateway ->completePurchase(['amount' => $this->payment_hash->data->amount, 'currency' => $this->client->getCurrencyCode()]) ->send(); diff --git a/app/Services/Invoice/EInvoice/FacturaEInvoice.php b/app/Services/Invoice/EInvoice/FacturaEInvoice.php index b2255bc9959d..2b28468ad9ed 100644 --- a/app/Services/Invoice/EInvoice/FacturaEInvoice.php +++ b/app/Services/Invoice/EInvoice/FacturaEInvoice.php @@ -17,6 +17,7 @@ use App\Services\AbstractService; use josemmo\Facturae\FacturaeItem; use josemmo\Facturae\FacturaeParty; use Illuminate\Support\Facades\Storage; +use josemmo\Facturae\Common\FacturaeSigner; class FacturaEInvoice extends AbstractService { @@ -129,7 +130,8 @@ class FacturaEInvoice extends AbstractService ->buildSeller() ->buildItems() ->setDiscount() - ->setPoNumber(); + ->setPoNumber() + ->signDocument(); $disk = config('filesystems.default'); @@ -180,7 +182,7 @@ class FacturaEInvoice extends AbstractService ])); } - + return $this; } @@ -191,22 +193,24 @@ class FacturaEInvoice extends AbstractService if (strlen($item->tax_name1) > 1) { - $data[] = [$this->resolveTaxCode($item->tax_name1) => $item->tax_rate1]; + $data[$this->resolveTaxCode($item->tax_name1)] = $item->tax_rate1; } if (strlen($item->tax_name2) > 1) { - $data[] = [$this->resolveTaxCode($item->tax_name2) => $item->tax_rate2]; + + $data[$this->resolveTaxCode($item->tax_name2)] = $item->tax_rate2; } if (strlen($item->tax_name3) > 1) { - $data[] = [$this->resolveTaxCode($item->tax_name3) => $item->tax_rate3]; + + $data[$this->resolveTaxCode($item->tax_name3)] = $item->tax_rate3; } - + return $data; } @@ -309,4 +313,14 @@ class FacturaEInvoice extends AbstractService return $this; } + private function signDocument(): self + { + // $ssl_cert = file_get_contents(base_path('e_invoice_cert.p12')); + + // $this->fac->sign($ssl_cert, null, "SuperSecrethere"); + + return $this; + } + + } diff --git a/config/ninja.php b/config/ninja.php index 833ee2a79fed..e341b5fb37e8 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' => '5.5.115', - 'app_tag' => '5.5.115', + 'app_version' => '5.5.116', + 'app_tag' => '5.5.116', 'minimum_client_version' => '5.0.16', 'terms_version' => '1.0.1', 'api_secret' => env('API_SECRET', ''),