Completed
Push — master ( db937b...bb9c1e )
by Tim
14:24
created

PaymentService   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 3
dl 0
loc 23
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getPaymentPossibilities() 0 9 1
1
<?php
2
/**
3
 * PaymentService
4
 *
5
 * @author  Tim Lochmüller
6
 */
7
8
namespace FRUIT\Shopize\Service;
9
10
use FRUIT\Shopize\Utility\ComposerUtility;
11
use Omnipay\Omnipay;
12
use TYPO3\CMS\Extbase\Utility\DebuggerUtility;
13
14
/**
15
 * PaymentService
16
 */
17
class PaymentService
18
{
19
20
    /**
21
     * PaymentService constructor.
22
     */
23
    public function __construct()
24
    {
25
        ComposerUtility::checkContribLibs();
26
        // @todo check SSL connection here and drop a error (disable for debugging)
27
    }
28
29
    public function getPaymentPossibilities()
30
    {
31
        $gatewayFactory = Omnipay::getFactory();
32
33
        return [
34
            $gatewayFactory->create('Dummy'),
35
            $gatewayFactory->create('PayPal_Express'),
36
        ];
37
    }
38
39
}
40