2019-06-07 06:54:27 +00:00
|
|
|
<?php
|
|
|
|
|
2020-02-01 11:12:31 +00:00
|
|
|
namespace App\Classes\External;
|
2019-06-07 06:54:27 +00:00
|
|
|
|
|
|
|
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');
|
|
|
|
}
|
|
|
|
}
|