| 1 | <?php |
||
| 7 | class ProcessPayment |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Payment statuses. |
||
| 11 | */ |
||
| 12 | const STATUS_COMPLETED = 'Completed'; |
||
| 13 | const STATUS_PENDING = 'Pending'; |
||
| 14 | const STATUS_FAILED = 'Failed'; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Request returned from gateway. |
||
| 18 | * |
||
| 19 | * @var Request |
||
| 20 | */ |
||
| 21 | protected $request; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * ProcessPayment constructor. |
||
| 25 | * |
||
| 26 | * @param Request $request |
||
| 27 | */ |
||
| 28 | public function __construct(Request $request) |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Get the status of the Payment. |
||
| 35 | * |
||
| 36 | * @return string |
||
| 37 | */ |
||
| 38 | public function getStatus() |
||
| 55 | |||
| 56 | /** |
||
| 57 | * Get Transaction ID of the transaction. |
||
| 58 | * |
||
| 59 | * @return null|string |
||
| 60 | */ |
||
| 61 | public function getTransactionId() |
||
| 65 | |||
| 66 | /** |
||
| 67 | * Get the hash returned by the gateway. |
||
| 68 | * |
||
| 69 | * @return null|string |
||
| 70 | */ |
||
| 71 | protected function getHash() |
||
| 75 | |||
| 76 | } |
||
| 77 |