|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* MIT License |
|
5
|
|
|
* For full license information, please view the LICENSE file that was distributed with this source code. |
|
6
|
|
|
*/ |
|
7
|
|
|
|
|
8
|
|
|
namespace SprykerEcoTest\Zed\FirstData\Business; |
|
9
|
|
|
|
|
10
|
|
|
use Generated\Shared\Transfer\FirstDataNotificationTransfer; |
|
|
|
|
|
|
11
|
|
|
|
|
12
|
|
|
/** |
|
13
|
|
|
* Auto-generated group annotations |
|
14
|
|
|
* |
|
15
|
|
|
* @group SprykerEcoTest |
|
16
|
|
|
* @group Zed |
|
17
|
|
|
* @group FirstData |
|
18
|
|
|
* @group Business |
|
19
|
|
|
* @group Facade |
|
20
|
|
|
* @group FirstDataFacadeProcessNotificationTest |
|
21
|
|
|
*/ |
|
22
|
|
|
class FirstDataFacadeProcessNotificationTest extends AbstractFirstDataFacadeTest |
|
23
|
|
|
{ |
|
24
|
|
|
/** |
|
25
|
|
|
* @var \SprykerEcoTest\Zed\FirstData\FirstDataBusinessTester |
|
26
|
|
|
*/ |
|
27
|
|
|
protected $tester; |
|
28
|
|
|
|
|
29
|
|
|
/** |
|
30
|
|
|
* @return void |
|
31
|
|
|
*/ |
|
32
|
|
|
public function testProcessNotificationMustSaveNotification(): void |
|
33
|
|
|
{ |
|
34
|
|
|
//Arrange |
|
35
|
|
|
$firstDataNotificationTransfer = new FirstDataNotificationTransfer(); |
|
36
|
|
|
$firstDataNotificationTransfer->setStatus('APPROVED'); |
|
37
|
|
|
$firstDataNotificationTransfer->setRefNumber('84557082705'); |
|
38
|
|
|
$firstDataNotificationTransfer->setTransactionId('84557082705'); |
|
39
|
|
|
$firstDataNotificationTransfer->setIdSchemeTransaction('0301MCC392572'); |
|
40
|
|
|
$firstDataNotificationTransfer->setOid('C-70168565-2d7d-4f4b-aad3-be82e156ae13'); |
|
41
|
|
|
$firstDataNotificationTransfer->setApprovalCode('Y3AOK54423A45570827053APPXX3A854987'); |
|
42
|
|
|
$firstDataNotificationTransfer->setPaymentToken('B5912093-61AB-497D-BA8F-1B10868351FE'); |
|
43
|
|
|
$firstDataNotificationTransfer->setChargeTotal('0.00'); |
|
44
|
|
|
$firstDataNotificationTransfer->setTxnType('preauth'); |
|
45
|
|
|
$firstDataNotificationTransfer->setTxnDateTime('2021-03-01-14:37:45'); |
|
46
|
|
|
$firstDataNotificationTransfer->setTimezone('UTC'); |
|
47
|
|
|
$firstDataNotificationTransfer->setCurrency('840'); |
|
48
|
|
|
|
|
49
|
|
|
//Act |
|
50
|
|
|
$response = $this->tester->getFirstDataFacade($this->getFirstDataBusinessFactoryMock())->processNotification($firstDataNotificationTransfer); |
|
51
|
|
|
|
|
52
|
|
|
//Assert |
|
53
|
|
|
$this->assertEquals($firstDataNotificationTransfer->getStatus(), $response->getStatus()); |
|
54
|
|
|
$this->assertEquals($firstDataNotificationTransfer->getRefNumber(), $response->getRefNumber()); |
|
55
|
|
|
$this->assertEquals($firstDataNotificationTransfer->getTransactionId(), $response->getTransactionId()); |
|
56
|
|
|
$this->assertEquals($firstDataNotificationTransfer->getIdSchemeTransaction(), $response->getIdSchemeTransaction()); |
|
57
|
|
|
$this->assertEquals($firstDataNotificationTransfer->getOid(), $response->getOid()); |
|
58
|
|
|
$this->assertEquals($firstDataNotificationTransfer->getApprovalCode(), $response->getApprovalCode()); |
|
59
|
|
|
$this->assertEquals($firstDataNotificationTransfer->getPaymentToken(), $response->getPaymentToken()); |
|
60
|
|
|
$this->assertEquals($firstDataNotificationTransfer->getChargeTotal(), $response->getChargeTotal()); |
|
61
|
|
|
$this->assertEquals($firstDataNotificationTransfer->getTxnType(), $response->getTxnType()); |
|
62
|
|
|
$this->assertEquals($firstDataNotificationTransfer->getTxnDateTime(), $response->getTxnDateTime()); |
|
63
|
|
|
$this->assertEquals($firstDataNotificationTransfer->getTimezone(), $response->getTimezone()); |
|
64
|
|
|
$this->assertEquals($firstDataNotificationTransfer->getCurrency(), $response->getCurrency()); |
|
65
|
|
|
} |
|
66
|
|
|
} |
|
67
|
|
|
|
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