Skip to content

Commit da391ca

Browse files
committed
opportunity change currency
1 parent 0265f8b commit da391ca

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

unitpay.zip

220 Bytes
Binary file not shown.

unitpay/unitpay.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
add_action('plugins_loaded', 'woocommerce_unitpay', 0);
1414
function woocommerce_unitpay(){
1515
load_plugin_textdomain( 'unitpay', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
16-
16+
1717
if (!class_exists('WC_Payment_Gateway'))
1818
return; // if the WC payment gateway class is not available, do nothing
1919
if(class_exists('WC_UNITPAY'))
@@ -100,12 +100,14 @@ public function generate_form($order_id){
100100
$sum = number_format($order->order_total, 2, '.', '');
101101
$account = $order_id;
102102
$desc = __('Payment for Order №', 'unitpay') . $order_id;
103+
$currency = $order->get_order_currency();
103104

104105
return
105106
'<form action="https://unitpay.ru/pay/' . $this->public_key . '" method="POST" id="unitpay_form">'.
106107
'<input type="hidden" name="sum" value="' . $sum . '" />'.
107108
'<input type="hidden" name="account" value="' . $account . '" />'.
108109
'<input type="hidden" name="desc" value="' . $desc . '" />'.
110+
'<input type="hidden" name="currency" value="' . $currency . '" />'.
109111
'<input type="submit" class="button alt" id="submit_unitpay_form" value="'.__('Pay', 'unitpay').'" />
110112
<a class="button cancel" href="'.$order->get_cancel_order_url().'">'.__('Cancel payment and return back to card', 'unitpay').'</a>'."\n".
111113
'</form>';

0 commit comments

Comments
 (0)