| 1 |
<?php |
| 2 |
|
| 3 |
namespace Hyperpay\Gateways\Brands; |
| 4 |
|
| 5 |
use Hyperpay\Gateways\App\DefaultGateway; |
| 6 |
use Hyperpay\Gateways\Traits\HasSubscription; |
| 7 |
use Hyperpay\Gateways\Traits\HasTokenization; |
| 8 |
use Hyperpay\Gateways\Main; |
| 9 |
use WC_Order; |
| 10 |
|
| 11 |
|
| 12 |
class CreditCard extends DefaultGateway |
| 13 |
{ |
| 14 |
use HasSubscription, HasTokenization; |
| 15 |
|
| 16 |
/** |
| 17 |
* should be lower case and unique |
| 18 |
* @var string $id |
| 19 |
*/ |
| 20 |
public $id = 'hyperpay'; |
| 21 |
|
| 22 |
/** |
| 23 |
* The title which appear next to gateway on setting page |
| 24 |
* @var string $method_title |
| 25 |
*/ |
| 26 |
public $method_title = 'Hyperpay Gateway'; |
| 27 |
|
| 28 |
/** |
| 29 |
* Description of gateways which will appear next to title |
| 30 |
* @var string $method_description |
| 31 |
*/ |
| 32 |
public $method_description = 'Hyperpay Plugin for Woocommerce'; |
| 33 |
|
| 34 |
/** |
| 35 |
* |
| 36 |
* the Brands supported by the gateway |
| 37 |
* @var array $supported_brands |
| 38 |
*/ |
| 39 |
protected $supported_brands = [ |
| 40 |
'VISA' => 'Visa', |
| 41 |
'MASTER' => 'Master Card', |
| 42 |
'AMEX' => 'American Express', |
| 43 |
'JCB' => 'Japan Credit Bureau' |
| 44 |
]; |
| 45 |
|
| 46 |
|
| 47 |
public function renderPaymentForm(WC_Order $order, $result) |
| 48 |
{ |
| 49 |
array_push($this->brands, 'MADA'); |
| 50 |
return parent::renderPaymentForm($order, $result); |
| 51 |
} |
| 52 |
} |
| 53 |
|