|
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\Payment\Handler\Transaction; |
|
9
|
|
|
|
|
10
|
|
|
use Generated\Shared\Transfer\QuoteTransfer; |
|
|
|
|
|
|
11
|
|
|
use SprykerEco\Zed\AmazonPay\Business\Converter\AmazonPayConverterInterface; |
|
12
|
|
|
use SprykerEco\Zed\AmazonPay\Business\Payment\Writer\AmazonpayPaymentWriterInterface; |
|
13
|
|
|
|
|
14
|
|
|
class ConfirmPurchaseTransactionCollection extends AbstractTransactionCollection implements TransactionCollectionInterface |
|
15
|
|
|
{ |
|
16
|
|
|
/** |
|
17
|
|
|
* @var \SprykerEco\Zed\AmazonPay\Business\Converter\AmazonPayConverterInterface |
|
18
|
|
|
*/ |
|
19
|
|
|
protected $converter; |
|
20
|
|
|
|
|
21
|
|
|
/** |
|
22
|
|
|
* @var AmazonpayPaymentWriterInterface |
|
23
|
|
|
*/ |
|
24
|
|
|
protected $amazonpayPaymentSaver; |
|
25
|
|
|
|
|
26
|
|
|
/** |
|
27
|
|
|
* @param \SprykerEco\Zed\AmazonPay\Business\Payment\Handler\Transaction\AmazonpayTransactionInterface[] $transactionHandlers |
|
28
|
|
|
* @param \SprykerEco\Zed\AmazonPay\Business\Converter\AmazonPayConverterInterface $converter |
|
29
|
|
|
* @param AmazonpayPaymentWriterInterface $amazonpayPaymentSaver |
|
30
|
|
|
*/ |
|
31
|
|
|
public function __construct( |
|
32
|
|
|
array $transactionHandlers, |
|
33
|
|
|
AmazonPayConverterInterface $converter, |
|
34
|
|
|
AmazonpayPaymentWriterInterface $amazonpayPaymentSaver |
|
35
|
|
|
) { |
|
36
|
|
|
parent::__construct($transactionHandlers); |
|
37
|
|
|
$this->converter = $converter; |
|
38
|
|
|
$this->amazonpayPaymentSaver = $amazonpayPaymentSaver; |
|
39
|
|
|
} |
|
40
|
|
|
|
|
41
|
|
|
/** |
|
42
|
|
|
* @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer |
|
43
|
|
|
* |
|
44
|
|
|
* @return \Generated\Shared\Transfer\QuoteTransfer |
|
45
|
|
|
*/ |
|
46
|
|
|
public function execute(QuoteTransfer $quoteTransfer): QuoteTransfer |
|
47
|
|
|
{ |
|
48
|
|
|
$amazonpayCallTransfer = $this->converter->mapToAmazonpayCallTransfer($quoteTransfer); |
|
49
|
|
|
$amazonpayCallTransfer = $this->executeHandlers($amazonpayCallTransfer); |
|
50
|
|
|
$quoteTransfer->fromArray($amazonpayCallTransfer->modifiedToArray(), true); |
|
51
|
|
|
|
|
52
|
|
|
$this->amazonpayPaymentSaver->writerConfirmedAmazonPayPayment($quoteTransfer->getAmazonpayPayment()); |
|
53
|
|
|
|
|
54
|
|
|
return $quoteTransfer; |
|
55
|
|
|
} |
|
56
|
|
|
} |
|
57
|
|
|
|
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