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

PaymentService::getPaymentPossibilities()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 9
rs 9.6666
cc 1
eloc 5
nc 1
nop 0
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