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 7 years, 1 month ago by
alexg.
-
AuthorPosts
-
April 23, 2018 at 7:26 am #2912
alexg
KeymasterHello,
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 #2920Anonymous
Inactivehi 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 #2927alexg
KeymasterAbout 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.