Conditions | 5 |
Paths | 5 |
Total Lines | 25 |
Code Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | public static function getMerchantAccessToken() |
||
15 | { |
||
16 | $merchantClientId = config('bSecurePayments.client_id'); |
||
17 | $merchantClientSecret = config('bSecurePayments.client_secret'); |
||
18 | |||
19 | $merchantAppCredentials = ClientApp::verifyAppCredentials($merchantClientId, $merchantClientSecret); |
||
20 | $merchantAppCredentials['store_id'] = config('bSecurePayments.store_slug'); |
||
21 | |||
22 | if (empty($merchantAppCredentials)) { |
||
23 | return ['error' => true, 'message' => trans('bSecurePayments::messages.client.invalid')]; |
||
24 | } else { |
||
25 | if (!empty($merchantAppCredentials['client_id'])) { |
||
26 | // Get Merchant Access Token |
||
27 | $merchantToken = Helper::getAccessToken($merchantAppCredentials); |
||
28 | |||
29 | if ($merchantToken['error']) { |
||
30 | return ['error' => true, 'message' => $merchantToken['message']]; |
||
31 | } else { |
||
32 | return ['error' => false, 'body' => $merchantToken['accessToken']]; |
||
33 | } |
||
34 | |||
35 | } else if ($merchantAppCredentials['error']) { |
||
36 | return $merchantAppCredentials; |
||
37 | } else { |
||
38 | return ['error' => true, 'message' => trans('bSecurePayments::messages.general.failed')]; |
||
39 | } |
||
43 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths