Passed
Push — feature/eco-3047/eco-3049-invo... ( e2d4f4...a8a84e )
by Volodymyr
06:36
created

InvoiceSecuredB2CSubForm::getName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
dl 0
loc 3
c 1
b 0
f 0
rs 10
cc 1
nc 1
nop 0
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\Yves\Heidelpay\Form;
9
10
use Spryker\Yves\StepEngine\Dependency\Form\AbstractSubFormType;
11
use Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface;
12
use Spryker\Yves\StepEngine\Dependency\Form\SubFormProviderNameInterface;
13
use SprykerEco\Shared\Heidelpay\HeidelpayConfig;
14
15
class InvoiceSecuredB2CSubForm extends AbstractSubFormType implements SubFormInterface, SubFormProviderNameInterface
16
{
17
    protected const PAYMENT_METHOD_TEMPLATE_PATH = 'invoice-secured-b2c';
18
19
    /**
20
     * @return string
21
     */
22
    public function getProviderName()
23
    {
24
        return HeidelpayConfig::PROVIDER_NAME;
25
    }
26
27
    /**
28
     * @return string
29
     */
30
    public function getName(): string
31
    {
32
        return HeidelpayConfig::PAYMENT_METHOD_INVOICE_SECURED_B2C;
33
    }
34
35
    /**
36
     * Specifies the property name of the payment transfer object to access the default form data.
37
     * Form data will be obtained from QuoteTransfer->getPayment()->getHeidelpaySofort()
38
     *
39
     * @return string
40
     */
41
    public function getPropertyPath(): string
42
    {
43
        return HeidelpayConfig::PAYMENT_METHOD_INVOICE_SECURED_B2C;
44
    }
45
46
    /**
47
     * Path to the form template
48
     *
49
     * @return string
50
     */
51
    public function getTemplatePath(): string
52
    {
53
        return HeidelpayConfig::PROVIDER_NAME . DIRECTORY_SEPARATOR . static::PAYMENT_METHOD_TEMPLATE_PATH;
54
    }
55
}
56