Total Complexity | 7 |
Total Lines | 57 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
19 | trait PurchaseSessionTrait |
||
20 | { |
||
21 | /** |
||
22 | * @param $payment |
||
23 | * @return $this |
||
24 | */ |
||
25 | public function populateFromPayment($payment) |
||
26 | { |
||
27 | $this->{$this->getPurchaseFk()} = $payment->id; |
||
28 | $this->new_status = $payment->status; |
||
29 | |||
30 | return $this; |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * @param $response |
||
35 | */ |
||
36 | public function populateFromResponse($response) |
||
40 | } |
||
41 | } |
||
42 | |||
43 | /** |
||
44 | * @param AbstractGateway $gateway |
||
45 | */ |
||
46 | public function populateFromGateway($gateway) |
||
47 | { |
||
48 | $this->gateway = $gateway->getName(); |
||
49 | } |
||
50 | |||
51 | /** |
||
52 | * |
||
53 | */ |
||
54 | public function populateFromRequest() |
||
58 | } |
||
59 | |||
60 | /** |
||
61 | * @inheritdoc |
||
62 | */ |
||
63 | public function insert() |
||
68 | } |
||
69 | |||
70 | /** |
||
71 | * @return string |
||
72 | */ |
||
73 | protected function getPurchaseFk() |
||
78 |