Skip to content

Commit

Permalink
Merge pull request #1 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 6cf84a5 + 01ff17e commit 939d0e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Unitpay/Unitpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ public function checkout_form($order_id, $button_text = null)
// номер заказа
$order_id = $order->id;

$domain = $payment_settings['domain'];
$public_key = $payment_settings['public_key'];
$account = $order_id;
$sum = $amount;
$desc = 'Оплата по заказу №' . $order_id;

$button = '<form name="unitpay" action="https://unitpay.ru/pay/' . $public_key . '" method="get">
$button = '<form name="unitpay" action="https://' . $domain . '/pay/' . $public_key . '" method="get">
<input type="hidden" name="sum" value="' . $sum . '">
<input type="hidden" name="account" value="' . $account . '">
<input type="hidden" name="desc" value="' . $desc . '">
Expand Down
4 changes: 4 additions & 0 deletions Unitpay/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
<name>
Unitpay
</name>
<settings>
<variable>domain</variable>
<name>DOMAIN</name>
</settings>
<settings>
<variable>public_key</variable>
<name>PUBLIC KEY</name>
Expand Down

0 comments on commit 939d0e5

Please sign in to comment.