Forum Replies Created
-
AuthorPosts
-
alexgKeymaster
Hello,
Sorry to hear that you are encountering this problem.
What is the shop currency set in the WooCommerce settings? This is the currency that the products are priced in.
For any cryptocurrency to appear as an option, the exchange rate between that cryptocurrency and the shop’s base currency must be known.
It’s possible that you may need to enable fixer.io rates in Settings -> Bitcoin & Altcoin Wallets -> Fiat currencies.
But since you mentioned that exchange rates are shown in the product and not at checkout, there might be another problem.
Some things to try:
1. Try with a standard WordPress theme and see if it makes a difference.
2. Check the PHP error logs to see if anything is wrong.
3. If possible, you could give me admin access so I can check myself.
Let me know.
alexgKeymasterHello and welcome!
I would gladly change your Airdrop membership to the WooCommerce gateway, but after your post, you also purchased subscription to the WooCommerce gateway. Does this mean that you plan to use both apps? Let me know how to proceed.
You can also email me about this if you like.
I will check my email later today, as I will be away from the weekend, back on Monday.
I will send your receipt after you let me know how to proceed.
with regards,
AlexalexgKeymasterHello,
Since you are running on a local web server, you don’t have to forward any ports, you can simply trigger/wp-cron.php
from your local machine.
Let me know if you encounter any problems.alexgKeymasterHello,
Thanks for reaching out. I have moved your post its own new thread.
The Coin Adapter extension includes a cron job that continuously attempts to re-create any currencies that you have enabled in CoinPayments. But it should be skipping any already existing currencies.
I have seen this problem before, and it’s hard to track down / reproduce, because it’s a concurrency issue that only occurs on some installations, but fortunately there is a workaround.
First, to make sure, please check the following:
1. Are you running the latest versions of wallets (6.3.1) and the CoinPayments adapter (2.0.8)?
2. Visit _Settings_ -> _Bitcoin and Altcoin Wallets_ -> _Cron tasks_. Do you should see a message telling you to addDISABLE_WP_CRON
to yourwp-config.php
file?If so, please go ahead and apply this edit to
wp-config.php
. This will disable the default trigerring of cron tasks by WordPress.The message will change to notify you that WP CRON is disabled and that you need to trigger crons manually.
You should then set up some external cron that will hit
/wp-cron.php
on your site, once every minute. This has an added benefit: It will also improve the site’s performance, since transaction processing will no longer happen on user HTTP requests.Your cron entry should look something like this:
* * * * * curl -Lk https://example.com/wp-cron.php
You should be able to do this either via Cpanel, or with EasyCron or from another server that you control. Let me know if you need help.
Once you switch the cron tasks to external triggering, the problem should not occur again.
Finally, delete any currencies that are not used, and only leave the ones that already have transactions, if any.
Hope this helps. Please let me know if you encounter any more problems or if you have any questions.
with regards,
AlexalexgKeymasterGlad to hear that withdrawals are working for you!
The currency that pays for gas (in this case BNB), must be on the address that holds the token to be withdrawn. This is a limitation of CoinPayments. The plugin tries to move BNB around to fund addresses that hold tokens, so that these tokens are withdrawable. Of course these transfers also cost BNB. When you view in the plugin an address that holds a CP token, you can see whether there is enough gas on the address to facilitate withdrawal.
Hope this helps.
If you encounter any more problems with the plugin, please open a new topic or email me.
with regards
alexgKeymasterHello,
Thank you for providing details from the logs.
1. First of all, is the currency that you are trying to withdraw a token or a coin? ERC-20 tokens suffer from an issue regarding gas fees, which is actually a limitation of the CP platform. The plugin has a gas management system but it requires setting up. (There is some further reading in the troubleshooting section of the CP adapter documentation about gas management for tokens.)
To test if withdrawals are working, you can use Litecoin testnet or Dogecoin or some other non-token currency.
2. The errors from the
DSWallets\Migration_Task
are to be expected if you have not used versions of the plugin before 6.0.0.3. I’m not sure about the
could_not_set
error: Maybe the cron jobs are not running? Deposits can work without the cron tasks, because they rely on IPNs.You can see if the crons are running at: “Dashboard” – “Bitcoin and Altcoin Wallets” -> “Debug” -> “Cron jobs last ran on:”
4. You mentioned that there were no log entries from the
Withdrawals_Task
. My apologies, I forgot to mention that you should also enable verbose logging from the plugin’s settings:“Settings” -> “Bitcoin & Altcoin Wallets” -> “Cron tasks” -> “Verbose logging”.
Shortly after you enable verbose logging there should be log entries from
Withdrawals_Task
even if nothing is withdrawn.Please let me know if you have questions about any of this.
with regards,
Alex
alexgKeymasterHello,
To investigate, you can enable logging. Here’s instructions on how to do so:
Note that the plugin rotates over currencies and adapters, always running the next currency with an enabled adapter and with pending withdrawals.
Once you get some log output, look for lines from the
Withdrawals_Task
. There should be information there, or you can email me the logs and I can advise further.There should also be some withdrawal requests visible in your CoinPayments account. These will be at: https://www.coinpayments.net/acct-ipn-history
Hope this helps, let me know if you need help with the logs.
with regards
June 22, 2024 at 5:43 am in reply to: Integrating Custom Wallet Adapter Methods into UI Shortcode #13709alexgKeymasterHello,
It sounds like you are doing something wrong.
If you have implemented the wallet adapter correctly, then you shouldn’t have to do anything else. You should be able to perform deposits and withdrawals via the plugin’s built-in UIs (
[wallets_deposit]
and[wallets_withdraw]
). The WP-REST API is useful only if you want to add new UIs, such as functionality that doesn’t already exist in the plugin.Available materials
The documentation and sample code for implementing a wallet adapter is here:
You can also study the Monero Wallet adapter which is available for free download, or the build-in Bitcoin core adapter, which works for any forks of Bitcoin core with the same RPC API (Litecoin, Dogecoin, Bitcoin Cash, etc).
I wouldrecommend that you start by following the instructions to setup the adapter and its settings. You may want to start from this template code: https://github.com/dashed-slug/my-wallet-adapter
Withdrawals
Implementing withdrawals is easy: just fill in the implementation for
do_withdrawals()
. Process the withdrawals and change their state on the withdrawal transactions afterwards. You can also set any TXID or timestamp or other data if you like. They will be saved by the plugin to the DB after thedo_withdrawals()
call.Here’s how the withdrawals are implemented for Bitcoin core:
Deposits
Implementing deposits is a two step process:
1. Implement the
get_new_address()
method which should return a newDSWallets\Address
for the wallet. This is what the shortcode[wallets_deposit]
displays.2. Implement deposit detection via polling: You would typically do this in the adapter’s
cron()
method which is called periodically. Once your cron code detects a new deposit, create a depositDSWallets\Transaction
object, and pass it todo_deposit()
from the abstract superclass:https://github.com/dashed-slug/wallets/blob/6.3.1/adapters/abstract-wallet-adapter.php#L326
The adapter’s
cron()
method gets called on cron runs, but not on every one. The plugin rotates between all active wallet adapters, and calls thecron()
method of only one adapter each time. To see what cron tasks are run, you can enable verbose logging from the plugin’s settings.The withdrawals are executed by the
DSWallets\Withdrawals_Task
cron.The
cron()
method is executed by theDSWallets\Adapters_Task
cron.If you end up publishing your adapter, let me know if you want me to add a link from this website to the adapter.
Hope this helps. Please do contact me with any questions you may have about the plugin.
with regards
alexgKeymasterHello,
I have published an updated version
3.1.0
to the extension with bbPress integration.You can read the release notes here:
with regards
alexgKeymasterHello,
The extension was not designed with bbpress forums in mind.
It can attach to most custom post types as long as the post type is shown using a WordPress loop.
I am taking a note of your request. If I can find some time, I will work on it and let you know.
with regards
alexgKeymasterYes, that is correct. There are several APIs that you can interface with. Please let me know if you have any questions.
alexgKeymasterHi. This depends on your level of proficiency with PHP and JavaScript as well as the WordPress APIs.
If you are a developer, you can start by looking at the templates, and also the plugin’s developer documentation: https://github.com/dashed-slug/wallets/blob/master/docs/developer.md
I believe that the
[[wallets_exchange_market_order]]
shortcode is what you initially described.If you have a plan on what you want to do, let me know about any technical questions and I will try to put you in the right direction.
with regards
alexgKeymasterOK, I’m not sure what you are hoping to do then?
The plugin works with these types of technologies: https://www.dashed-slug.net/howto-choose-between-available-wallet-adapters/
Please let me know if you have any questions about this.
alexgKeymasterHello,
Please see the video series here:
You can also study the installation instructions to see how to connect to a full node wallet:
If you would rather connect to a CoinPayments adapter rather than a full node wallet, you can study the installation instructions for the CoinPayments adapter instead:
The plugin and all its extensions come with extensive documentation under the menu item “Wallets Admin Docs”.
Please let me know if you have any questions about anything.
with regards
alexgKeymasterHello,
Thank you for your feedback.
Unfortunately I am unable to implement suggestions or create new extensions.
However, if you are using the Exchange extension, and if you can provide liquidity to a market by setting limit orders in that market, then you can use the shortcode:
[wallets_exchange_market_order]
with no arguments.The UI will determine which currency pairs are tradeable based on the availability of markets on your system, and will show a simple UI with two dropdowns.
For more details see the relevant release notes:
💱 Easy crypto swapping UI, plus theme-able templates for the Exchange extension
Please let me know if you have any questions about this.
with regards
-
AuthorPosts