Total Complexity | 4 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
23 | trait PurchaseSessionTrait |
||
24 | { |
||
25 | use HasPurchaseParent { |
||
26 | populateFromPayment as populateFromPaymentTrait; |
||
27 | } |
||
28 | use HasGatewayRecordTrait; |
||
29 | use TimestampableTrait; |
||
30 | |||
31 | /** |
||
32 | * @var string |
||
33 | */ |
||
34 | static protected $createTimestamps = ['created']; |
||
35 | |||
36 | /** |
||
37 | * @var string |
||
38 | */ |
||
39 | static protected $updateTimestamps = []; |
||
40 | |||
41 | /** |
||
42 | * @param $payment |
||
43 | * @return $this |
||
44 | */ |
||
45 | public function populateFromPayment($payment) |
||
46 | { |
||
47 | $this->populateFromPaymentTrait($payment); |
||
48 | $this->new_status = (string) $payment->status; |
||
49 | |||
50 | return $this; |
||
51 | } |
||
52 | |||
53 | /** |
||
54 | * @param $response |
||
55 | */ |
||
56 | public function populateFromResponse($response) |
||
60 | } |
||
61 | } |
||
62 | |||
63 | public function populateFromRequest() |
||
69 |