Skip to content

Commit 5f0142c

Browse files
authored
Merge pull request #5 from unitpay/domains
Added domains support
2 parents d7109db + bc80786 commit 5f0142c

3 files changed

Lines changed: 39 additions & 24 deletions

File tree

unitpay/lang/unitpay-ru_RU.mo

100644100755
87 Bytes
Binary file not shown.

unitpay/lang/unitpay-ru_RU.po

100644100755
Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,107 @@
11
msgid ""
22
msgstr ""
33
"Project-Id-Version: \n"
4-
"POT-Creation-Date: 2016-12-22 17:42+0300\n"
5-
"PO-Revision-Date: 2016-12-22 17:42+0300\n"
4+
"POT-Creation-Date: 2020-03-11 15:37+0300\n"
5+
"PO-Revision-Date: 2020-03-11 15:37+0300\n"
66
"Last-Translator: \n"
77
"Language-Team: \n"
88
"Language: ru_RU\n"
99
"MIME-Version: 1.0\n"
1010
"Content-Type: text/plain; charset=UTF-8\n"
1111
"Content-Transfer-Encoding: 8bit\n"
12-
"X-Generator: Poedit 1.8.11\n"
12+
"X-Generator: Poedit 2.3\n"
1313
"X-Poedit-Basepath: ..\n"
1414
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
1515
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
1616
"X-Poedit-SourceCharset: UTF-8\n"
1717
"X-Poedit-KeywordsList: __;_e\n"
1818
"X-Poedit-SearchPath-0: unitpay.php\n"
1919

20-
#: unitpay.php:38
20+
#: unitpay.php:41
2121
msgid "Payment system Unitpay"
2222
msgstr "Оплата платежной системой Unitpay"
2323

24-
#: unitpay.php:54
24+
#: unitpay.php:57
2525
msgid "UNITPAY"
2626
msgstr "UNITPAY"
2727

28-
#: unitpay.php:55
28+
#: unitpay.php:58
2929
msgid "Setup payments parameters."
3030
msgstr "Настройка приема электронных платежей Unitpay."
3131

32-
#: unitpay.php:71
32+
#: unitpay.php:74
3333
msgid "Enable/Disable"
3434
msgstr "Включить/Выключить"
3535

36-
#: unitpay.php:73
36+
#: unitpay.php:76
3737
msgid "Enabled"
3838
msgstr "Включен"
3939

40-
#: unitpay.php:77
40+
#: unitpay.php:80
41+
msgid "DOMAIN"
42+
msgstr "DOMAIN"
43+
44+
#: unitpay.php:82
45+
msgid "Insert your working DOMAIN"
46+
msgstr "Вставьте ваш рабочий домен"
47+
48+
#: unitpay.php:86
4149
msgid "PUBLIC KEY"
4250
msgstr "PUBLIC KEY"
4351

44-
#: unitpay.php:79
52+
#: unitpay.php:88
4553
msgid "Copy PUBLIC KEY from your account page in unitpay system"
4654
msgstr "Скопируйте PUBLIC KEY со страницы проекта в системе Unitpay"
4755

48-
#: unitpay.php:83
56+
#: unitpay.php:92
4957
msgid "SECRET KEY"
5058
msgstr "SECRET KEY"
5159

52-
#: unitpay.php:85
60+
#: unitpay.php:94
5361
msgid "Copy SECRET KEY from your account page in unitpay system"
5462
msgstr "Скопируйте SECRET KEY со страницы проекта в системе Unitpay"
5563

56-
#: unitpay.php:100
64+
#: unitpay.php:109
5765
msgid "Payment for Order №"
5866
msgstr "Оплата по заказу №"
5967

60-
#: unitpay.php:107
68+
#: unitpay.php:129
6169
msgid "Pay"
6270
msgstr "Оплатить"
6371

64-
#: unitpay.php:108
72+
#: unitpay.php:130
6573
msgid "Cancel payment and return back to card"
6674
msgstr "Отказаться от оплаты и вернуться в корзину"
6775

68-
#: unitpay.php:125
76+
#: unitpay.php:147
6977
msgid "Thank you for your order, press button to pay."
7078
msgstr ""
7179
"Спасибо за Ваш заказ, пожалуйста, нажмите кнопку ниже, чтобы заплатить."
7280

73-
#: unitpay.php:166
81+
#: unitpay.php:188
7482
msgid "Wrong method"
7583
msgstr "Неверный метод"
7684

77-
#: unitpay.php:172
85+
#: unitpay.php:194
7886
msgid "Wrong signature"
7987
msgstr "Неверная сигнатура"
8088

81-
#: unitpay.php:201 unitpay.php:234 unitpay.php:269
89+
#: unitpay.php:223 unitpay.php:256 unitpay.php:291
8290
msgid "Order not created"
8391
msgstr "Заказа не существует"
8492

85-
#: unitpay.php:210 unitpay.php:243
93+
#: unitpay.php:232 unitpay.php:265
8694
msgid "Wrong order sum"
8795
msgstr "Не совпадает сумма заказа"
8896

89-
#: unitpay.php:214 unitpay.php:247
97+
#: unitpay.php:236 unitpay.php:269
9098
msgid "Wrong order currency"
9199
msgstr "Не совпадает валюта заказа"
92100

93-
#: unitpay.php:219 unitpay.php:255 unitpay.php:275
101+
#: unitpay.php:241 unitpay.php:277 unitpay.php:297
94102
msgid "Request successfully"
95103
msgstr "Запрос успешно обработан"
96104

97-
#: unitpay.php:273
105+
#: unitpay.php:295
98106
msgid "Payment error"
99107
msgstr "Ошибка оплаты"

unitpay/unitpay.php

100644100755
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public function __construct(){
3434
$this->init_settings();
3535

3636
// Define user set variables
37+
$this->domain = $this->get_option('domain');
3738
$this->public_key = $this->get_option('public_key');
3839
$this->secret_key = $this->get_option('secret_key');
3940
$this->title = 'Unitpay';
@@ -75,6 +76,12 @@ function init_form_fields(){
7576
'label' => __('Enabled', 'unitpay'),
7677
'default' => 'yes'
7778
),
79+
'domain' => array(
80+
'title' => __('DOMAIN', 'unitpay'),
81+
'type' => 'text',
82+
'description' => __('Insert your working DOMAIN', 'unitpay'),
83+
'default' => ''
84+
),
7885
'public_key' => array(
7986
'title' => __('PUBLIC KEY', 'unitpay'),
8087
'type' => 'text',
@@ -112,7 +119,7 @@ public function generate_form($order_id){
112119
)));
113120

114121
return
115-
'<form action="https://unitpay.ru/pay/' . $this->public_key . '" method="POST" id="unitpay_form">'.
122+
'<form action="https://' . $this->domain . '/pay/' . $this->public_key . '" method="POST" id="unitpay_form">'.
116123
'<input type="hidden" name="sum" value="' . $sum . '" />'.
117124
'<input type="hidden" name="account" value="' . $account . '" />'.
118125
'<input type="hidden" name="desc" value="' . $desc . '" />'.

0 commit comments

Comments
 (0)