Working on Payment Drivers

This commit is contained in:
David Bomba 2019-09-05 17:00:12 +10:00
parent f5e19ece06
commit 03c3cc8702
2 changed files with 57 additions and 0 deletions

View File

@ -0,0 +1,40 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com)
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2019. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://opensource.org/licenses/AAL
*/
namespace App\PaymentDrivers;
/**
* Class BasePaymentDriver
* @package App\PaymentDrivers
*/
abstract class BasePaymentDriver
{
/**
* Returns whether refunds are possible with the gateway
* @return boolean TRUE|FALSE
*/
public function isRefundable() :bool {}
/**
* Returns whether token billing is possible with the gateway
* @return boolean TRUE|FALSE
*/
public function hasTokenBilling() :bool {}
/**
* Returns the Omnipay driver
* @return object Omnipay initialized object
*/
public function gateway() {}
}

View File

@ -0,0 +1,17 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com)
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2019. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://opensource.org/licenses/AAL
*/
namespace App\PaymentDrivers;
class StripePaymentDriver extends BasePaymentDriver
{
}