42 lines
795 B
PHP
Executable File
42 lines
795 B
PHP
Executable File
<?php
|
|
|
|
|
|
namespace App\Services;
|
|
|
|
|
|
use App\Traits\ConsumesExternalService;
|
|
|
|
class WalletService
|
|
{
|
|
use ConsumesExternalService;
|
|
/**
|
|
* @var string
|
|
*/
|
|
public $baseUri ;
|
|
/**
|
|
* @var string
|
|
*/
|
|
public $key ;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->baseUri = config('services.wallet_service.base_uri');
|
|
$this->key = config('services.wallet_service.key');
|
|
}
|
|
|
|
public function post($uri , $data, $headers)
|
|
{
|
|
return $this->perfomRequest('POST',$uri,$data,$headers);
|
|
}
|
|
|
|
public function get($uri , $data, $headers)
|
|
{
|
|
return $this->perfomRequest('GET',$uri,$data,$headers);
|
|
}
|
|
|
|
public function put($uri , $data, $headers)
|
|
{
|
|
return $this->perfomRequest('PUT',$uri,$data,$headers);
|
|
}
|
|
}
|