GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Eci::__toString()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Ogone\DirectLink;
4
5
/**
6
 * Class Eci
7
 *
8
 * Electronic Commerce Indicator. The ECI indicates the security level at which the payment information is processed between the cardholder and merchant.
9
 * A default ECI value can be set in the Technical Information page. An ECI value sent along in the transaction, will overwrite the default ECI value.
10
 * It is the merchant's responsibility to give correct ECI values for the transactions. For e-Commerce, our system sets ECI value 5, 6 or 7 depending on the 3-D Secure authentication result.
11
 */
12
class Eci
13
{
14
    /** The merchant took the customer's credit card and swiped it through a machine that read the magnetic strip data of the card. */
15
    const SWIPED = 0;
16
17
    /** The merchant received the customer's financial details over the phone or via fax/mail, but does not have the customer's card at hand. */
18
    const MANUALLY_KEYED = 1;
19
20
    /** The customer's first transaction was a Mail Order / Telephone Order transaction, i.e. the customer gave his financial details over the phone or via mail/fax to the merchant. The merchant either stored the details himself or had these details stored in our system using an Alias and is performing another transaction for the same customer (recurring transaction). */
21
    const RECURRENT_MOTO = 2;
22
23
    /** Partial payment of goods/services that have already been delivered, but will be paid for in several spread payments. */
24
    const INSTALLMENT_PAYMENTS = 3;
25
26
    /** The customer is physically present in front of the merchant. The merchant has the customer's card at hand. The card details are manually entered, the card is not swiped through a machine. */
27
    const MANUALLY_KEYED_CARD_PRESENT = 4;
28
29
    /** The cardholder's 3-D Secure identification was successful, i.e. there was a full authentication. (Full thumbs up) */
30
    const CARDHOLDER_IDENTIFICATION_SUCCESSFUL = 5;
31
32
    /** Merchant supports identification but not cardholder, The merchant has a 3-D Secure contract, but the cardholder's card is not 3-D Secure or is 3-D Secure but the cardholder is not yet in possession of the PIN (Half thumbs up). Conditional payment guarantee rules apply. */
33
    const MERCHANT_IDENTIFICATION_3DSECURE = 6;
34
35
    /** The merchant received the customer's financial details via a secure (SSL encrypted) website (either the merchant's website or our secure platform). */
36
    const ECOMMERCE_WITH_SSL = 7;
37
38
    /** The customer's first transaction was an e-Commerce transaction, i.e. the customer entered his financial details himself on a secure website (either the merchant's website or our secure platform). The merchant either stored the details himself or had these details stored in our system using an Alias and is now performing another transaction for the same customer (recurring transaction), using the Alias details. */
39
    const ECOMMERCE_RECURRING = 9;
40
41
    /** @var int */
42
    protected $code;
43
44
    public function __construct($eciCode)
45
    {
46
        $this->code = $eciCode;
47
    }
48
49
    public function __toString()
50
    {
51
        return (string) $this->code;
52
    }
53
}
54