WP Stripe
Currency? (3 posts)

  1. garyvcarter
    Posted 2 years ago #

    I am getting this error when submitting a test transaction. "Oops, something went wrong (Invalid currency: usd.)" I am in Canada and Stripe now supports that. Fix? Thanks!


  2. Mr. L
    Posted 2 years ago #

    I have the same question.

    I contacted Stripe directly and was told that this was a plugin issue and, therefore, I should contact the plugin developer.

    Does the widget allow for Canadian currency? If so, how do we make the necessary changes? If not, can we expect this upgrade to be made in the near future? Thanks.

  3. shubsengupta
    Posted 2 years ago #

    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 />

    Cheers! Let me know if you need help.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Stripe
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic