PaymentService::getPaymentPossibilities()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
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
13
/**
14
 * PaymentService
15
 */
16
class PaymentService
17
{
18
19
    /**
20
     * PaymentService constructor.
21
     */
22
    public function __construct()
23
    {
24
        ComposerUtility::checkContribLibs();
25
26
        // @todo check SSL connection here and drop a error (disable for debugging)
27
    }
28
29
    /**
30
     * Get payment possibilities
31
     *
32
     * @return array
33
     */
34
    public function getPaymentPossibilities()
35
    {
36
        $gatewayFactory = Omnipay::getFactory();
37
38
        return [
39
            $gatewayFactory->create('Dummy'),
40
            $gatewayFactory->create('PayPal_Express'),
41
        ];
42
    }
43
}
44