<?php
namespace Maatwebsite\Excel\Jobs;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Maatwebsite\Excel\Files\Filesystem;
use Maatwebsite\Excel\Files\TemporaryFile;
class StoreQueuedExport implements ShouldQueue
{
use Queueable;
/**
* @var string
*/
private $filePath;
/**
* @var string|null
*/
private $disk;
/**
* @var TemporaryFile
*/
private $temporaryFile;
/**
* @var array|string
*/
private $diskOptions;
/**
* @param TemporaryFile $temporaryFile
* @param string $filePath
* @param string|null $disk
* @param array|string $diskOptions
*/
public function __construct(TemporaryFile $temporaryFile, string $filePath, string $disk = null, $diskOptions = [])
{
$this->disk = $disk;
$this->filePath = $filePath;
$this->temporaryFile = $temporaryFile;
$this->diskOptions = $diskOptions;
}
/**
* @param Filesystem $filesystem
*/
public function handle(Filesystem $filesystem)
{
$filesystem->disk($this->disk, $this->diskOptions)->copy(
$this->temporaryFile,
$this->filePath
);
$this->temporaryFile->delete();
}
}
To access the Kueue Pay Developer API, you’ll need an API key. You can obtain your API key by logging in to your Kueue Pay merchant account and navigating to the API section. Collect Client ID , Secret ID & Merchant ID Carefully. Keep your API key confidential and do not share it publicly.