| Total Complexity | 6 |
| Total Lines | 81 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | abstract class Driver implements DriverInterface |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Invoice |
||
| 12 | * |
||
| 13 | * @var InvoiceBuilder |
||
| 14 | */ |
||
| 15 | protected $invoice; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Driver constructor. |
||
| 19 | * |
||
| 20 | * Driver constructor. |
||
| 21 | * @param InvoiceBuilder $invoice |
||
| 22 | * @param $settings |
||
| 23 | */ |
||
| 24 | abstract public function __construct(InvoiceBuilder $invoice, $settings); |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Set payment amount. |
||
| 28 | * |
||
| 29 | * @param $amount |
||
| 30 | * @return $this |
||
| 31 | * @throws \Exception |
||
| 32 | */ |
||
| 33 | public function amount($amount) |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Set a piece of data to the details. |
||
| 42 | * |
||
| 43 | * @param $key |
||
| 44 | * @param null $value |
||
|
|
|||
| 45 | * @return $this |
||
| 46 | */ |
||
| 47 | public function detail($key, $value = null) |
||
| 56 | } |
||
| 57 | |||
| 58 | public function setInvoice(InvoiceBuilder $invoice) { |
||
| 62 | } |
||
| 63 | |||
| 64 | public function getInvoice() |
||
| 67 | } |
||
| 68 | |||
| 69 | /** |
||
| 70 | * Purchase the invoice |
||
| 71 | * |
||
| 72 | * @return mixed |
||
| 73 | */ |
||
| 74 | abstract public function purchase(); |
||
| 75 | |||
| 76 | /** |
||
| 77 | * Pay the invoice |
||
| 78 | * |
||
| 79 | * @return mixed |
||
| 80 | */ |
||
| 81 | abstract public function pay(); |
||
| 82 | |||
| 83 | /** |
||
| 84 | * Verify the payment |
||
| 85 | * |
||
| 86 | * @return object |
||
| 87 | */ |
||
| 88 | abstract public function verify(); |
||
| 89 | } |
||
| 90 |