1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-13 22:54:25 +01:00

minor fixes

This commit is contained in:
David Bomba 2023-10-23 22:10:41 +11:00
parent 255c58fd3b
commit d59b0b6ba1
3 changed files with 22 additions and 2 deletions

View File

@ -60,7 +60,10 @@ class ExportController extends BaseController
$url = \Illuminate\Support\Facades\URL::temporarySignedRoute('protected_download', now()->addHour(), ['hash' => $hash]);
Cache::put($hash, $url, now()->addHour());
CompanyExport::dispatch(auth()->user()->getCompany(), auth()->user(), $hash);
/**@var \App\Models\User $user */
$user = auth()->user();
CompanyExport::dispatch($user->getCompany(), $user, $hash);
return response()->json(['message' => 'Processing', 'url' => $url], 200);
}

View File

@ -282,6 +282,10 @@ class PayPalPPCPPaymentDriver extends BaseDriver
$invoice = Invoice::withTrashed()->find($this->decodePrimaryKey($_invoice->invoice_id));
$description = collect($invoice->line_items)->map(function ($item){
return $item->notes;
})->implode("\n");
$order = [
"intent" => "CAPTURE",
"payer" => [
@ -316,6 +320,7 @@ class PayPalPPCPPaymentDriver extends BaseDriver
"items"=> [
[
"name" => ctrans('texts.invoice_number').'# '.$invoice->number,
"description" => substr($description, 0, 127),
"quantity" => "1",
"unit_amount" => [
"currency_code" => $this->client->currency()->code,
@ -367,7 +372,7 @@ class PayPalPPCPPaymentDriver extends BaseDriver
'Content-type' => 'application/json',
'Accept-Language' => 'en_US',
'PayPal-Partner-Attribution-Id' => 'invoiceninja_SP_PPCP',
'PayPal-Request-Id' => Str::uuid(),
'PayPal-Request-Id' => (string) Str::uuid(),
], $headers);
}

View File

@ -276,7 +276,9 @@ use App\Listeners\RecurringExpense\RecurringExpenseArchivedActivity;
use App\Listeners\RecurringExpense\RecurringExpenseRestoredActivity;
use App\Listeners\RecurringInvoice\RecurringInvoiceArchivedActivity;
use App\Listeners\RecurringInvoice\RecurringInvoiceRestoredActivity;
use App\Listeners\Request\LogRequestSending;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
use Illuminate\Http\Client\Events\RequestSending;
class EventServiceProvider extends ServiceProvider
{
@ -285,6 +287,16 @@ class EventServiceProvider extends ServiceProvider
*
*/
protected $listen = [
RequestSending::class => [
LogRequestSending::class,
],
// 'Illuminate\Http\Client\Events\ResponseReceived' => [
// 'App\Listeners\LogResponseReceived',
// ],
// 'Illuminate\Http\Client\Events\ConnectionFailed' => [
// 'App\Listeners\LogConnectionFailed',
// ],
AccountCreated::class => [
],
MessageSending::class => [