1 | <?php |
||
13 | class Service |
||
14 | { |
||
15 | /** |
||
16 | * @var Transaction |
||
17 | */ |
||
18 | protected $transaction; |
||
19 | |||
20 | /** |
||
21 | * @var Gateway |
||
22 | */ |
||
23 | private $gateway; |
||
24 | |||
25 | /** |
||
26 | * @var RouterInterface |
||
27 | */ |
||
28 | private $router; |
||
29 | |||
30 | /** |
||
31 | * @var array |
||
32 | */ |
||
33 | private $config; |
||
34 | |||
35 | /** |
||
36 | * @var array |
||
37 | */ |
||
38 | private $params; |
||
39 | |||
40 | /** |
||
41 | * @param Gateway $gateway |
||
42 | * @param RouterInterface $router |
||
43 | * @param array $config |
||
44 | */ |
||
45 | public function __construct(Gateway $gateway, RouterInterface $router, array $config) |
||
57 | |||
58 | /** |
||
59 | * Set Transaction and parameters. |
||
60 | * |
||
61 | * @param Transaction $transaction |
||
62 | * @param array $customParameters |
||
63 | * |
||
64 | * @return Service |
||
65 | */ |
||
66 | public function setTransaction(Transaction $transaction, array $customParameters = []) |
||
93 | |||
94 | /** |
||
95 | * Start transaction. You need to call setTransaction() before. |
||
96 | * |
||
97 | * @return \Omnipay\Common\Message\ResponseInterface |
||
98 | */ |
||
99 | public function start() |
||
114 | |||
115 | /** |
||
116 | * Complete transaction. You need to call setTransaction() before. |
||
117 | */ |
||
118 | public function complete(): void |
||
136 | } |
||
137 |