1 | <?php |
||
18 | class CartFinisher extends BaseObject |
||
19 | { |
||
20 | /** |
||
21 | * @var ShoppingCart |
||
22 | */ |
||
23 | public $cart; |
||
24 | |||
25 | /** |
||
26 | * @var AbstractPurchase[] array of successful purchases |
||
27 | */ |
||
28 | protected $_success = []; |
||
29 | |||
30 | /** |
||
31 | * @var ErrorPurchaseException[] array of failed purchases |
||
32 | */ |
||
33 | protected $_error = []; |
||
34 | |||
35 | /** |
||
36 | * @var PendingPurchaseException[] array of purchases that are pending |
||
37 | */ |
||
38 | protected $_pending = []; |
||
39 | |||
40 | /** |
||
41 | * Getter for array of successful purchases. |
||
42 | * @return AbstractPurchase[] |
||
43 | */ |
||
44 | public function getSuccess() |
||
48 | |||
49 | /** |
||
50 | * Getter for array of failed purchases. |
||
51 | * @return ErrorPurchaseException[] |
||
52 | */ |
||
53 | public function getError() |
||
57 | |||
58 | /** |
||
59 | * Getter for array of failed purchases. |
||
60 | * @return PendingPurchaseException[] |
||
61 | */ |
||
62 | public function getPending() |
||
66 | |||
67 | /** |
||
68 | * Runs the purchase. |
||
69 | * Purchases the positions in the [[cart]]. |
||
70 | */ |
||
71 | public function run() |
||
99 | |||
100 | protected function ensureCanBeFinished() |
||
123 | } |
||
124 |