Commit b2f812d 1 parent 7b08f4b commit b2f812d Copy full SHA for b2f812d
File tree 1 file changed +52
-0
lines changed
1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change 15
15
16
16
class DataApi
17
17
{
18
+ /**
19
+ * @var Tp\MerchantConfig
20
+ */
18
21
protected $ config ;
19
22
20
23
function __construct (Tp \MerchantConfig $ config )
@@ -31,6 +34,55 @@ public function getPaymentMethods($onlyActive = TRUE)
31
34
return Tp \Helper \DataApi::getPaymentMethods ($ this ->config , $ onlyActive );
32
35
}
33
36
37
+ /**
38
+ * @param Tp\DataApi\MerchantAccountMethod $method
39
+ * @return null|string
40
+ */
41
+ public function getPaymentMethodIcon (Tp \DataApi \MerchantAccountMethod $ method )
42
+ {
43
+ switch ($ method ->getName ()) {
44
+ case 'Platba kartou ' :
45
+ $ file = 'muzo ' ;
46
+ break ;
47
+ case 'Platba 24 ' :
48
+ $ file = 'platba24 ' ;
49
+ break ;
50
+ case 'MojePlatba ' :
51
+ $ file = 'moje-platba ' ;
52
+ break ;
53
+ case 'eKonto ' :
54
+ $ file = 'ekonto ' ;
55
+ break ;
56
+ case 'mPeníze ' :
57
+ $ file = 'mpenize ' ;
58
+ break ;
59
+ case 'Ge Money ' :
60
+ $ file = 'gemoney ' ;
61
+ break ;
62
+ case 'ČSOB ' :
63
+ $ file = 'csob ' ;
64
+ break ;
65
+ case 'Fio banka ' :
66
+ $ file = 'fio ' ;
67
+ break ;
68
+ case 'Jiná banka ' :
69
+ $ file = 'transfer ' ;
70
+ break ;
71
+ case 'SuperCash ' :
72
+ $ file = 'super-cash ' ;
73
+ break ;
74
+ case 'FerBuy ' :
75
+ $ file = 'ferbuy ' ;
76
+ break ;
77
+
78
+ default :
79
+
80
+ return NULL ;
81
+ }
82
+
83
+ return $ this ->config ->gateUrl . 'radiobuttons/style/icons/ ' . $ file . '.png ' ;
84
+ }
85
+
34
86
/**
35
87
* @param string $paymentId
36
88
* @return Tp\DataApi\GetPaymentResponse
You can’t perform that action at this time.
0 commit comments