mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-12 22:22:32 +01: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]);
|
||||
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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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 => [
|
||||
|
Loading…
Reference in New Issue
Block a user