Title: Charge Problem
Last modified: February 7, 2018

---

# Charge Problem

 *  Resolved [dgenc](https://wordpress.org/support/users/dgenc/)
 * (@dgenc)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/charge-problem/)
 * Hi, im use charge system extention name: WooCommerce Pay for Payment
 * I set credit cart payments % 5 charged
 * Example customer buy item 100 usd , if pay credit cart system automatic add +
   5 usd total 105 usd.
 * Wallet system, customer add 100 usd wallet, and pay credit cart 105.
 * But add balance 105 usd. How i set?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Subrata Mal](https://wordpress.org/support/users/subratamal/)
 * (@subratamal)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/charge-problem/#post-9950502)
 * Hi [@dgenc](https://wordpress.org/support/users/dgenc/),
 * Thanks for reaching out to our support forum. Please use below code snippet to
   your themes function.php file. It will add 100 USD instead of 105. Before that
   please make sure you have updated to latest version of our plugin.
 *     ```
       add_filter('woo_wallet_credit_purchase_amount', 'woo_wallet_credit_purchase_amount_callback', 10, 2);
   
       function woo_wallet_credit_purchase_amount_callback($recharge_amount, $order_id) {
           $order = wc_get_order($order_id);
           $recharge_amount = $order->get_subtotal('edit');
           if ('on' === woo_wallet()->settings_api->get_option('is_enable_gateway_charge', '_wallet_settings_credit', 'off')) {
               $charge_amount = woo_wallet()->settings_api->get_option($order->get_payment_method(), '_wallet_settings_credit', 0);
               if ('percent' === woo_wallet()->settings_api->get_option('is_enable_gateway_charge', '_wallet_settings_credit', 'percent')) {
                   $recharge_amount -= $recharge_amount * ($charge_amount / 100);
               } else {
                   $recharge_amount -= $charge_amount;
               }
               update_post_meta($order_id, '_wc_wallet_purchase_gateway_charge', $charge_amount);
           }
           return $recharge_amount;
       }
       ```
   
 * Thank you.
 *  Thread Starter [dgenc](https://wordpress.org/support/users/dgenc/)
 * (@dgenc)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/charge-problem/#post-9951492)
 * Super! Thank you. Work
 *  Plugin Author [Subrata Mal](https://wordpress.org/support/users/subratamal/)
 * (@subratamal)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/charge-problem/#post-9951507)
 * [@dgenc](https://wordpress.org/support/users/dgenc/),
    Happy to hear from you
   that above code works for you.
 * I am marking this topic as resolved please feel free to create a new thread for
   any further assistance.
 * Could you please consider posting a review of our plugin? In addition to providing
   feedback, reviews can help other users to know who we are and what our plugin
   does.
 * Cheers

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Charge Problem’ is closed to new replies.

 * ![](https://ps.w.org/woo-wallet/assets/icon-256x256.png?rev=3360666)
 * [Wallet for WooCommerce](https://wordpress.org/plugins/woo-wallet/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-wallet/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-wallet/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-wallet/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-wallet/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-wallet/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Subrata Mal](https://wordpress.org/support/users/subratamal/)
 * Last activity: [8 years, 4 months ago](https://wordpress.org/support/topic/charge-problem/#post-9951507)
 * Status: resolved