Skip to content

Commit

Permalink
Merge pull request #5 from unitpay/domains
Browse files Browse the repository at this point in the history
Added domains support
  • Loading branch information
2Garin authored Mar 11, 2020
2 parents d7109db + bc80786 commit 5f0142c
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 24 deletions.
Binary file modified unitpay/lang/unitpay-ru_RU.mo
100644 → 100755
Binary file not shown.
54 changes: 31 additions & 23 deletions unitpay/lang/unitpay-ru_RU.po
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,99 +1,107 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: 2016-12-22 17:42+0300\n"
"PO-Revision-Date: 2016-12-22 17:42+0300\n"
"POT-Creation-Date: 2020-03-11 15:37+0300\n"
"PO-Revision-Date: 2020-03-11 15:37+0300\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: ru_RU\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.8.11\n"
"X-Generator: Poedit 2.3\n"
"X-Poedit-Basepath: ..\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-KeywordsList: __;_e\n"
"X-Poedit-SearchPath-0: unitpay.php\n"

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

#: unitpay.php:54
#: unitpay.php:57
msgid "UNITPAY"
msgstr "UNITPAY"

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

#: unitpay.php:71
#: unitpay.php:74
msgid "Enable/Disable"
msgstr "Включить/Выключить"

#: unitpay.php:73
#: unitpay.php:76
msgid "Enabled"
msgstr "Включен"

#: unitpay.php:77
#: unitpay.php:80
msgid "DOMAIN"
msgstr "DOMAIN"

#: unitpay.php:82
msgid "Insert your working DOMAIN"
msgstr "Вставьте ваш рабочий домен"

#: unitpay.php:86
msgid "PUBLIC KEY"
msgstr "PUBLIC KEY"

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

#: unitpay.php:83
#: unitpay.php:92
msgid "SECRET KEY"
msgstr "SECRET KEY"

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

#: unitpay.php:100
#: unitpay.php:109
msgid "Payment for Order №"
msgstr "Оплата по заказу №"

#: unitpay.php:107
#: unitpay.php:129
msgid "Pay"
msgstr "Оплатить"

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

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

#: unitpay.php:166
#: unitpay.php:188
msgid "Wrong method"
msgstr "Неверный метод"

#: unitpay.php:172
#: unitpay.php:194
msgid "Wrong signature"
msgstr "Неверная сигнатура"

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

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

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

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

#: unitpay.php:273
#: unitpay.php:295
msgid "Payment error"
msgstr "Ошибка оплаты"
9 changes: 8 additions & 1 deletion unitpay/unitpay.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public function __construct(){
$this->init_settings();

// Define user set variables
$this->domain = $this->get_option('domain');
$this->public_key = $this->get_option('public_key');
$this->secret_key = $this->get_option('secret_key');
$this->title = 'Unitpay';
Expand Down Expand Up @@ -75,6 +76,12 @@ function init_form_fields(){
'label' => __('Enabled', 'unitpay'),
'default' => 'yes'
),
'domain' => array(
'title' => __('DOMAIN', 'unitpay'),
'type' => 'text',
'description' => __('Insert your working DOMAIN', 'unitpay'),
'default' => ''
),
'public_key' => array(
'title' => __('PUBLIC KEY', 'unitpay'),
'type' => 'text',
Expand Down Expand Up @@ -112,7 +119,7 @@ public function generate_form($order_id){
)));

return
'<form action="https://unitpay.ru/pay/' . $this->public_key . '" method="POST" id="unitpay_form">'.
'<form action="https://' . $this->domain . '/pay/' . $this->public_key . '" method="POST" id="unitpay_form">'.
'<input type="hidden" name="sum" value="' . $sum . '" />'.
'<input type="hidden" name="account" value="' . $account . '" />'.
'<input type="hidden" name="desc" value="' . $desc . '" />'.
Expand Down

0 comments on commit 5f0142c

Please sign in to comment.