Merge pull request #45 from cryptochangements34/master

fix payment id with QR codes
This commit is contained in:
cryptochangements34 2018-01-30 20:47:26 -05:00 committed by GitHub
commit 10996fe71d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -322,7 +322,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 :) // If there isn't address (merchant missed that field!), $address will be the Monero address for donating :)
$address = "44AFFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft3XjrpDtQGv7SqSsaBYBb98uNbr2VBBEt7f2wfn3RVGQBEP3A"; $address = "44AFFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft3XjrpDtQGv7SqSsaBYBb98uNbr2VBBEt7f2wfn3RVGQBEP3A";
} }
$uri = "monero:$address?amount=$amount?payment_id=$payment_id"; $uri = "monero:$address?tx_payment_id=$payment_id";
if($this->zero_confirm){ if($this->zero_confirm){
$this->verify_zero_conf($payment_id, $amount, $order_id); $this->verify_zero_conf($payment_id, $amount, $order_id);
@ -401,7 +401,7 @@ class Monero_Gateway extends WC_Payment_Gateway
$currency = $order->get_currency(); $currency = $order->get_currency();
$amount_xmr2 = $this->changeto($amount, $currency, $payment_id); $amount_xmr2 = $this->changeto($amount, $currency, $payment_id);
$uri = "monero:$address?amount=$amount?payment_id=$payment_id"; $uri = "monero:$address?tx_payment_id=$payment_id";
$array_integrated_address = $this->monero_daemon->make_integrated_address($payment_id); $array_integrated_address = $this->monero_daemon->make_integrated_address($payment_id);
if (!isset($array_integrated_address)) { if (!isset($array_integrated_address)) {
$this->log->add('Monero_Gateway', '[ERROR] Unable get integrated address'); $this->log->add('Monero_Gateway', '[ERROR] Unable get integrated address');