Giter Site home page Giter Site logo

monero-integrations / monerowp Goto Github PK

View Code? Open in Web Editor NEW
102.0 9.0 73.0 316 KB

Monero WooCommerce Plugin for Wordpress

License: MIT License

PHP 67.06% CSS 0.70% JavaScript 32.24%
monero-integrations monero monero-wallet monero-plugin wordpress wallet-rpc woocommerce monero-gateway wordpress-admin-panel

monerowp's Introduction

Monero Gateway for WooCommerce

Features

  • Payment validation done through either monero-wallet-rpc or the xmrchain.net blockchain explorer.
  • Validates payments with cron, so does not require users to stay on the order confirmation page for their order to validate.
  • Order status updates are done through AJAX instead of Javascript page reloads.
  • Customers can pay with multiple transactions and are notified as soon as transactions hit the mempool.
  • Configurable block confirmations, from 0 for zero confirm to 60 for high ticket purchases.
  • Live price updates every minute; total amount due is locked in after the order is placed for a configurable amount of time (default 60 minutes) so the price does not change after order has been made.
  • Hooks into emails, order confirmation page, customer order history page, and admin order details page.
  • View all payments received to your wallet with links to the blockchain explorer and associated orders.
  • Optionally display all prices on your store in terms of Monero.
  • Shortcodes! Display exchange rates in numerous currencies.

Requirements

  • Monero wallet to receive payments - GUI - CLI - Paper
  • BCMath - A PHP extension used for arbitrary precision maths

Installing the plugin

Automatic Method

In the "Add Plugins" section of the WordPress admin UI, search for "monero" and click the Install Now button next to "Monero WooCommerce Extension" by mosu-forge, SerHack. This will enable auto-updates, but only for official releases, so if you need to work from git master or your local fork, please use the manual method below.

Manual Method

  • Download the plugin from the releases page or clone with git clone https://github.com/monero-integrations/monerowp
  • Unzip or place the monero-woocommerce-gateway folder in the wp-content/plugins directory.
  • Activate "Monero Woocommerce Gateway" in your WordPress admin dashboard.
  • It is highly recommended that you use native cronjobs instead of WordPress's "Poor Man's Cron" by adding define('DISABLE_WP_CRON', true); into your wp-config.php file and adding * * * * * wget -q -O - https://yourstore.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1 to your crontab.

Option 1: Use your wallet address and viewkey

This is the easiest way to start accepting Monero on your website. You'll need:

  • Your Monero wallet address starting with 4
  • Your wallet's secret viewkey

Then simply select the viewkey option in the settings page and paste your address and viewkey. You're all set!

Note on privacy: when you validate transactions with your private viewkey, your viewkey is sent to (but not stored on) xmrchain.net over HTTPS. This could potentially allow an attacker to see your incoming, but not outgoing, transactions if they were to get his hands on your viewkey. Even if this were to happen, your funds would still be safe and it would be impossible for somebody to steal your money. For maximum privacy use your own monero-wallet-rpc instance.

Option 2: Using monero-wallet-rpc

The most secure way to accept Monero on your website. You'll need:

After downloading (or compiling) the Monero binaries on your server, install the systemd unit files or run monerod and monero-wallet-rpc with screen or tmux. You can skip running monerod by using a remote node with monero-wallet-rpc by adding --daemon-address node.moneroworld.com:18089 to the monero-wallet-rpc.service file.

Note on security: using this option, while the most secure, requires you to run the Monero wallet RPC program on your server. Best practice for this is to use a view-only wallet since otherwise your server would be running a hot-wallet and a security breach could allow hackers to empty your funds.

Configuration

  • Enable / Disable - Turn on or off Monero gateway. (Default: Disable)
  • Title - Name of the payment gateway as displayed to the customer. (Default: Monero Gateway)
  • Discount for using Monero - Percentage discount applied to orders for paying with Monero. Can also be negative to apply a surcharge. (Default: 0)
  • Order valid time - Number of seconds after order is placed that the transaction must be seen in the mempool. (Default: 3600 [1 hour])
  • Number of confirmations - Number of confirmations the transaction must recieve before the order is marked as complete. Use 0 for nearly instant confirmation. (Default: 5)
  • Confirmation Type - Confirm transactions with either your viewkey, or by using monero-wallet-rpc. (Default: viewkey)
  • Monero Address (if confirmation type is viewkey) - Your public Monero address starting with 4. (No default)
  • Secret Viewkey (if confirmation type is viewkey) - Your private viewkey (No default)
  • Monero wallet RPC Host/IP (if confirmation type is monero-wallet-rpc) - IP address where the wallet rpc is running. It is highly discouraged to run the wallet anywhere other than the local server! (Default: 127.0.0.1)
  • Monero wallet RPC port (if confirmation type is monero-wallet-rpc) - Port the wallet rpc is bound to with the --rpc-bind-port argument. (Default 18080)
  • Testnet - Check this to change the blockchain explorer links to the testnet explorer. (Default: unchecked)
  • SSL warnings - Check this to silence SSL warnings. (Default: unchecked)
  • Show QR Code - Show payment QR codes. (Default: unchecked)
  • Show Prices in Monero - Convert all prices on the frontend to Monero. Experimental feature, only use if you do not accept any other payment option. (Default: unchecked)
  • Display Decimals (if show prices in Monero is enabled) - Number of decimals to round prices to on the frontend. The final order amount will not be rounded and will be displayed down to the nanoMonero. (Default: 12)

Shortcodes

This plugin makes available two shortcodes that you can use in your theme.

Live price shortcode

This will display the price of Monero in the selected currency. If no currency is provided, the store's default currency will be used.

[monero-price]
[monero-price currency="BTC"]
[monero-price currency="USD"]
[monero-price currency="CAD"]
[monero-price currency="EUR"]
[monero-price currency="GBP"]

Will display:

1 XMR = 123.68000 USD
1 XMR = 0.01827000 BTC
1 XMR = 123.68000 USD
1 XMR = 168.43000 CAD
1 XMR = 105.54000 EUR
1 XMR = 94.84000 GBP

Monero accepted here badge

This will display a badge showing that you accept Monero-currency.

[monero-accepted-here]

Monero Accepted Here

Donations

monero-integrations: 44krVcL6TPkANjpFwS2GWvg1kJhTrN7y9heVeQiDJ3rP8iGbCd5GeA4f3c2NKYHC1R4mCgnW7dsUUUae2m9GiNBGT4T8s2X

ryo-currency: 4A6BQp7do5MTxpCguq1kAS27yMLpbHcf89Ha2a8Shayt2vXkCr6QRpAXr1gLYRV5esfzoK3vLJTm5bDWk5gKmNrT6s6xZep

monerowp's People

Contributors

alicesland avatar cactii1 avatar cameleater avatar cryptochangements34 avatar indeedminers avatar itssteven avatar jacobeva avatar kaizushi avatar mosu-forge avatar pitifultermite avatar pwhelan avatar quickbasic avatar rex4539 avatar serhack avatar tidux avatar xiphon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

monerowp's Issues

How to use monero testnet

Hi there,

How we can use the monero testnet account to test payments. If I create a testnet account and then go ahead configure the payment gateway using wallet address and secret view key it goes for normal checkout process and asks for the payment at the end.

But the wallet address it's providing in the end gives invalid error when I try to pay the required coins from my testnet wallet. It looks like it's generating new kind of address.

Can you please help, that how we can test the payment gateway using the monero testnet.

Thanks ,
Shan

V8 ready module?

I see this code hasn't been updated recently. Will it continue working after the V8 upgrade?

Supported Currencies

WooCommerce shops can support a large variety of currencies however the monero gateway only supports the following:
USD
EUR
CAD
INR
GBP
COP
SGD

If the currency of your shop is set to something else in the woocommerce settings then the plugin cannot convert the price total of a customers cart into the amount to pay in XMR.

Latest code

Hey guys,

Where is the latest code?

The Wordpress plugin has a version of 2.1.1 but this cloned repo shows v 2.0 with SerHack as the author.

Payment verifications seems wrong

Hello there,

if (isset($get_payments_method["payments"][0]["amount"])) {

To pay 1XMR, If I issue two payments of .5XMR instead of a single 1XMR payment, this check will fail, but I still paid in full. So this verification will fail for some cases. Just wanted to give you a heads up, might be of interest to improve the check.

Cheers.

converting price error???

I ran monero wallet rpc with

"monero-wallet-rpc.exe --daemon-address xmr.getmonero.us:18081 --rpc-bind-port 18083 --wallet-file *** --password *** --disable-rpc-login"

and then i installed this plugin and connected to wordpress well.

but when i try to check out sample product, it is displaying

"Payment error:The price for Monero could not be retrieved. Please contact the merchant."

My host OS is window 10 pro. and I tested in MAMP. I would appreciate if you help me.

Have a good day

Monero -> Payments Tab Broken: "An error of type E_ERROR....Error message: Uncaught Exception: Invalid order."

Describe the bug
The monero --> payments tab throws an uncaught exception: "There has been a critical error on this website. Please check your site admin email inbox for instructions."

Here is the stack:

An error of type E_ERROR was caused in line 104 of the file /var/www/html/wp-content/plugins/woocommerce/includes/data-stores/abstract-wc-order-data-store-cpt.php. Error message: Uncaught Exception: Invalid order. in /var/www/html/wp-content/plugins/woocommerce/includes/data-stores/abstract-wc-order-data-store-cpt.php:104
Stack trace:
#0 /var/www/html/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(159): Abstract_WC_Order_Data_Store_CPT->read()
#1 /var/www/html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-order.php(114): WC_Data_Store->read()
#2 /var/www/html/wp-content/plugins/monero-woocommerce-gateway/include/admin/class-monero-admin-payments-list.php(154): WC_Abstract_Order->__construct()
#3 /var/www/html/wp-content/plugins/monero-woocommerce-gateway/include/admin/class-monero-admin-payments-list.php(135): Monero_Admin_Payments_List->get_order_link()
#4 /var/www/html/wp-admin/includes/class-wp-list-table.php(1452): Monero_Admin_Payments_List->column_default()
#5 /var/www/html/wp-admin/includes/class-wp-list-table.php(1392): WP_List_Table->single_row_columns()
#6 /var/www/html/wp-admin/includes/class-wp-list-table.php(1379): WP_List_Table->single_ro

To Reproduce
Steps to reproduce the behavior: not entirely sure. I made a few sales, then it broke. To see where it is breaking specifically:

  1. Go to wordpress admin panel
  2. Click on "Monero" on the left-hand side
  3. Click "Payments"
  4. See error

Expected behavior
It should show a total of 4 orders instead of 1 before throwing the error. The other orders are cancelled/refunded orders; perhaps there is some uncaught logic for this page handling those types of orders? I am happy to help debug this in any way I can.

WordPress version 5.8
Current theme: Storefront (version 3.7.0)
Current plugin: WooCommerce (version 5.5.2)
PHP version 7.4.3

Any help appreciated. My site is live and still functioning, but being unable to see past-orders is way too cumbersome if my site were due to any high-volume.

Monero subaddress is not supported

Describe the bug
The extension doesn't allow the use subadress. The error message is : Monero Gateway Error: Monero address is invalid
I've double checked, triple checked the adress is correct !

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Add a subadress in Monero Gateway Settings Monero Adress'
  2. Click on 'Save changes'
  3. See error

Expected behavior
Subadress is a key feature of Monero and should works

Desktop (please complete the following information):

  • OS: [macOS X 12.0.1]
  • Browser [Firefox]
  • Version [98]

Cannot setup - fatal error

Hi there

I get this error when putting the monero address into and clicking go (note, have to turn WP_DEBUG to true):

Fatal error: Uncaught Error: Call to undefined function bcdiv() in /var/www/html/wp-content/plugins/monero-woocommerce-gateway/include/base58.php:313
Stack trace: #0 /var/www/html/wp-content/plugins/monero-woocommerce-gateway/include/cryptonote.php(233): base58->decode(Array)
#1 /var/www/html/wp-content/plugins/monero-woocommerce-gateway/include/monero_payments.php(277): Cryptonote->verify_checksum('46amisAS55Nei3p...')
#2 /var/www/html/wp-content/plugins/monero-woocommerce-gateway/include/monero_payments.php(255): Monero_Gateway->check_monero()
#3 /var/www/html/wp-includes/class-wp-hook.php(286): Monero_Gateway->validate_fields('')
#4 /var/www/html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
#5 /var/www/html/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#6 /var/www/html/wp-admin/admin-header.php(255): do_action('admin_notices')
#7 /var/www/html/wp-admin/admin.php(216): require_once('/var/www/html/w...')
#8 {main} thrown in /var/www/html/wp-content/plugins/monero-woocommerce-gateway/include/base58.php on line 313

These are the settings in MySQL (i have buffered out the address):

a:13:{s:7:"enabled";s:3:"yes";s:5:"title";s:18:"Monero XMR Payment";s:11:"description";s:23:"Pay securely using XMR.";s:11:"use_viewKey";s:2:"no";s:14:"monero_address";s:95:"[--* address *--]";s:7:"viewKey";s:0:"";s:7:"use_rpc";s:2:"no";s:11:"daemon_host";s:23:"oc.node.moneroworld.com";s:11:"daemon_port";s:5:"18089";s:8:"discount";s:1:"5";s:11:"environment";s:2:"no";s:9:"zero_conf";s:2:"no";s:13:"onion_service";s:2:"no";}

Note, this only happens when I put the address in. And it then bricks everything because of the error and then have to edit via MySQL to recover access to WooCommerce / monero settings.

It happens with enabled set to yes or no and with default daemon_host

Question: CoinMarketCap API Keys?

CoinMarketCap is halting their Public API and requiring a API Key to use their calculations (later this year).

https://coinmarketcap.com/api/

"The Public API will be migrating to the new, more powerful Professional API on December 4th, 2018. Please update your application to use the free tier of the Professional API before then. "

Switch to subaddresses

This issue aims to track the progresses about switching to subaddresses, instead of integrated address.

Currency symbol disappears

After enabling this plugin, in Woocommerce->General->Currency Options->Currency the dropdown list is now empty. If I make any change in woocommerce and Save then it saves it with no currency (all the $ symbols disappear from the website). The solution is always to disable the monero gateway plugin, fix the currency in Woocommerce and enable the plugin again.
(Using monerowp pre-release 2.1)

Decrypting payment id in Monero_Cryptonote results in infinite loop

On xmrchain.net it says “payment_id8” instead of the previous “payment_id”. The “payment_id8” is the short payment id and in encrypted form. We need to decrypt the encrypted payment id to compare it with the real payment id (which was used when generating the integrated address. I think I found a function for this in monerowp called stealth_payment_id with comment this is a one way function used for both encrypting and decrypting 8 byte payment IDs

I called said function like so:

monero_cryptonote()->stealth_payment_id( $tx['payment_id8'], monero_cryptonote()->txpub_from_extra( $tx['extra'] ), $options[ 'xmr_view_key' ] )

However it ends up in an infinite loop in function scalarmult at line 181 in monerowp/include/crypto/ed25519.php

The code below works and this is actually what monero_payments in monerowp is doing with function verify_non_rpc but this is a horrible way to do it for performance. Every single tx in a block is making an api call to xmrchain in the $tools->check_tx function. and that took almost 1 second per tx in the last test I did. For this reason previously I made it so it would check if the tx has a matching payment id before it calls check_tx, rather than calling it for every single tx block by block. As soon as we manage to decrypt the payment_id so we can match it, we can continue having this performance benefit.

	$tools    = new NodeTools();
	$tx_found = false;

	foreach ( $txs as $tx ) {
	    // TODO: Only call check_tx if payment id is found
		//$decrypted_payment_id = $tx['payment_id8'] ? monero_cryptonote()->stealth_payment_id( $tx['payment_id8'], $tx['tx_hash'], $options[ 'xmr_view_key' ] ) : '';
	    //if ( $decrypted_payment_id == $payment_id ) {
			$tx_hash = $tx[ 'tx_hash' ];
			$result  = $tools->check_tx( $tx_hash, $order->address, $options[ 'xmr_view_key' ] );
			if ( $result ) {
				$tx_found             = $tx;
				$tx_found[ 'output' ] = $result;
				break;
			}
		//}
	}

Wordpress.org Sumbitting

Hello everyone,
We would Monero almost everywhere. For this reason, I think I should submit plugin to Wordpress.org

There are few things that I develop before submitting

  • Wordpress doesn't accept cURL by default. A lot of installations currently don't have cURL enabled. cURL isn't fast on Wordpress. Solution: HTTP Api of wordpress

Internal Server Error - Checkout

I installed plugin on my WordPress with Woo-commerce located in Tor with onion address. Everything is configured.
But on checkout page when I hit "Place Order" there is error message displayed: Internal Server Error.

Info from logs:

2021/05/13 09:36:35 [error] 16899#16899: *11 FastCGI sent in stderr: "PHP message: PHP Warning: Attempt to read property "rate" on null in /var/www/website/wp-content/plugins/monero-woocommerce-gateway/include/class-monero-gateway.php on line 757PHP message: PHP Fatal error: Uncaught DivisionByZeroError: Division by zero in /var/www/website/wp-content/plugins/monero-woocommerce-gateway/include/class-monero-gateway.php:238

Stack trace:

#0 /var/www/website/wp-content/plugins/woocommerce/includes/class-wc-checkout.php(971): Monero_Gateway->process_payment()

#1 /var/www/website/wp-content/plugins/woocommerce/includes/class-wc-checkout.php(1186): WC_Checkout->process_order_payment()

#2 /var/www/website/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(466): WC_Checkout->process_checkout()

#3 /var/www/website/wp-includes/class-wp-hook.php(292): WC_AJAX::checkout()

#4 /var/www/website/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters()

#5 /var/www/website/wp-includes/plugin.php(484): WP_Hook->do_action()
#6 /var/www/website/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(90): do_action()

#7 /var/www/website/wp-includes/class-wp-hook.php(292): WC_AJAX::do_wc_ajax()

#8 /var/www/website/wp-includes/class-wp-hook.php(316): WP_Hook->apply_fil" while reading response header from upstream, client: 127.0.0.1, server: toraddress.onion, request: "POST /?wc-ajax=checkout HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "toraddress.onion", referrer: "http://toraddress.onion/checkout/"

Probably plugin can't get proper Monero price from ???somewhere???
Because when I put shortcode [monero-price currency="USD"]
it shows 1 XMR = 0.00000 USD

logs:
2021/05/13 09:47:45 [error] 16899#16899: *48 FastCGI sent in stderr: "PHP message: PHP Warning: Attempt to read property "rate" on null in /var/www/website/wp-content/plugins/monero-woocommerce-gateway/include/class-monero-gateway.php on line 757" while reading upstream, client: 127.0.0.1, server: toraddress.onion, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "toraddress.onion", referrer: "http://toraddress.onion/checkout/"

The issue is probably related to this:
include/class-monero-gateway.php $currencies = implode(',', self::$currencies); $api_link = 'https://min-api.cryptocompare.com/data/price?fsym=XMR&tsyms='.$currencies.'&extraParams=monero_woocommerce';

When I visit cryptocompare API link i see json with line:

Message | "You are over your rate limit please upgrade your account!"

Payments not showing up

For some reason payments no longer show up when they are paid. It generates a valid subaddress and the wallet gets the funds, yet the order status and payment status in general do not work. The transactions can be verified through the xmrchain website. However the extension fails to do it automatically.

xmrchain.net payment processing API offline, no alternative

Describe the bug
xmrchain.net is the only payment processing API
xmrchain.net is currently offline (for 3 days!)

To Reproduce
Steps to reproduce the behavior:

  1. use plugin
  2. check xmrchain.net

Expected behavior
Working plugin
add 2nd payment processing api
add fallback: if 1st api not working -> try 2nd api
maybe: https://localmonero.co/blocks/api

Screenshots

Desktop (please complete the following information):

  • all versions

Smartphone (please complete the following information):

  • all devices

Additional context
Suggested Resolution:
add 2nd payment processing api
add fallback: if 1st api not working -> try 2nd api
maybe: https://localmonero.co/blocks/api

Feature request: checkout shutdown on timeout

I use the monerowp code for a few customers on my system. I am in an unusual position regarding the connection the code makes to third party sources. This connection can become undone on my system, which uses a SOCKS proxy to reach a server which gives it Internet connectivity. Basically everything goes thorough a transproxy (redsocks) and to this remote server. This complicated setup sometimes goes down for a while, and monerowp runs but on outdated prices.

The code for this extension would be much improved if it kept note in the database of when it was last able to conect. Then you could have an option one sets on how long without a connection it takes until the checkout goes offline automatically. The current code when it loses the connection keeps running, but with outdates Monero prices.

Looking at the code one would just need to add a config option to set how long the system goes without Internet before going down. It could just check the timestamp in the table for Monero prices. One should also be able to choose a message to display when the Monero checkout goes down from the timeout.

Problems with product variations

When using Monero as payment on product variations it does not get completed.
I have looked in the source code and it does not take into account that variations have a different product-id.

This function will just look for the main product-id and not the variation-id.

protected static function is_virtual_in_cart($order_id)
{
$order = wc_get_order($order_id);
$items = $order->get_items();
$cart_size = count($items);
$virtual_items = 0;
foreach ( $items as $item ) {
$product = new WC_Product( $item['product_id'] );
if ($product->is_virtual()) {
$virtual_items += 1;
}
}
return $virtual_items == $cart_size;
}

Order Price Changes As Page Refreshes

The Monero amount of the order isn't set in stone when order is created but instead calculated and updated on every page refresh. This leads to discrepancies when an individual pays and the amount it's looking for. Especially when there is high volatility on the price.

Ideally the amount of xmr would be set on the order creation and not updated on every refresh.

iFrame based refresh system

A whole refresh on the page via javascript isn't that pretty. Instead if the payment form can be embedded into the page via an iFrame there wouldn't be a big refresh on the whole page; only the things needing to be refreshed.

This can be accomplished by creating a view and then referencing that view inside the iFrame.

Live rates table not updated in db causing price errors on checkout

I installed this plugin from the add plugins menu within woocomerce, added wallet address and viewkey. Go to checkout and get this error message:

Notice: Trying to get property 'rate' of non-object in /var/www/html/wp-content/plugins/monero-woocommerce-gateway/include/class-monero-gateway.php on line 774 Warning: Division by zero in /var/www/html/wp-content/plugins/monero-woocommerce-gateway/include/class-monero-gateway.php on line 721 Notice: Trying to get property 'rate' of non-object in /var/www/html/wp-content/plugins/monero-woocommerce-gateway/include/class-monero-gateway.php on line 774 Warning: Division by zero in /var/www/html/wp-content/plugins/monero-woocommerce-gateway/include/class-monero-gateway.php on line 721 0.000000000000 XMR

Wordpress running on linode public internet not tor.

Checked the db and the live rates table is empty.

Let me know what I should check next.

Missing Ability to Round Payments

This is more of a feature request than an issue.

I've had multiple customers for some reason have their payments rounded or the last four out of the eight decimal points set to zero. This makes payments fail and gets orders cancelled for sub-one cent worth of XMR.

I was hoping to be able to get a feature that would allow for a percentage discrepancy in the payment amount that'd still let the order go through.

javascript disabled fall-back support

It possible monero wordpress integration for the user has javascript disabled?

I understand ajax movement to customer-privacy of increase of the side, but I absolutely necessary for my site being able to process transaction of customers that has javascript disabled.

What necessary change for this repository provides fall-back support for users with javascript disabled?

Example, the possible to add to customer/order-page.php so html refresh happen if ajax no possible when fall-back? https://github.com/monero-integrations/monerowp/blob/master/templates/monero-gateway/customer/order-page.php

<noscript><meta http-equiv=”refresh” content="10" /></noscript>

Any one other necessary changes for javascript can it gives fall-back support?

Prices in minus

Hi
I created a shop and add 2 test products with normal price in USD. After install plugin enabled it and add all data and enable payment option, I saw thats my products have price in minus. i dont know what happen. if i turn off addon prices are normal in dolar.
Can You help me resolve this?

Javascript warning misleading about functionality

Describe the bug
Despite using the option to disable javascript, the checkout page for payment shows a javascript warning that is pessimistic and says things will not work without it. However it does work without it provided one manually refreshes the page to check payment status. The notice should reflect that reality better and just tell users they need to mash F5.

To Reproduce
Steps to reproduce the behavior:

  1. Enable the option for no-JS on the Monero payment/checkout.
  2. Make an order through the site and get to the actual Monero checkout page, with JS disabled on your system.
  3. You will see a misleading message about JS being required.
  4. Hit F5 and you should notice the order status can change and stuff.

Expected behavior
The Monero payment/checkout should display a different warning to users that merely informs them to manually refresh to keep track of orders they have made.

Add option to set update interval / average over a period of time

Feature request to add an option to use the average price for a specified update interval instead of updating every minute. This will allow prices to stay the same across the period and will not cause listed prices on the page to mismatch the cart amount when using the show prices in xmr feature.

Does not work

Hello,

When trying to use this for our store, we have noticed the payments are not verified (still shows 0.00 XMR paid). This has been tried with xmrchain block explorer and via monero-wallet-rpc. We have tried poor mans cron, and native cron. It looks like there is no action being executed to actually check the TX's? No TX id's show up under 'wp_monero_gateway_quotes_txids'

When enabling debugging, seem to get this on the Payments page in the admin dashboard:
Notice: wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder.

And in the PHP error log:
[02-Mar-2019 13:45:59 UTC] user_id was called incorrectly. Order properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::do_wc_ajax, do_action('wc_ajax_monero_gateway_payment_details'), WP_Hook->do_action, WP_Hook->apply_filters, monero_get_payment_details_ajax, Monero_Gateway::get_payment_details_ajax, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0.

Bizarre exchange rates with latest version

I am having trouble with the altest version of the modules. At first I couldn't get exchange rates, but that turned out to be SELinux and I fixed it up. For a while before that I wrote my own python script which runs on cron to get the price of XMR in euros (EUR). This worked for a while, but I no longer need it.

Currently it is showing this: 1 XMR = 9913.52000 EUR

There is some kind of maths error in the code.

New error code in Monero Admin Interface

Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'Monero_Admin_Interface' does not have a method 'orders_page' in /home/customer/www/astroadvisor.com/public_html/wp-includes/class-wp-hook.php on line 292

This is a new warning code I noticed. Is this anything important to fix?

Thanks if anyone knows!

List of currencies vanishes

When I enable this plugin my list of available currencies disappears from the WooCommerce settings, and the dropdown menu says "No matches found". When I deactivate the plugin, this problems goes away and I can see the full list of currencies.

Incorrect amount showed in QR code.

I was testing the latest beta code (3.0) and the Qr code shows correct address and payment id but incorrect amount. For example 0.758 xmr is shown as 758 in the qr code but correctly in the Total due: text.

The Pay to: text show 105 chars out of 106 of the integrated address.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.