Forum Replies Created

Viewing 1 replies (of 1 total)
  • Forum: Plugins
    In reply to: [WP Stripe] Currency?

    I just ran in to this error, and found a fairly simple fix.
    Edit wp-stripe/includes/stripe-functions.php and find ‘usd’ and change that to ‘cad’ as follows:

    function wp_stripe_charge($amount, $card, $name, $description) {
    
        /*
         * Currency - All amounts must be denominated in USD when creating charges with Stripe — the currency conversion happens automatically
         */
    
        $currency = 'cad';
    
        /*
         * Card - Token from stripe.js is provided (not individual card elements)
         */

    Then go to wp-stripe/includes/stripe-display.php and find ‘USD’ and change it to ‘CAD’ as follows (for display to the user):

    <div class="stripe-row">
                <input type="text" name="wp_stripe_amount" autocomplete="off" class="wp-stripe-card-amount" id="wp-stripe-card-amount" placeholder="<?php _e('Amount (CAD)', 'wp-stripe'); ?> *" required />
            </div>

    Cheers! Let me know if you need help.

Viewing 1 replies (of 1 total)