mobilebackendgateway/app/Services/PaymentService.php

47 lines
929 B
PHP
Executable File

<?php
namespace App\Services;
use App\Traits\ConsumesExternalService;
class PaymentService
{
use ConsumesExternalService;
/**
* @var string
*/
public $baseUri ;
/**
* @var string
*/
public $key ;
public function __construct()
{
$this->baseUri = config('services.payment_service.base_uri');
$this->key = config('services.payment_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);
}
public function delete($uri , $data, $headers)
{
return $this->perfomRequest('DELETE',$uri,$data,$headers);
}
}