dashed-slug.net › Forums › CoinPayments.net Wallet Adapter extension support › Shortcode to take amount of user deposition
- This topic has 3 replies, 2 voices, and was last updated 6 years, 8 months ago by alexg.
-
AuthorPosts
-
April 22, 2018 at 8:29 am #2907AnonymousInactive
hi, Thank you for your nice support and useful plugin.
Now i have 2 problems that need your supports after installation coinpayment adapter:
1. I want to take automatically an amount of user deposit into wordpress page.example: one user deposit 0.1 btc and 1 eth, and i want to take amount of these for calculation.
How can i take into a wordpress page?
2. i tried to send Litecoin test to user deposit address to show transaction but have nothing.
I see on the setting: bitcoin nore note > Other adapter setting > Minimum confirmation is 1 (but i see confirmation of litecoin test is 0 on coinpayment). This is reason of no transaction shown ?April 23, 2018 at 7:26 am #2912alexgKeymasterHello,
To answer your second question first, check your CoinPayments account’s IPN history. Your LTCT deposit should generate an IPN message with status 0 when it is first seen on the network and another IPN message with status 100 when the transaction is confirmed. It is this second IPN that causes the deposit to be recorded in the plugin. Please see the troubleshooting section of the CoinPayments adapter page for more details. If you continue to experience problems with this, please contact me with the details of your IPN message with status = 100. Any errors will be there.
I am not sure what you mean by “take an amount of user deposit”. Can you please describe more fully what you want to do? Do you want to keep a part of the deposit as fee charged by your site? Under what circumstances do you want this amount to be kept?
Looking forward to your reply
Thank you
April 23, 2018 at 1:52 pm #2920AnonymousInactivehi Alexg,
I checked IPN history as follow:
Type Payment/Txn ID Status Sent Successfully
Deposit a0655492ff5c921c… 100 Yes
Regarding “take amount of deposit”:
When user deposit 0.1 btc, Automatically plugin will take this amount (0.1) for another calculation on my website. how to do this?Thank you for your support,
April 24, 2018 at 7:36 am #2927alexgKeymasterAbout the issue with the missing deposit: It seems the IPN message was delivered to the plugin. Therefore there should be a deposit transaction in your Admin → Transactions screen. Can you open up the details of the IPN message and verify that there is no error message? Also, can you confirm that the deposit address associated with the IPN message is bound to a user? You can do a
SELECT * FROM wp_wallets_adds
WHERE address=’ADDRESS’;to make sure, substituting
ADDRESSwith the actual address and
wp_` with your actual SQL table prefix.About your other question, this is not how this plugin works. If you insist on doing this, you could look at WordPress actions in PHP in the documentation section Notifications. You can essentially be notified of incoming deposits by binding to the
wallets_deposit
action, with something like:public function my_action_deposit( $data ) { error_log( 'Received deposit with details: ', print_r( $data, true ) ); // TODO insert your logic here } add_action( 'wallets_deposit', 'my_action_deposit' );
In the hook’s callback you can do all sorts of checks if you wish. Then you can initiate an internal transfer to another user, such as an admin, using the PHP API move action:
$args = array( ... ); // TODO insert details of transaction here do_action( 'wallets_api_move', $args );
Hope this helps.
kind regards
Alex -
AuthorPosts
- You must be logged in to reply to this topic.