\Heidelpay\Tests\PhpPaymentApi\Unit\PaymentMethodsEasyCreditPaymentMethodTest

This test class verifies the special functionality of the EasyCreditPaymentMethod not covered in GenericPaymentMethodTest and PaymentMethodTransactionTest.

There is no actual communication to the server since the curl adapter is being mocked.

Summary

Methods
Properties
Constants
__construct()
getAdapterMock()
getLogger()
_before()
_after()
initializeParametersShouldBeSetUpAsExpected()
No public properties found
REFERENCE_ID
REDIRECT_URL
RESPONSE_URL
PAYMENT_FRAME_ORIGIN
CSS_PATH
TEST_AMOUNT
NAME_COMPANY
PAYMENT_METHOD_SHORT
getMethod()
mockCurlAdapter()
getTimestampString()
arraysMatchExactly()
getPaymentObject()
log()
success()
logDataToDebug()
$authentication
$customerData
$paymentObject
$holder
$currency
$secret
$cartNumber
$cardBrand
$cardVerification
$cardExpiryMonth
$cardExpiryYear
N/A
No private methods found
$logger
$adapterMock
N/A

Constants

REFERENCE_ID

REFERENCE_ID = 'http://www.heidelpay.com'

REDIRECT_URL

REDIRECT_URL = 'http://dev.heidelpay.com'

RESPONSE_URL

RESPONSE_URL = self::REDIRECT_URL . '/response'

PAYMENT_FRAME_ORIGIN

PAYMENT_FRAME_ORIGIN = self::REFERENCE_ID

CSS_PATH

CSS_PATH = self::REFERENCE_ID

TEST_AMOUNT

TEST_AMOUNT = 23.12

NAME_COMPANY

NAME_COMPANY = 'DevHeidelpay'

PAYMENT_METHOD_SHORT

PAYMENT_METHOD_SHORT = 'HP'

Properties

$paymentObject

$paymentObject : \Heidelpay\PhpPaymentApi\PaymentMethods\CreditCardPaymentMethod|\Heidelpay\PhpPaymentApi\PaymentMethods\DebitCardPaymentMethod|\Heidelpay\PhpPaymentApi\PaymentMethods\DirectDebitB2CSecuredPaymentMethod|\Heidelpay\PhpPaymentApi\PaymentMethods\DirectDebitPaymentMethod|\Heidelpay\PhpPaymentApi\PaymentMethods\EasyCreditPaymentMethod|\Heidelpay\PhpPaymentApi\PaymentMethods\EPSPaymentMethod|\Heidelpay\PhpPaymentApi\PaymentMethods\GiropayPaymentMethod|\Heidelpay\PhpPaymentApi\PaymentMethods\IDealPaymentMethod|\Heidelpay\PhpPaymentApi\PaymentMethods\InvoiceB2CSecuredPaymentMethod|\Heidelpay\PhpPaymentApi\PaymentMethods\InvoicePaymentMethod|\Heidelpay\PhpPaymentApi\PaymentMethods\PayPalPaymentMethod|\Heidelpay\PhpPaymentApi\PaymentMethods\PostFinanceCardPaymentMethod|\Heidelpay\PhpPaymentApi\PaymentMethods\PostFinanceEFinancePaymentMethod|\Heidelpay\PhpPaymentApi\PaymentMethods\PrepaymentPaymentMethod|\Heidelpay\PhpPaymentApi\PaymentMethods\Przelewy24PaymentMethod|\Heidelpay\PhpPaymentApi\PaymentMethods\SantanderInvoicePaymentMethod|\Heidelpay\PhpPaymentApi\PaymentMethods\SofortPaymentMethod

Type

\Heidelpay\PhpPaymentApi\PaymentMethods\CreditCardPaymentMethod|\Heidelpay\PhpPaymentApi\PaymentMethods\DebitCardPaymentMethod|\Heidelpay\PhpPaymentApi\PaymentMethods\DirectDebitB2CSecuredPaymentMethod|\Heidelpay\PhpPaymentApi\PaymentMethods\DirectDebitPaymentMethod|\Heidelpay\PhpPaymentApi\PaymentMethods\EasyCreditPaymentMethod|\Heidelpay\PhpPaymentApi\PaymentMethods\EPSPaymentMethod|\Heidelpay\PhpPaymentApi\PaymentMethods\GiropayPaymentMethod|\Heidelpay\PhpPaymentApi\PaymentMethods\IDealPaymentMethod|\Heidelpay\PhpPaymentApi\PaymentMethods\InvoiceB2CSecuredPaymentMethod|\Heidelpay\PhpPaymentApi\PaymentMethods\InvoicePaymentMethod|\Heidelpay\PhpPaymentApi\PaymentMethods\PayPalPaymentMethod|\Heidelpay\PhpPaymentApi\PaymentMethods\PostFinanceCardPaymentMethod|\Heidelpay\PhpPaymentApi\PaymentMethods\PostFinanceEFinancePaymentMethod|\Heidelpay\PhpPaymentApi\PaymentMethods\PrepaymentPaymentMethod|\Heidelpay\PhpPaymentApi\PaymentMethods\Przelewy24PaymentMethod|\Heidelpay\PhpPaymentApi\PaymentMethods\SantanderInvoicePaymentMethod|\Heidelpay\PhpPaymentApi\PaymentMethods\SofortPaymentMethod

$holder

$holder : string

Account holder

Type

string

$currency

$currency : string

Transaction currency

Type

string

$secret

$secret : string

Secret

The secret will be used to generate a hash using transaction id + secret. This hash can be used to verify the the payment response. Can be used for brute force protection.

Type

string

$cartNumber

$cartNumber : string

Card number Do not use real card information for this test. For more details read the information on top of this test class.

Type

string

$cardBrand

$cardBrand : string

Card brand Do not use real card information for this test. For more details read the information on top of this test class.

Type

string

$cardVerification

$cardVerification : string

Card verification Do not use real card information for this test. For more details read the information on top of this test class.

Type

string

$cardExpiryMonth

$cardExpiryMonth : string

Card expiry month

Type

string

$cardExpiryYear

$cardExpiryYear : string

Card expiry year

Type

string

$logger

$logger : \Codeception\Lib\Console\Output

Type

\Codeception\Lib\Console\Output

$adapterMock

$adapterMock : \AspectMock\Proxy\InstanceProxy

Type

\AspectMock\Proxy\InstanceProxy

Methods

__construct()

__construct(null  $name = null, array  $data = array(), string  $dataName = '') 

BasePaymentMethodTest constructor.

Parameters

null $name
array $data
string $dataName

getAdapterMock()

getAdapterMock() : \AspectMock\Proxy\InstanceProxy

Returns

\AspectMock\Proxy\InstanceProxy

getLogger()

getLogger() : \Codeception\Lib\Console\Output

Returns

\Codeception\Lib\Console\Output

_before()

_before() 

_after()

_after() 

initializeParametersShouldBeSetUpAsExpected()

initializeParametersShouldBeSetUpAsExpected() 

Verify initialize parameters generated as expected

getMethod()

getMethod(string  $method) : string

Get currently called method, without namespace

Parameters

string $method

Returns

string —

class and method

getTimestampString()

getTimestampString() : string

Returns

string

getPaymentObject()

getPaymentObject() : mixed

Returns

mixed

log()

log(  $message) 

Writes a message to the console.

Parameters

$message

success()

success() 

logDataToDebug()

logDataToDebug(mixed  $result = null) 

Print debug data to codecept console (codecept run integration --debug) Pass result data if send has been called manually.

Parameters

mixed $result