| 1 |
<?php |
| 2 |
|
| 3 |
namespace Booktics\Payment\Payment_Methods; |
| 4 |
|
| 5 |
use Booktics\Payment\Contracts\Payment_Method_Interface; |
| 6 |
use Booktics\Models\Order_Model; |
| 7 |
|
| 8 |
abstract class Abstract_Payment_Method implements Payment_Method_Interface { |
| 9 |
|
| 10 |
protected $id; |
| 11 |
protected $name; |
| 12 |
private $order; |
| 13 |
|
| 14 |
/** |
| 15 |
* Get the unique identifier for this payment method |
| 16 |
* |
| 17 |
* @return string |
| 18 |
*/ |
| 19 |
public function get_id(): string { |
| 20 |
return $this->id; |
| 21 |
} |
| 22 |
|
| 23 |
/** |
| 24 |
* Get the display name of the payment method |
| 25 |
* |
| 26 |
* @return string |
| 27 |
*/ |
| 28 |
public function get_name(): string { |
| 29 |
return $this->name; |
| 30 |
} |
| 31 |
|
| 32 |
/** |
| 33 |
* Get Order |
| 34 |
* |
| 35 |
* @return Order_Model |
| 36 |
*/ |
| 37 |
protected function get_order() { |
| 38 |
return $this->order; |
| 39 |
} |
| 40 |
} |
| 41 |
|