1 | <?php |
||
18 | class OmnipayMerchant extends AbstractMerchant |
||
19 | { |
||
20 | public $library = 'Omnipay'; |
||
21 | |||
22 | /** |
||
23 | * @var \Omnipay\Common\GatewayInterface omnipay Gateway object |
||
24 | */ |
||
25 | protected $_worker; |
||
26 | |||
27 | /** |
||
28 | * @return \Omnipay\Common\GatewayInterface |
||
29 | */ |
||
30 | public function getWorker() |
||
38 | |||
39 | /** |
||
40 | * Returns the normalized gateway name that should be used to create a worker. |
||
41 | * |
||
42 | * @param string $name |
||
43 | * @return string |
||
44 | * @see normalizeGateway |
||
45 | */ |
||
46 | public function getGatewayNamespacePart($name = null) |
||
47 | { |
||
48 | if (!isset($name)) { |
||
49 | $name = $this->gateway; |
||
50 | } |
||
51 | |||
52 | return $this->normalizeGateway($name); |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | * Normalizes gateway $name. |
||
57 | * |
||
58 | * @param $name |
||
59 | * @return string |
||
60 | */ |
||
61 | public function normalizeGateway($name) |
||
71 | |||
72 | public static $_gateways = [ |
||
73 | 'eCoin', 'ePayments', 'ePayService', 'InterKassa', 'OKPAY', 'Qiwi', |
||
74 | 'Paxum', 'PayPal', 'RoboKassa', 'WebMoney', 'YandexMoney', |
||
75 | ]; |
||
76 | |||
77 | public static function setGateways($gateways) |
||
81 | |||
82 | /** |
||
83 | * No prepare by default. |
||
84 | * To be redefined in specific gateway merchants. |
||
85 | */ |
||
86 | public function prepareData(array $data) |
||
90 | } |
||
91 |