Add all files
This commit is contained in:
32
app/Console/Commands/Extension/stubs/gateway.stub
Normal file
32
app/Console/Commands/Extension/stubs/gateway.stub
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace {{ namespace }};
|
||||
|
||||
use App\Classes\Extension\Gateway;
|
||||
use App\Models\Invoice;
|
||||
|
||||
class {{ class }} extends Gateway
|
||||
{
|
||||
/**
|
||||
* Get all the configuration for the extension
|
||||
*
|
||||
* @param array $values
|
||||
* @return array
|
||||
*/
|
||||
public function getConfig($values = [])
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a view or a url to redirect to
|
||||
*
|
||||
* @param Invoice $invoice
|
||||
* @param float $total
|
||||
* @return string
|
||||
*/
|
||||
public function pay(Invoice $invoice, $total)
|
||||
{
|
||||
return '';
|
||||
}
|
||||
}
|
||||
19
app/Console/Commands/Extension/stubs/other.stub
Normal file
19
app/Console/Commands/Extension/stubs/other.stub
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace {{ namespace }};
|
||||
|
||||
use App\Classes\Extension\Extension;
|
||||
|
||||
class {{ class }} extends Extension
|
||||
{
|
||||
/**
|
||||
* Get all the configuration for the extension
|
||||
*
|
||||
* @param array $values
|
||||
* @return array
|
||||
*/
|
||||
public function getConfig($values = [])
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
92
app/Console/Commands/Extension/stubs/server.stub
Normal file
92
app/Console/Commands/Extension/stubs/server.stub
Normal file
@@ -0,0 +1,92 @@
|
||||
<?php
|
||||
|
||||
namespace {{ namespace }};
|
||||
|
||||
use App\Classes\Extension\Server;
|
||||
use App\Models\Service;
|
||||
|
||||
class {{ class }} extends Server
|
||||
{
|
||||
/**
|
||||
* Get all the configuration for the extension
|
||||
*
|
||||
* @param array $values
|
||||
* @return array
|
||||
*/
|
||||
public function getConfig($values = []): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get product config
|
||||
*
|
||||
* @param array $values
|
||||
* @return array
|
||||
*/
|
||||
public function getProductConfig($values = []): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if currenct configuration is valid
|
||||
*
|
||||
* @return bool|string
|
||||
*/
|
||||
public function testConfig(): bool|string
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a server for the service.
|
||||
*
|
||||
* @param Service $service The service that is being created.
|
||||
* @param array $settings The settings that are provided on the product from `getProductConfig`.
|
||||
* @param array $properties Custom properties created by the admin and values coming from `getCheckoutConfig`.
|
||||
*/
|
||||
public function createServer(Service $service, $settings, $properties)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Suspend a server
|
||||
*
|
||||
* @param Service $service
|
||||
* @param array $settings (product settings)
|
||||
* @param array $properties (checkout options)
|
||||
* @return bool
|
||||
*/
|
||||
public function suspendServer(Service $service, $settings, $properties)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsuspend a server
|
||||
*
|
||||
* @param Service $service
|
||||
* @param array $settings (product settings)
|
||||
* @param array $properties (checkout options)
|
||||
* @return bool
|
||||
*/
|
||||
public function unsuspendServer(Service $service, $settings, $properties)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Terminate a server
|
||||
*
|
||||
* @param Service $service
|
||||
* @param array $settings (product settings)
|
||||
* @param array $properties (checkout options)
|
||||
* @return bool
|
||||
*/
|
||||
public function terminateServer(Service $service, $settings, $properties)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user