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 SprykerEco\Glue\FirstData; |
9
|
|
|
|
10
|
|
|
use Spryker\Glue\Kernel\AbstractFactory; |
11
|
|
|
use SprykerEco\Glue\FirstData\Dependency\Service\FirstDataToUtilTextServiceInterface; |
12
|
|
|
use SprykerEco\Glue\FirstData\Processor\Mapper\FirstDataCreditCardParametersMapper; |
13
|
|
|
use SprykerEco\Glue\FirstData\Processor\Mapper\FirstDataCreditCardParametersMapperInterface; |
14
|
|
|
use SprykerEco\Glue\FirstData\Processor\Saver\FirstDataNotificationSaver; |
15
|
|
|
use SprykerEco\Glue\FirstData\Processor\Saver\FirstDataNotificationSaverInterface; |
16
|
|
|
use SprykerEco\Glue\FirstData\Validator\FirstDataPaymentValidator; |
17
|
|
|
use SprykerEco\Glue\FirstData\Validator\FirstDataPaymentValidatorInterface; |
18
|
|
|
|
19
|
|
|
/** |
20
|
|
|
* @method \SprykerEco\Glue\FirstData\FirstDataConfig getConfig() |
21
|
|
|
* @method \SprykerEco\Client\FirstData\FirstDataClient getClient() |
22
|
|
|
*/ |
23
|
|
|
class FirstDataFactory extends AbstractFactory |
24
|
|
|
{ |
25
|
|
|
/** |
26
|
|
|
* @return \SprykerEco\Glue\FirstData\Processor\Mapper\FirstDataCreditCardParametersMapperInterface |
27
|
|
|
*/ |
28
|
|
|
public function createFirstDataCreditCardParametersMapper(): FirstDataCreditCardParametersMapperInterface |
29
|
|
|
{ |
30
|
|
|
return new FirstDataCreditCardParametersMapper( |
31
|
|
|
$this->getConfig(), |
32
|
|
|
$this->getClient(), |
33
|
|
|
$this->getUtilTextService(), |
34
|
|
|
); |
35
|
|
|
} |
36
|
|
|
|
37
|
|
|
/** |
38
|
|
|
* @return \SprykerEco\Glue\FirstData\Dependency\Service\FirstDataToUtilTextServiceInterface |
39
|
|
|
*/ |
40
|
|
|
public function getUtilTextService(): FirstDataToUtilTextServiceInterface |
41
|
|
|
{ |
42
|
|
|
return $this->getProvidedDependency(FirstDataDependencyProvider::SERVICE_UTIL_TEXT); |
43
|
|
|
} |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* @return \SprykerEco\Glue\FirstData\Validator\FirstDataPaymentValidatorInterface |
47
|
|
|
*/ |
48
|
|
|
public function createFirstDataPaymentValidator(): FirstDataPaymentValidatorInterface |
49
|
|
|
{ |
50
|
|
|
return new FirstDataPaymentValidator(); |
51
|
|
|
} |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* @return \SprykerEco\Glue\FirstData\Processor\Saver\FirstDataNotificationSaverInterface |
55
|
|
|
*/ |
56
|
|
|
public function createFirstDataNotificationSaver(): FirstDataNotificationSaverInterface |
57
|
|
|
{ |
58
|
|
|
return new FirstDataNotificationSaver($this->getClient()); |
59
|
|
|
} |
60
|
|
|
} |
61
|
|
|
|