1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* Apache OSL-2 |
5
|
|
|
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. |
6
|
|
|
*/ |
7
|
|
|
|
8
|
|
|
namespace SprykerEco\Zed\Amazonpay\Business\Api\Converter\Details; |
9
|
|
|
|
10
|
|
|
use Generated\Shared\Transfer\AmazonpayAuthorizationDetailsTransfer; |
|
|
|
|
11
|
|
|
use SprykerEco\Zed\Amazonpay\Business\Api\Converter\AbstractArrayConverter; |
12
|
|
|
|
13
|
|
|
class AuthorizationDetailsConverter extends AbstractArrayConverter |
14
|
|
|
{ |
15
|
|
|
|
16
|
|
|
const PAYMENT_METHOD_INVALID = 'InvalidPaymentMethod'; |
17
|
|
|
|
18
|
|
|
/** |
19
|
|
|
* @param array $authDetailsData |
20
|
|
|
* |
21
|
|
|
* @return \Generated\Shared\Transfer\AmazonpayAuthorizationDetailsTransfer |
22
|
|
|
*/ |
23
|
|
|
public function convert(array $authDetailsData) |
24
|
|
|
{ |
25
|
|
|
$authorizationDetails = new AmazonpayAuthorizationDetailsTransfer(); |
26
|
|
|
$authorizationDetails->setAmazonAuthorizationId($authDetailsData['AmazonAuthorizationId']); |
27
|
|
|
$authorizationDetails->setAuthorizationReferenceId($authDetailsData['AuthorizationReferenceId']); |
28
|
|
|
|
29
|
|
|
if (!empty($authDetailsData['AuthorizationAmount'])) { |
30
|
|
|
$authorizationDetails->setAuthorizationAmount($this->convertPriceToTransfer($authDetailsData['AuthorizationAmount'])); |
31
|
|
|
} |
32
|
|
|
|
33
|
|
|
if (!empty($authDetailsData['CapturedAmount'])) { |
34
|
|
|
$authorizationDetails->setAuthorizationAmount($this->convertPriceToTransfer($authDetailsData['CapturedAmount'])); |
35
|
|
|
} |
36
|
|
|
|
37
|
|
|
if (!empty($authDetailsData['AuthorizationFee'])) { |
38
|
|
|
$authorizationDetails->setAuthorizationAmount($this->convertPriceToTransfer($authDetailsData['AuthorizationFee'])); |
39
|
|
|
} |
40
|
|
|
|
41
|
|
|
if (!empty($authDetailsData['AuthorizationStatus'])) { |
42
|
|
|
$authorizationDetails->setAuthorizationStatus( |
43
|
|
|
$this->convertStatusToTransfer($authDetailsData['AuthorizationStatus']) |
44
|
|
|
); |
45
|
|
|
} |
46
|
|
|
|
47
|
|
|
if (!empty($authDetailsData['ExpirationTimestamp'])) { |
48
|
|
|
$authorizationDetails->setExpirationTimestamp($authDetailsData['ExpirationTimestamp']); |
49
|
|
|
} |
50
|
|
|
|
51
|
|
|
if (!empty($authDetailsData['IdList'])) { |
52
|
|
|
$authorizationDetails->setIdList(array_values($authDetailsData['IdList'])[0]); |
53
|
|
|
} |
54
|
|
|
|
55
|
|
|
if (!empty($authDetailsData['SoftDecline'])) { |
56
|
|
|
$authorizationDetails->setSoftDecline($authDetailsData['SoftDecline']); |
57
|
|
|
} |
58
|
|
|
|
59
|
|
|
if (!empty($authDetailsData['CaptureNow'])) { |
60
|
|
|
$authorizationDetails->setCaptureNow($authDetailsData['CaptureNow']); |
61
|
|
|
} |
62
|
|
|
|
63
|
|
|
if (!empty($authDetailsData['SellerAuthorizationNote'])) { |
64
|
|
|
$authorizationDetails->setSellerAuthorizationNote($authDetailsData['CaptureNow']); |
65
|
|
|
} |
66
|
|
|
|
67
|
|
|
if (!empty($authDetailsData['CreationTimestamp'])) { |
68
|
|
|
$authorizationDetails->setCreationTimestamp($authDetailsData['CreationTimestamp']); |
69
|
|
|
} |
70
|
|
|
|
71
|
|
|
return $authorizationDetails; |
72
|
|
|
} |
73
|
|
|
|
74
|
|
|
} |
75
|
|
|
|
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