| Conditions | 5 | 
| Paths | 5 | 
| Total Lines | 23 | 
| Code Lines | 14 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 20 | public function __construct(\Illuminate\Http\Request $request) | ||
| 21 |     { | ||
| 22 | $this->request = $request; | ||
| 23 |         $ResTranData = $request->get('trandata'); | ||
| 24 |         if ($ResTranData) { | ||
| 25 |             $decryptedData = explode('&', $this->decrypt($ResTranData, Config::get('knet.resource_key'))); | ||
| 26 |             foreach ($decryptedData as $datum) { | ||
| 27 |                 $temp = explode('=', $datum); | ||
| 28 |                 if (isset($temp[1])) { | ||
| 29 |                     if ($temp[0] == 'result') { | ||
| 30 |                         $temp[1] = implode(' ', explode('+', $temp[1])); | ||
| 31 | $this->result['paid'] = $temp[1] == 'CAPTURED'; | ||
| 32 | } | ||
| 33 | |||
| 34 | $this->result[$temp[0]] = $temp[1]; | ||
| 35 | } | ||
| 36 | } | ||
| 37 | |||
| 38 | return true; | ||
| 39 | } | ||
| 40 |         $this->result = explode('-', $this->request->get('ErrorText')); | ||
| 41 | |||
| 42 | return false; | ||
| 43 | } | ||
| 55 |