1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* MIT License |
5
|
|
|
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. |
6
|
|
|
*/ |
7
|
|
|
|
8
|
|
|
namespace SprykerEco\Zed\Computop\Persistence; |
9
|
|
|
|
10
|
|
|
use Generated\Shared\Transfer\ComputopNotificationTransfer; |
|
|
|
|
11
|
|
|
use Spryker\Zed\Kernel\Persistence\AbstractEntityManager; |
12
|
|
|
|
13
|
|
|
/** |
14
|
|
|
* @method \SprykerEco\Zed\Computop\Persistence\ComputopPersistenceFactory getFactory() |
15
|
|
|
*/ |
16
|
|
|
class ComputopEntityManager extends AbstractEntityManager implements ComputopEntityManagerInterface |
17
|
|
|
{ |
18
|
|
|
/** |
19
|
|
|
* @param \Generated\Shared\Transfer\ComputopNotificationTransfer $computopNotificationTransfer |
20
|
|
|
* |
21
|
|
|
* @return void |
22
|
|
|
*/ |
23
|
|
|
public function savePaymentComputopNotification(ComputopNotificationTransfer $computopNotificationTransfer): void |
24
|
|
|
{ |
25
|
|
|
$paymentComputopNotificationEntity = $this->getFactory() |
26
|
|
|
->createPaymentComputopNotificationQuery() |
27
|
|
|
->filterByPayId($computopNotificationTransfer->getPayId()) |
28
|
|
|
->filterByTransId($computopNotificationTransfer->getTransId()) |
29
|
|
|
->filterByXId($computopNotificationTransfer->getXId()) |
30
|
|
|
->findOneOrCreate(); |
31
|
|
|
|
32
|
|
|
$paymentComputopNotificationEntity->fromArray( |
33
|
|
|
$computopNotificationTransfer->modifiedToArray() |
34
|
|
|
); |
35
|
|
|
$paymentComputopNotificationEntity->save(); |
36
|
|
|
} |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* @param \Generated\Shared\Transfer\ComputopNotificationTransfer $computopNotificationTransfer |
40
|
|
|
* |
41
|
|
|
* @return void |
42
|
|
|
*/ |
43
|
|
|
public function updatePaymentComputopOrderItemPaymentConfirmation( |
44
|
|
|
ComputopNotificationTransfer $computopNotificationTransfer |
45
|
|
|
): void { |
46
|
|
|
$paymentComputopOrderItemEntities = $this->getFactory() |
47
|
|
|
->createPaymentComputopOrderItemQuery() |
48
|
|
|
->useSpyPaymentComputopQuery() |
49
|
|
|
->filterByTransId($computopNotificationTransfer->getTransId()) |
50
|
|
|
->filterByPayId($computopNotificationTransfer->getPayId()) |
51
|
|
|
->endUse() |
52
|
|
|
->find(); |
53
|
|
|
|
54
|
|
|
foreach ($paymentComputopOrderItemEntities as $paymentComputopOrderItemEntity) { |
55
|
|
|
$paymentComputopOrderItemEntity->setIsPaymentConfirmed($computopNotificationTransfer->getIsSuccess()); |
56
|
|
|
$paymentComputopOrderItemEntity->save(); |
57
|
|
|
} |
58
|
|
|
} |
59
|
|
|
} |
60
|
|
|
|
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