Forum Replies Created
-
AuthorPosts
-
alexg
KeymasterHello,
First of all you should not edit any files. Please see the FAQ under “I want to do changes to the plugin’s code.” to see why.
Some thoughts on how to debug this issue:
1. When you use the CLI utility for your wallet, can you get a new address with the
getnewaddress
RPC command? For example, with bitcoin you should be able to get a new address withbitcoin-cli getnewaddress
.2. The debug info above indicates that you have not enabled WordPress debugging, therefore you would not see anything in your logs. Could you enable debugging and check again the get_coins_info call?
2. Create a child theme to your theme if you have not already done so. In your child theme’s
functions.php
file, add the following code:<?php function test_diners_new_address() { $adapters = apply_filters( 'wallets_api_adapters', array() ); if ( ! isset( $adapters['DNS'] ) { error_log( 'DNS adapter not found' ); } $address1 = $adapters['DNS']->get_new_address(); error_log( 'ADDRESS1: ' . print_r( $address1, true ) ); $address2 = apply_filters( 'wallets_api_deposit_address', null, array( 'symbol' => 'DNS' ) ); error_log( 'ADDRESS2: ' . print_r( $address2, true ) ); } add_action( 'init', 'test_diners_new_address' );
The above should give us clues as to where the new address fails to get generated. Every time you do a new request there should be addresses written in your debug log.
Please let me know what you find.
with regards
alexg
KeymasterHello again,
Continuing after my last post, you might prefer to use the
wallets_deposit
hook. This action only gets notified once for each successful deposit to a user deposit address. This action is part of the notifications mechanism and is also used to send notification emails. Seeincludes/notifications.php
for an example, or see the Notifications chapter in the manual.with regards
alexg
KeymasterHello,
Yes, this makes sense. You have declared two functions with the same name. When adding the second adapter, either rename your second
wallets_multiadapter_coins_filter
function to something else, or simply add both coins using the same function.with regards
alexg
KeymasterHello and happy new year,
You can get notified about transaction data by binding to the
wallets_transaction
action. For example you could add this to your child theme’sfunctions.php
file, or in a new plugin:function wallets_transaction_cb( $tx ) { error_log( print_r( $tx, true ) ); // prints out a stdClass object } add_action( 'wallets_transaction', 'wallets_transaction_cb' );
You will get multiple notifications for each transaction, because the confirmations number is updated each time.
It is your responsibility to handle each transaction only once, so you would have to somehow keep a record of already seen TXIDs. Alternatively, you could perform your action only when the confirmation count is equal to some integer value.
Hope this helps. Please let me know if you have any further questions.
with regards
alexg
KeymasterHello and happy new year,
First, please check the Troubleshooting guide at the homepage of the WooCommerce Payment Gateway under the heading “If on checkout you get the message “Payment error:…” for an explanation of what this means and what you can do about it.
Please let me know if this does not help.
with regards
alexg
KeymasterHello,
Thank you for providing the JSON API output in your post.
First of all I have moved your post to a new thread, as the reason deposit addresses are not displayed for you is different from that on the other thread.
The JavaScript error that you reported is caused by the fact that your
get_coins_info
call does not report thedeposit_address
field. This should normally never happen.To determine what the problem is, could you please tell me the following?
1. Are you using the Full Node Multi Coin Adapter to connect to your wallet?
2. Are you using the latest version of the plugin? The latest version currently is
3.9.2
.3. Have you modified the plugin’s code in any way?
4. When you visit Wallets -> Deposit addresses, do you see any deposit addresses listed for your coin?
5. If possible, can you enable WordPress debugging and see if there are any errors written out to the debug.log file when you visit the get_coins_info url?
To give you some context, the JSON API appends the
deposit_address
field to the coin information here: https://github.com/dashed-slug/wallets/blob/3.9.2/includes/json-api.php#L985-L991Let me know please.
with regards
alexg
KeymasterHello,
Thank you. You bring a valid point.
As you found out, you can modify the symbol using the filter under “Frontend -> JSON API filters -> Amounts pattern” in the manual. This is an
sprintf
pattern that is used both on the server side and client side to format patterns.It is not possible to use this pattern to set the decimals separator and thousands separator.
Ultimately this is not something that you should have to do. I will have to investigate how to make the plugin respect the regional settings of the current locale. This is likely not going to be easy, as many things need to change throughout the plugin.
I will report any progress on this thread.
with regards
alexg
KeymasterHello,
Thank you for your kind words.
The CoinPayments platform has a fixed number of confirmations that it looks for in each blockchain. These are listed here: https://www.coinpayments.net/supported-coins
Once that number is reached for an incoming transaction (i.e. deposit), then the platform informs the plugin that the deposit is confirmed, via an IPN of status 100. So the plugin does not actually use the exact number of confirmations, but only whether an incoming transaction is considered confirmed by the platform, or not. If the plugin were to use a different threshold than the platform, then you could run into a situation where a deposit is considered confirmed on the CoinPayments wallet but not on your plugin, or vica versa. This is generally not desirable.
But more importantly, if you believe that the amount of confirmations that CoinPayments looks for in a coin is not safe, you should contact them. The values they use look sane to me for the coins that I am familiar with, but I could be wrong.
with regards
alexg
KeymasterHello,
524 is the server timeout error and it is probably unrelated to the cron job. It is possible that this error is related to Cloudflare, if you are using it. Does the site work if you disable Cloudflare altogether?
You can always contact me at my email and I can try to have a look.
with regards
alexg
KeymasterHello,
Thank you for your feedback.
I was not aware of the certificate issue, but this looks like a problem that should be handled by CoinPayments. They list the official TOR URL with the https protocol, so it is likely that they should renew their certificate.
I added the TOR feature for a user who had requested this, but running WordPress securely over TOR is generally not easy. You can find guides on the web about this, but generally both WordPress and this plugin connect to a number of services as part of their routine operation.
So yes, it is likely not as easy as ticking a checkbox.
Ultimately, if you are concerned about privacy, I believe the best route would be to not rely on third-party services, but instead to set up a Monero full node and use this coin adapter.
with regards
alexg
KeymasterHello,
Yes, that is correct. Fiat coins are normally populated via the Fixer service, as you pointed out. This is also mentioned in the FAQ section of the coin adapter.
with regards
alexg
KeymasterHello,
You are advised against editing plugin files, for the reasons listed in the FAQ under “I want to do changes to the plugin’s code. Where can I find X function/variable/command/etc?”
Instead, go to WooCommerce -> Settings -> Payments -> Bitcoin and Altcoin Wallets -> Title. You can edit the title and click “Save Changes”.
with regards
alexg
KeymasterHello,
The next release of the Exchange will probably be in a few days. I do a new release on a component when enough changes accumulate for that component. I will notify you here, when this is implemented.
with regards
alexg
KeymasterHello,
The permissions should be as shown at step 23 of this guide: https://www.dashed-slug.net/bitcoin-altcoin-wallets-wordpress-plugin/installation-instructions-web-wallet/
You will also need
get_withdrawal_info
.1. As for the issue you are experiencing, have you checked the Troubleshooting section of the manual? (The manual is the PDF in the bundle download of the plugin).
2. It is possible that you may have an error in your JavaScript console. The plugin requires JavaScript to update the views, so please check.
3. Navigate to https://example.com/?__wallets_apiversion=3&__wallets_action=get_coins_info where
example.com
is your domain name. Do you see your coins listed? If not, it is possible that this JSON API response is erroneously cached on your server, so try refreshing your server cache to check if this is the problem.Please let me know if the above does not help.
with regards
alexg
KeymasterHello,
If you have followed the video instructions, it’s possible that the problem is a missing permission on the API key:
get_callback_address
. This is mentioned in a pinned post under the video and also in the troubleshooting instructions on the coin adapter’s homepage.Please let me know if you continue to experience this issue after enabling the permission.
with regards
-
AuthorPosts