1 | <?php |
||
26 | class PayButton extends \yii\base\Widget |
||
27 | { |
||
28 | const EVENT_RENDER_COMMENT = 'renderComment'; |
||
29 | |||
30 | /** |
||
31 | * @var PurchaseRequest |
||
32 | */ |
||
33 | public $request; |
||
34 | |||
35 | /** |
||
36 | * @var DepositForm |
||
37 | */ |
||
38 | public $depositForm; |
||
39 | |||
40 | /** |
||
41 | * @var array|string the URL for action |
||
42 | */ |
||
43 | public $action = ['/merchant/pay/request']; |
||
44 | |||
45 | /** |
||
46 | * {@inheritdoc} |
||
47 | */ |
||
48 | public function init() |
||
54 | |||
55 | protected function registerMerchantCss() |
||
64 | |||
65 | /** |
||
66 | * {@inheritdoc} |
||
67 | */ |
||
68 | public function run() |
||
72 | |||
73 | /** |
||
74 | * Renders the payment button. |
||
75 | * |
||
76 | * @return string |
||
77 | */ |
||
78 | public function renderButton() |
||
92 | |||
93 | /** |
||
94 | * Extracts merchant name from the [[request]]. |
||
95 | * @return string |
||
96 | */ |
||
97 | public function getMerchantName() |
||
101 | |||
102 | /** |
||
103 | * Extracts merchant system from the [[request]]. |
||
104 | * @return string |
||
105 | */ |
||
106 | public function getMerchantSystem() |
||
110 | |||
111 | public function getTotalCommission() |
||
115 | |||
116 | public function includesVat(): bool |
||
120 | |||
121 | public function getVatRate(): float |
||
125 | |||
126 | public function getVatSum(): float |
||
130 | |||
131 | public function getButtonData() |
||
135 | |||
136 | /** |
||
137 | * Renders the button comment. Normally triggers [[EVENT_RENDER_COMMENT]] event. |
||
138 | */ |
||
139 | public function renderButtonComment() |
||
143 | |||
144 | public function formatMoney($sum) |
||
160 | |||
161 | public function isDisabled() |
||
165 | } |
||
166 |