| 1 |
<?php |
| 2 |
namespace Hyperpay\Gateways\Brands; |
| 3 |
|
| 4 |
use Hyperpay\Gateways\App\DefaultGateway; |
| 5 |
use WC_Order; |
| 6 |
|
| 7 |
|
| 8 |
class Mada extends DefaultGateway |
| 9 |
{ |
| 10 |
/** |
| 11 |
* should be lower case and unique |
| 12 |
* @var string $id |
| 13 |
*/ |
| 14 |
public $id = 'hyperpay_mada'; |
| 15 |
|
| 16 |
/** |
| 17 |
* The title which appear next to gateway on setting page |
| 18 |
* @var string $method_title |
| 19 |
*/ |
| 20 |
public $method_title = 'mada'; |
| 21 |
|
| 22 |
public $trans_mode = 'EXTERNAL'; |
| 23 |
|
| 24 |
/** |
| 25 |
* Description of gateways which will appear next to title |
| 26 |
* @var string $method_description |
| 27 |
*/ |
| 28 |
public $method_description = 'Mada Plugin for Woocommerce'; |
| 29 |
|
| 30 |
|
| 31 |
/** |
| 32 |
* |
| 33 |
* the Brands supported by the gateway |
| 34 |
* @var array $supported_brands |
| 35 |
*/ |
| 36 |
protected $supported_brands = [ |
| 37 |
'MADA' => 'Mada', |
| 38 |
]; |
| 39 |
|
| 40 |
public function boot() |
| 41 |
{ |
| 42 |
|
| 43 |
$this->title = __('mada debit card', 'hyperpay-gateways'); |
| 44 |
$this->brands = ['MADA']; |
| 45 |
} |
| 46 |
|
| 47 |
|
| 48 |
public function renderPaymentForm(WC_Order $order, $result) |
| 49 |
{ |
| 50 |
parent::renderPaymentForm($order,$result); |
| 51 |
wp_enqueue_style('hyperpay_mada_style', HYPERPAY_PLUGIN_DIR . '/src/assets/css/mada.css', [], '6.0.1'); |
| 52 |
} |
| 53 |
|
| 54 |
} |
| 55 |
|