|
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\AmazonpayCaptureDetailsTransfer; |
|
|
|
|
|
|
11
|
|
|
use SprykerEco\Zed\Amazonpay\Business\Api\Converter\AbstractArrayConverter; |
|
12
|
|
|
|
|
13
|
|
|
class CaptureDetailsConverter extends AbstractArrayConverter |
|
14
|
|
|
{ |
|
15
|
|
|
|
|
16
|
|
|
const CAPTURE_STATUS_DECLINED = 'Declined'; |
|
17
|
|
|
const CAPTURE_STATUS_PENDING = 'Pending'; |
|
18
|
|
|
const CAPTURE_STATUS_COMPLETED = 'Completed'; |
|
19
|
|
|
|
|
20
|
|
|
/** |
|
21
|
|
|
* @param array $captureDetailsData |
|
22
|
|
|
* |
|
23
|
|
|
* @return \Generated\Shared\Transfer\AmazonpayCaptureDetailsTransfer |
|
24
|
|
|
*/ |
|
25
|
|
|
public function convert(array $captureDetailsData) |
|
26
|
|
|
{ |
|
27
|
|
|
$captureDetails = new AmazonpayCaptureDetailsTransfer(); |
|
28
|
|
|
$captureDetails->setAmazonCaptureId($captureDetailsData['AmazonCaptureId']); |
|
29
|
|
|
$captureDetails->setCaptureReferenceId($captureDetailsData['CaptureReferenceId']); |
|
30
|
|
|
|
|
31
|
|
|
if (!empty($captureDetailsData['CaptureAmount'])) { |
|
32
|
|
|
$captureDetails->setCaptureAmount($this->convertPriceToTransfer($captureDetailsData['CaptureAmount'])); |
|
33
|
|
|
} |
|
34
|
|
|
|
|
35
|
|
|
if (!empty($captureDetailsData['CaptureFee'])) { |
|
36
|
|
|
$captureDetails->setCaptureFee($this->convertPriceToTransfer($captureDetailsData['CaptureFee'])); |
|
37
|
|
|
} |
|
38
|
|
|
|
|
39
|
|
|
if (!empty($captureDetailsData['CaptureStatus'])) { |
|
40
|
|
|
$captureDetails->setCaptureStatus($this->convertStatusToTransfer($captureDetailsData['CaptureStatus'])); |
|
41
|
|
|
} |
|
42
|
|
|
|
|
43
|
|
|
if (!empty($captureDetailsData['IdList'])) { |
|
44
|
|
|
$captureDetails->setIdList(array_values($captureDetailsData['IdList'])[0]); |
|
45
|
|
|
} |
|
46
|
|
|
|
|
47
|
|
|
if (!empty($captureDetailsData['SellerCaptureNote'])) { |
|
48
|
|
|
$captureDetails->setSellerCaptureNote($captureDetailsData['SellerCaptureNote']); |
|
49
|
|
|
} |
|
50
|
|
|
|
|
51
|
|
|
if (!empty($captureDetailsData['CreationTimestamp'])) { |
|
52
|
|
|
$captureDetails->setCreationTimestamp($captureDetailsData['CreationTimestamp']); |
|
53
|
|
|
} |
|
54
|
|
|
|
|
55
|
|
|
return $captureDetails; |
|
56
|
|
|
} |
|
57
|
|
|
|
|
58
|
|
|
} |
|
59
|
|
|
|
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