| 1 |
<?php |
| 2 |
|
| 3 |
namespace Hyperpay\Gateways\Brands; |
| 4 |
|
| 5 |
use Hyperpay\Gateways\App\DefaultGateway; |
| 6 |
use WC_Order; |
| 7 |
|
| 8 |
class Aani extends DefaultGateway |
| 9 |
{ |
| 10 |
|
| 11 |
public $trans_mode = 'EXTERNAL'; |
| 12 |
|
| 13 |
/** |
| 14 |
* should be lower case and unique |
| 15 |
* @var string $id |
| 16 |
*/ |
| 17 |
public $id = "hyperpay_aani"; |
| 18 |
|
| 19 |
/** |
| 20 |
* The title which appear next to gateway on setting page |
| 21 |
* @var string $method_title |
| 22 |
*/ |
| 23 |
public $method_title = "Aani"; |
| 24 |
|
| 25 |
/** |
| 26 |
* Description of gateways which will appear next to title |
| 27 |
* @var string $method_description |
| 28 |
*/ |
| 29 |
public $method_description = "Aani Plugin for Woocommerce"; |
| 30 |
|
| 31 |
|
| 32 |
/** |
| 33 |
* |
| 34 |
* the Brands supported by the gateway |
| 35 |
* @var array $supported_brands |
| 36 |
*/ |
| 37 |
protected $supported_brands = [ |
| 38 |
"AANI" => "Aani", |
| 39 |
]; |
| 40 |
public function setExtraData(WC_Order $order): array |
| 41 |
{ |
| 42 |
|
| 43 |
$data = [ |
| 44 |
"customer.mobile" => $order->get_billing_phone() |
| 45 |
]; |
| 46 |
|
| 47 |
|
| 48 |
return ['body' => $data]; |
| 49 |
} |
| 50 |
} |
| 51 |
|