Using morphTo() on services, added Ezypay payment Import

This commit is contained in:
Deon George
2019-06-07 16:54:27 +10:00
parent 41d6a07196
commit 253eb55c19
33 changed files with 11398 additions and 183 deletions

25
app/Classes/Payments.php Normal file
View File

@@ -0,0 +1,25 @@
<?php
namespace App\Classes;
use GuzzleHttp\Client;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Cache;
abstract class Payments
{
abstract protected function connect(string $url,array $args=[]);
abstract public function getCustomers(): Collection;
abstract public function getDebits($opt=[]): Collection;
abstract public function getSettlements($opt=[]): Collection;
protected function getClient(string $base_uri): Client
{
return new Client(['base_uri'=>$base_uri]);
}
protected function mustPause()
{
return Cache::get('api_throttle');
}
}