mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 04:06:54 -04:00
minor fixes
This commit is contained in:
parent
255c58fd3b
commit
d59b0b6ba1
@ -60,7 +60,10 @@ class ExportController extends BaseController
|
|||||||
$url = \Illuminate\Support\Facades\URL::temporarySignedRoute('protected_download', now()->addHour(), ['hash' => $hash]);
|
$url = \Illuminate\Support\Facades\URL::temporarySignedRoute('protected_download', now()->addHour(), ['hash' => $hash]);
|
||||||
Cache::put($hash, $url, now()->addHour());
|
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);
|
return response()->json(['message' => 'Processing', 'url' => $url], 200);
|
||||||
}
|
}
|
||||||
|
@ -282,6 +282,10 @@ class PayPalPPCPPaymentDriver extends BaseDriver
|
|||||||
|
|
||||||
$invoice = Invoice::withTrashed()->find($this->decodePrimaryKey($_invoice->invoice_id));
|
$invoice = Invoice::withTrashed()->find($this->decodePrimaryKey($_invoice->invoice_id));
|
||||||
|
|
||||||
|
$description = collect($invoice->line_items)->map(function ($item){
|
||||||
|
return $item->notes;
|
||||||
|
})->implode("\n");
|
||||||
|
|
||||||
$order = [
|
$order = [
|
||||||
"intent" => "CAPTURE",
|
"intent" => "CAPTURE",
|
||||||
"payer" => [
|
"payer" => [
|
||||||
@ -316,6 +320,7 @@ class PayPalPPCPPaymentDriver extends BaseDriver
|
|||||||
"items"=> [
|
"items"=> [
|
||||||
[
|
[
|
||||||
"name" => ctrans('texts.invoice_number').'# '.$invoice->number,
|
"name" => ctrans('texts.invoice_number').'# '.$invoice->number,
|
||||||
|
"description" => substr($description, 0, 127),
|
||||||
"quantity" => "1",
|
"quantity" => "1",
|
||||||
"unit_amount" => [
|
"unit_amount" => [
|
||||||
"currency_code" => $this->client->currency()->code,
|
"currency_code" => $this->client->currency()->code,
|
||||||
@ -367,7 +372,7 @@ class PayPalPPCPPaymentDriver extends BaseDriver
|
|||||||
'Content-type' => 'application/json',
|
'Content-type' => 'application/json',
|
||||||
'Accept-Language' => 'en_US',
|
'Accept-Language' => 'en_US',
|
||||||
'PayPal-Partner-Attribution-Id' => 'invoiceninja_SP_PPCP',
|
'PayPal-Partner-Attribution-Id' => 'invoiceninja_SP_PPCP',
|
||||||
'PayPal-Request-Id' => Str::uuid(),
|
'PayPal-Request-Id' => (string) Str::uuid(),
|
||||||
], $headers);
|
], $headers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -276,7 +276,9 @@ use App\Listeners\RecurringExpense\RecurringExpenseArchivedActivity;
|
|||||||
use App\Listeners\RecurringExpense\RecurringExpenseRestoredActivity;
|
use App\Listeners\RecurringExpense\RecurringExpenseRestoredActivity;
|
||||||
use App\Listeners\RecurringInvoice\RecurringInvoiceArchivedActivity;
|
use App\Listeners\RecurringInvoice\RecurringInvoiceArchivedActivity;
|
||||||
use App\Listeners\RecurringInvoice\RecurringInvoiceRestoredActivity;
|
use App\Listeners\RecurringInvoice\RecurringInvoiceRestoredActivity;
|
||||||
|
use App\Listeners\Request\LogRequestSending;
|
||||||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||||
|
use Illuminate\Http\Client\Events\RequestSending;
|
||||||
|
|
||||||
class EventServiceProvider extends ServiceProvider
|
class EventServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
@ -285,6 +287,16 @@ class EventServiceProvider extends ServiceProvider
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
protected $listen = [
|
protected $listen = [
|
||||||
|
RequestSending::class => [
|
||||||
|
LogRequestSending::class,
|
||||||
|
],
|
||||||
|
// 'Illuminate\Http\Client\Events\ResponseReceived' => [
|
||||||
|
// 'App\Listeners\LogResponseReceived',
|
||||||
|
// ],
|
||||||
|
// 'Illuminate\Http\Client\Events\ConnectionFailed' => [
|
||||||
|
// 'App\Listeners\LogConnectionFailed',
|
||||||
|
// ],
|
||||||
|
|
||||||
AccountCreated::class => [
|
AccountCreated::class => [
|
||||||
],
|
],
|
||||||
MessageSending::class => [
|
MessageSending::class => [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user