Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | public function verifyPurchase() |
||
21 | { |
||
22 | $this->getCustomer(); |
||
23 | if(null != $this->customer) |
||
24 | return $this->validKeyResponse(); |
||
25 | |||
26 | $response = app()->envatoapi->verifyPurchase(request('code')); |
||
27 | if('error' == $response['status']) |
||
28 | return $this->invalidKeyResponse(); |
||
29 | // If we are here then the key is valid |
||
30 | // We now create a new customer record from the envato api response |
||
31 | $this->customer = $this->customers->createCustomer($response['response']); |
||
|
|||
32 | // After creation of customer details return the response back to the user |
||
33 | return $this->validKeyResponse(); |
||
34 | } |
||
35 | |||
65 | } |
An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.
If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.