1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* MIT License |
5
|
|
|
* For full license information, please view the LICENSE file that was distributed with this source code. |
6
|
|
|
*/ |
7
|
|
|
|
8
|
|
|
namespace SprykerEco\Zed\CrefoPayApi; |
9
|
|
|
|
10
|
|
|
use Spryker\Zed\Kernel\AbstractBundleConfig; |
|
|
|
|
11
|
|
|
use SprykerEco\Shared\CrefoPayApi\CrefoPayApiConstants; |
12
|
|
|
|
13
|
|
|
/** |
14
|
|
|
* @method \SprykerEco\Shared\CrefoPayApi\CrefoPayApiConfig getSharedConfig() |
15
|
|
|
*/ |
16
|
|
|
class CrefoPayApiConfig extends AbstractBundleConfig |
17
|
|
|
{ |
18
|
|
|
protected const API_HEADER_MAC = 'X-Payco-HMAC'; |
19
|
|
|
protected const API_RESPONSE_FIELD_RESULT_CODE = 'resultCode'; |
20
|
|
|
protected const API_ERROR_TYPE_EXTERNAL = 'EXTERNAL'; |
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* @return string |
24
|
|
|
*/ |
25
|
|
|
public function getCreateTransactionActionUrl(): string |
26
|
|
|
{ |
27
|
|
|
return $this->get(CrefoPayApiConstants::CREATE_TRANSACTION_ACTION_URL); |
28
|
|
|
} |
29
|
|
|
|
30
|
|
|
/** |
31
|
|
|
* @return string |
32
|
|
|
*/ |
33
|
|
|
public function getReserveActionUrl(): string |
34
|
|
|
{ |
35
|
|
|
return $this->get(CrefoPayApiConstants::RESERVE_ACTION_URL); |
36
|
|
|
} |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* @return string |
40
|
|
|
*/ |
41
|
|
|
public function getCaptureActionUrl(): string |
42
|
|
|
{ |
43
|
|
|
return $this->get(CrefoPayApiConstants::CAPTURE_ACTION_URL); |
44
|
|
|
} |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* @return string |
48
|
|
|
*/ |
49
|
|
|
public function getCancelActionUrl(): string |
50
|
|
|
{ |
51
|
|
|
return $this->get(CrefoPayApiConstants::CANCEL_ACTION_URL); |
52
|
|
|
} |
53
|
|
|
|
54
|
|
|
/** |
55
|
|
|
* @return string |
56
|
|
|
*/ |
57
|
|
|
public function getRefundActionUrl(): string |
58
|
|
|
{ |
59
|
|
|
return $this->get(CrefoPayApiConstants::REFUND_ACTION_URL); |
60
|
|
|
} |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* @return string |
64
|
|
|
*/ |
65
|
|
|
public function getFinishActionUrl(): string |
66
|
|
|
{ |
67
|
|
|
return $this->get(CrefoPayApiConstants::FINISH_ACTION_URL); |
68
|
|
|
} |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* @return string |
72
|
|
|
*/ |
73
|
|
|
public function getApiFieldMac(): string |
74
|
|
|
{ |
75
|
|
|
return $this->getSharedConfig()->getApiFieldMac(); |
76
|
|
|
} |
77
|
|
|
|
78
|
|
|
/** |
79
|
|
|
* @return string |
80
|
|
|
*/ |
81
|
|
|
public function getApiHeaderMac(): string |
82
|
|
|
{ |
83
|
|
|
return static::API_HEADER_MAC; |
84
|
|
|
} |
85
|
|
|
|
86
|
|
|
/** |
87
|
|
|
* @return string |
88
|
|
|
*/ |
89
|
|
|
public function getApiResponseFieldResultCode(): string |
90
|
|
|
{ |
91
|
|
|
return static::API_RESPONSE_FIELD_RESULT_CODE; |
92
|
|
|
} |
93
|
|
|
|
94
|
|
|
/** |
95
|
|
|
* @return string |
96
|
|
|
*/ |
97
|
|
|
public function getApiErrorTypeExternal(): string |
98
|
|
|
{ |
99
|
|
|
return static::API_ERROR_TYPE_EXTERNAL; |
100
|
|
|
} |
101
|
|
|
} |
102
|
|
|
|
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