Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter lavbhelloriya

    (@lavbhelloriya)

    Its still not working. I have found a filter which I think does the same thing. Please tell me how to convert it in to shortcode.

    add_filter('woo_wallet_current_balance', 'woo_wallet_current_balance', 10, 2);
    
    if(!function_exists('woo_wallet_current_balance')){
        function woo_wallet_current_balance($balance, $user_id){
            $credit_amount = array_sum(wp_list_pluck(get_wallet_transactions(array('user_id' => $user_id, 'where' => array(array('key' => 'type', 'value' => 'credit')), 'nocache' => true)), 'amount'));
            $debit_amount = array_sum(wp_list_pluck(get_wallet_transactions(array('user_id' => $user_id, 'where' => array(array('key' => 'type', 'value' => 'debit')), 'nocache' => true)), 'amount'));
            $balance = $credit_amount - $debit_amount;
            return $balance;
        }
    }

    Also guide me where do I put the additional messages like ‘your wallet has been credited or debited according to condition’

    Thread Starter lavbhelloriya

    (@lavbhelloriya)

    Hi Dhimas,
    Thank you for you response.
    This shortcode is not working. Actually this is for TeraWallet Plugin and its author has giving no response that’s why I am asking here.
    I am trying to add this shortcode in my email notification but your code gives no response on my emails.
    For your reference I am posting one shortcode which works so maybe by that way you can construct a code to which the plugin can give response.

    function woo_mini_wallet_callback() {
        if (!function_exists('woo_wallet') || !is_user_logged_in()) {
            return '';
        }
        ob_start();
        $title = __('Current wallet balance', 'woo-wallet');
        $mini_wallet = '<a class="woo-wallet-menu-contents" href="' . esc_url(wc_get_account_endpoint_url(get_option('woocommerce_woo_wallet_endpoint', 'woo-wallet'))) . '" title="' . $title . '">';
        $mini_wallet .= woo_wallet()->wallet->get_wallet_balance(get_current_user_id());
        $mini_wallet .= '</a>';
        echo $mini_wallet;
        return ob_get_clean();
    }
    add_shortcode('woo-mini-wallet', 'woo_mini_wallet_callback');

    This shortcode only gives wallet balance in emails but I also want to insert credit or debit messages.
    Please help.
    Thanks!

    Thread Starter lavbhelloriya

    (@lavbhelloriya)

    Hi Alex
    I tried opening the link provided there by changing the site name to my site name but its showing this page is not working.
    Please help!

    Thread Starter lavbhelloriya

    (@lavbhelloriya)

    Thanks a lot for your help.

    Thread Starter lavbhelloriya

    (@lavbhelloriya)

    Hi
    Thank you for your response.
    This is a requirement for Stripe India Customers where we have to add this additional parameter which is cross_border_classification=export and at this moment, no any woocommerce stripe plugin has this additional parameter. It would be great for both of us if you added this additional parameter so that Indian merchants can use your service for stripe.
    The error which we encounter after trying to make a purchase via credit card is
    {
    “error”: {
    “message”: “You must specify a value for cross_border_classification.”,
    “param”: “cross_border_classification”,
    “type”: “invalid_request_error”
    }
    }
    I am also sending some stripe documentation for information regarding stripe India account.

    https://stripe.com/docs/india-exports

    https://stripe.com/docs/api/pagination

    Please log in via Indian Stripe account in order to see the correct information required for Indian accounts.
    Take a look and please provide a solution for it.
    Thanks.

    Thread Starter lavbhelloriya

    (@lavbhelloriya)

    Hi
    Thanks a lot for your quick response.
    I have a stripe India account and for them to function we need this parameter to be there for successful checkout and at this moment we don’t have any plugin which supports Stripe India account apart from yours. After putting those codes your plugin is working flawlessly.
    I have just one request if you could please make this to work with woocommerce carts so that it picks the email and billing address from there with the cart actual amount. It will be a great help to merchants like us in India who will start using your plugin.
    Could you please do this for us or am I asking for too much?
    Woocommerce stripe payment gateway is not working for us that’s why I am asking you for help.
    Hoping for an early response.
    Thanks and Regards.

    Thread Starter lavbhelloriya

    (@lavbhelloriya)

    Hello
    Yeah this one is working without any issue. But I have an ecom store and how can I use this plugin on my store?
    Do I need to create a different button for each of my product?
    Can I link this plugin to my cart so that it automatically charges according to the value of cart.
    Please help me with it.

    Thread Starter lavbhelloriya

    (@lavbhelloriya)

    Hello
    Thank you for reply.
    Just wanted to know can I use this plugin for woocommerce stripe plugin cause that plugin is also having the same issue.

    Thread Starter lavbhelloriya

    (@lavbhelloriya)

    ‘metadata’ => array(“cross_border_classification” => “export”)
    );
    return $data;

    }
    add_action( ‘direct_stripe_charge_data’, data_for_direct_stripe($data), 10 );
    add_action( ‘direct_stripe_subscription_data’, data_for_direct_stripe($data), 10 );

    After entering this function function.php file of my theme for direct stripe plugin I am able to charge my customers but I want my woocommerce stripe plugin to work. Somebody please help me setting up cross_border_classfication = export for my woocommerce stripe plugin.

    Hello Nicolas and Shalintj
    I am setting up a ecom store. When I am trying to do a test charge then its showing cross_border_classification error. I have tried everything even what you guys have provided here but its not working. I have tried both direct stripe and the stripe integrated in woocommerce but its not working. Please help me on how to do it and where to do it. Please guys help me.

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