| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | if ($cache = $this->getCache()->get($this->getCacheKey())) { |
||
| 35 | return $cache; |
||
| 36 | } |
||
| 37 | |||
| 38 | $response = $this->request('sandboxnew/pay/getsignkey'); |
||
| 39 | |||
| 40 | if ($response['return_code'] === 'SUCCESS') { |
||
| 41 | $this->getCache()->set($this->getCacheKey(), $key = $response['sandbox_signkey'], 24 * 3600); |
||
| 42 | |||
| 43 | return $key; |
||
| 44 | } |
||
| 45 | |||
| 46 | throw new SandboxException($response['return_msg']); |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @return string |
||
| 57 |