¨4.0.1¨

This commit is contained in:
¨NW¨
2023-12-03 14:07:47 +00:00
parent c08b36d1b6
commit f35052522d
1112 changed files with 43019 additions and 24987 deletions

View File

@@ -2,20 +2,18 @@
namespace Modules\Payment\Gateways;
use stdClass;
use Exception;
use Illuminate\Http\Request;
use Modules\Order\Entities\Order;
use Modules\Payment\GatewayInterface;
use Modules\Payment\Responses\InstamojoResponse;
use Modules\Payment\Responses\PaystackResponse;
class Paystack implements GatewayInterface
{
const SUPPORTED_CURRENCIES = ['NGN', 'GHS', 'USD', 'ZAR'];
public $label;
public $description;
const SUPPORTED_CURRENCIES = ['NGN', 'GHS', 'USD', 'ZAR'];
public function __construct()
{
@@ -23,17 +21,22 @@ class Paystack implements GatewayInterface
$this->description = setting('paystack_description');
}
/**
* @throws Exception
*/
public function purchase(Order $order, Request $request)
{
if (!in_array(currency(), self::SUPPORTED_CURRENCIES)) {
throw new Exception(trans('payment::messages.currency_not_supported'));
}
return new PaystackResponse($order, $request);
return new PaystackResponse($order);
}
public function complete(Order $order)
{
return new PaystackResponse($order, request());
return new PaystackResponse($order);
}
}