forked from larabook/gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEnum.php
58 lines (49 loc) · 1.58 KB
/
Enum.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
<?php
namespace Larabookir\Gateway;
class Enum
{
const MELLAT = 'MELLAT';
const SADAD = 'SADAD';
const ZARINPAL = 'ZARINPAL';
const PAYLINE = 'PAYLINE';
const JAHANPAY = 'JAHANPAY';
const PARSIAN = 'PARSIAN';
const PASARGAD = 'PASARGAD';
const SAMAN = 'SAMAN';
const ASANPARDAKHT = 'ASANPARDAKHT';
const PAYPAL = 'PAYPAL';
const PAYIR = 'PAYIR';
const IRANKISH = 'IRANKISH';
const MASKAN = self::IRANKISH;
static function getIPGs(){
$reflect = new \ReflectionClass(static::class);
$excepts=[
'MASKAN',
'TRANSACTION_INIT',
'TRANSACTION_INIT_TEXT',
'TRANSACTION_SUCCEED',
'TRANSACTION_SUCCEED_TEXT',
'TRANSACTION_FAILED',
'TRANSACTION_FAILED_TEXT',
];
if(function_exists('array_except'))
return array_values(array_except($reflect->getConstants(),$excepts));
else
return array_values(\Illuminate\Support\Arr::except($reflect->getConstants(),$excepts));
}
/**
* Status code for status field in poolport_transactions table
*/
const TRANSACTION_INIT = 'INIT';
const TRANSACTION_INIT_TEXT = 'تراکنش ایجاد شد.';
/**
* Status code for status field in poolport_transactions table
*/
const TRANSACTION_SUCCEED = 'SUCCEED';
const TRANSACTION_SUCCEED_TEXT = 'پرداخت با موفقیت انجام شد.';
/**
* Status code for status field in poolport_transactions table
*/
const TRANSACTION_FAILED = 'FAILED';
const TRANSACTION_FAILED_TEXT = 'عملیات پرداخت با خطا مواجه شد.';
}