1 | <?php |
||
25 | class PayButton extends \yii\base\Widget |
||
26 | { |
||
27 | const EVENT_RENDER_COMMENT = 'renderComment'; |
||
28 | |||
29 | /** |
||
30 | * @var PurchaseRequest |
||
31 | */ |
||
32 | public $request; |
||
33 | |||
34 | /** |
||
35 | * @var DepositForm |
||
36 | */ |
||
37 | public $depositForm; |
||
38 | |||
39 | /** |
||
40 | * @var array|string the URL for action |
||
41 | */ |
||
42 | public $action = ['/merchant/pay/request']; |
||
43 | |||
44 | /** |
||
45 | * {@inheritdoc} |
||
46 | */ |
||
47 | public function init() |
||
53 | |||
54 | protected function registerMerchantCss() |
||
63 | |||
64 | /** |
||
65 | * {@inheritdoc} |
||
66 | */ |
||
67 | public function run() |
||
71 | |||
72 | /** |
||
73 | * Renders the payment button. |
||
74 | * |
||
75 | * @return string |
||
76 | */ |
||
77 | public function renderButton() |
||
89 | |||
90 | /** |
||
91 | * Extracts merchant name from the [[request]]. |
||
92 | * @return string |
||
93 | */ |
||
94 | public function getMerchantName() |
||
98 | |||
99 | public function getTotalCommission() |
||
103 | |||
104 | public function getButtonData() |
||
108 | |||
109 | /** |
||
110 | * Renders the button comment. Normally triggers [[EVENT_RENDER_COMMENT]] event. |
||
111 | */ |
||
112 | public function renderButtonComment() |
||
116 | |||
117 | public function formatMoney($sum) |
||
121 | |||
122 | public function isDisabled() |
||
126 | } |
||
127 |