From 9e924a1a61c3b19a5a4c2616dcc44fb547e5076e Mon Sep 17 00:00:00 2001 From: pitifultermite <38870971+pitifultermite@users.noreply.github.com> Date: Tue, 1 May 2018 02:01:02 +0200 Subject: [PATCH] Update monero_payments.php --- monero/include/monero_payments.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/monero/include/monero_payments.php b/monero/include/monero_payments.php index ab060eb..87014f0 100644 --- a/monero/include/monero_payments.php +++ b/monero/include/monero_payments.php @@ -356,8 +356,7 @@ class Monero_Gateway extends WC_Payment_Gateway // If there isn't address (merchant missed that field!), $address will be the Monero address for donating :) $address = "44AFFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft3XjrpDtQGv7SqSsaBYBb98uNbr2VBBEt7f2wfn3RVGQBEP3A"; } - $uri = "monero:$address?tx_payment_id=$payment_id"; - + $uri = urlencode("monero:".$address."?tx_amount=".$amount_xmr2."&tx_payment_id=".$payment_id); if($this->zero_confirm){ $this->verify_zero_conf($payment_id, $amount_xmr2, $order_id); } @@ -440,7 +439,7 @@ class Monero_Gateway extends WC_Payment_Gateway $order->update_meta_data( "Amount requested (XMR)", $amount_xmr2); $order->save(); - $uri = "monero:$address?tx_payment_id=$payment_id"; + $uri = urlencode("monero:".$address."?tx_amount=".$amount_xmr2."&tx_payment_id=".$payment_id); $array_integrated_address = $this->monero_daemon->make_integrated_address($payment_id); if (!isset($array_integrated_address)) { $this->log->add('Monero_Gateway', '[ERROR] Unable get integrated address');