This repository has been archived by the owner on May 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathPaymentType.php
74 lines (68 loc) · 1.99 KB
/
PaymentType.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
namespace Hochstrasser\Wirecard\Model\Common;
/**
* The parameter paymentType contains the value of the payment method the user
* selected in your online shop.
*
* Please be aware that you can only use those payment methods you have purchased
* and enabled by Wirecard.
*
* @author Christoph Hochstrasser <christoph@hochstrasser.io>
*/
abstract class PaymentType
{
/**
* @var array
*/
private static $constants;
/**
* The consumer may select one of the activated payment methods directly in
* Wirecard Checkout Page. Please note that SELECT is only available for
* Wirecard Checkout Page.
*/
const Select = 'SELECT';
const BancontactMisterCash = 'BANCONTACT_MISTERCASH';
const CreditCard = 'CCARD';
const CreditCardMailOrderAndTelephoneOrder = 'CCARD-MOTO';
const eKonto = 'EKONTO';
const ePayBg = 'EPAY_BG';
const EPS = 'EPS';
const giropay = 'GIROPAY';
const iDEAL = 'IDL';
const Installment = 'INSTALLMENT';
const Invoice = 'INVOICE';
const monetaRu = 'MONETA';
const mpass = 'MPASS';
const Przelewy24 = 'PRZELEWY24';
const PayPal = 'PAYPAL';
const paybox = 'PBX';
const POLi = 'POLI';
const paysafecard = 'PSC';
const Quick = 'QUICK';
const SEPADirectDebit = 'SEPA-DD';
const SkrillDirect = 'SKRILLDIRECT';
const SkrillDigitalWallet = 'SKRILLWALLET';
const SOFORTBanking = 'SOFORTUEBERWEISUNG';
const TatraPay = 'TATRAPAY';
const Trustly = 'TRUSTLY';
const TrustPay = 'TRUSTPAY';
const MyVoucher = 'VOUCHER';
/**
* @param string $paymentType
* @return bool
*/
static function isValid($paymentType)
{
return in_array($paymentType, static::getValues(), true);
}
/**
* @return array
*/
static function getValues()
{
if (null === static::$constants) {
static::$constants = (new \ReflectionClass(get_called_class()))->getConstants();
}
return static::$constants;
}
}