|
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\Client\AmazonPay\Zed; |
|
9
|
|
|
|
|
10
|
|
|
use Generated\Shared\Transfer\QuoteTransfer; |
|
|
|
|
|
|
11
|
|
|
use Spryker\Client\ZedRequest\ZedRequestClientInterface; |
|
12
|
|
|
|
|
13
|
|
|
class AmazonPayStub implements AmazonPayStubInterface |
|
14
|
|
|
{ |
|
15
|
|
|
/** |
|
16
|
|
|
* @var \Spryker\Client\ZedRequest\ZedRequestClientInterface |
|
17
|
|
|
*/ |
|
18
|
|
|
protected $zedStub; |
|
19
|
|
|
|
|
20
|
|
|
/** |
|
21
|
|
|
* @param \Spryker\Client\ZedRequest\ZedRequestClientInterface $zedStub |
|
22
|
|
|
*/ |
|
23
|
|
|
public function __construct(ZedRequestClientInterface $zedStub) |
|
24
|
|
|
{ |
|
25
|
|
|
$this->zedStub = $zedStub; |
|
26
|
|
|
} |
|
27
|
|
|
|
|
28
|
|
|
/** |
|
29
|
|
|
* @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer |
|
30
|
|
|
* |
|
31
|
|
|
* @return \Spryker\Shared\Kernel\Transfer\TransferInterface |
|
32
|
|
|
*/ |
|
33
|
|
|
public function handleCartWithAmazonPay(QuoteTransfer $quoteTransfer) |
|
34
|
|
|
{ |
|
35
|
|
|
return $this->zedStub->call('/amazon-pay/gateway/handle-cart-with-amazon-pay', $quoteTransfer); |
|
|
|
|
|
|
36
|
|
|
} |
|
37
|
|
|
|
|
38
|
|
|
/** |
|
39
|
|
|
* @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer |
|
40
|
|
|
* |
|
41
|
|
|
* @return \Spryker\Shared\Kernel\Transfer\TransferInterface |
|
42
|
|
|
*/ |
|
43
|
|
|
public function addSelectedAddressToQuote(QuoteTransfer $quoteTransfer) |
|
44
|
|
|
{ |
|
45
|
|
|
return $this->zedStub->call( |
|
|
|
|
|
|
46
|
|
|
'/amazon-pay/gateway/add-selected-address-to-quote', |
|
47
|
|
|
$quoteTransfer |
|
48
|
|
|
); |
|
49
|
|
|
} |
|
50
|
|
|
|
|
51
|
|
|
/** |
|
52
|
|
|
* @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer |
|
53
|
|
|
* |
|
54
|
|
|
* @return \Spryker\Shared\Kernel\Transfer\TransferInterface |
|
55
|
|
|
*/ |
|
56
|
|
|
public function addSelectedShipmentMethodToQuote(QuoteTransfer $quoteTransfer) |
|
57
|
|
|
{ |
|
58
|
|
|
return $this->zedStub->call( |
|
|
|
|
|
|
59
|
|
|
'/amazon-pay/gateway/add-selected-shipment-method-to-quote', |
|
60
|
|
|
$quoteTransfer |
|
61
|
|
|
); |
|
62
|
|
|
} |
|
63
|
|
|
|
|
64
|
|
|
/** |
|
65
|
|
|
* @param QuoteTransfer $quoteTransfer |
|
66
|
|
|
* |
|
67
|
|
|
* @return QuoteTransfer |
|
68
|
|
|
*/ |
|
69
|
|
|
public function confirmPurchase(QuoteTransfer $quoteTransfer): QuoteTransfer |
|
70
|
|
|
{ |
|
71
|
|
|
return $this->zedStub->call( |
|
|
|
|
|
|
72
|
|
|
'/amazon-pay/gateway/confirm-purchase', |
|
73
|
|
|
$quoteTransfer |
|
74
|
|
|
); |
|
75
|
|
|
} |
|
76
|
|
|
} |
|
77
|
|
|
|
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