Total Complexity | 7 |
Total Lines | 50 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | class CompletePurchaseRequest extends AbstractCompletePurchaseRequest |
||
18 | { |
||
19 | use HasModelRequest; |
||
|
|||
20 | use HasGatewayRequestTrait; |
||
21 | |||
22 | /** |
||
23 | * @inheritdoc |
||
24 | */ |
||
25 | public function getData() |
||
26 | { |
||
27 | $return = parent::getData(); |
||
28 | // Add model only if has data |
||
29 | if (count($return) && $this->validateModel()) { |
||
30 | $return['model'] = $this->getModel(); |
||
31 | } |
||
32 | |||
33 | return $return; |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * @inheritDoc |
||
38 | */ |
||
39 | public function getModelIdFromRequest() |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * @return bool|mixed |
||
48 | * @throws \Exception |
||
49 | */ |
||
50 | protected function parseNotification() |
||
51 | { |
||
52 | if ($this->validateModel()) { |
||
53 | $model = $this->getModel(); |
||
54 | $this->updateParametersFromPurchase($model); |
||
55 | } |
||
56 | |||
57 | return parent::parseNotification(); |
||
58 | } |
||
59 | |||
60 | /** |
||
61 | * @param Gateway $modelGateway |
||
62 | */ |
||
63 | protected function updateParametersFromGateway($modelGateway) |
||
67 | } |
||
68 | } |
||
69 |