Paid Memberships Pro
Quick hack for Canadian dollars in Stripe (6 posts)

  1. Ken Dirschl
    Posted 3 years ago #

    Stripe beta is now available in Canada. PMPro only allows USA dollar for Stripe, but a quick hack can access Paypal's dropdown list to choose CDN dollars instead.

    Open file 'paymentsettings.php' in directory 'adminpages' and alter lines #230 and #240:


    <tr class="gateway gateway_stripe gateway_authorizenet" <?php if($gateway != "authorizenet" /* && $gateway != "stripe" */) { ?>style="display: none;"<?php } ?>>


    <tr class="gateway gateway_ gateway_paypal gateway_paypalexpress" <?php if(!empty($gateway) && $gateway != "paypal" && $gateway != "paypalexpress" && $gateway != "stripe") { ?>style="display: none;"<?php } ?>>

    Comment out (or remove) $gateway != "stripe" on line #230 and add && $gateway != "stripe" on line #240.

    Quick and dirty but works until this gets revised.


  2. bradyshearer
    Posted 3 years ago #

    I was really excited about this fix.

    I tried it however and when you save your settings now matter what the currency always reverts to USD.

    And when trying to make a payment on my website with PMPro and Stripe I still get the error:

    Error: Invalid currency: usd

    Sad times.

  3. Ken Dirschl
    Posted 3 years ago #

    You're right Brady; you also have to make a change around line 32 where fixed currency is set:

    if($_POST['gateway'] == "authorizenet" || $_POST['gateway'] == "stripe")
    pmpro_setOption("currency", $currency_fixed);
    pmpro_setOption("currency", $currency_paypal);

    just remove the || $_POST['gateway'] == "stripe" or comment it out, that way the program will use the paypal currency options. Sorry, I forgot that line.

  4. bradyshearer
    Posted 3 years ago #

    Sounds awesome!

    I also contacted PMPro yesterday and they've made an update now to the plugin to fix it so that's awesome too! :)

  5. Jason Coleman
    Plugin Author

    Posted 3 years ago #

    FYI, that update is available in the current dev release:

    ... and will be in the 1.5.3 release version.

  6. Ken Dirschl
    Posted 3 years ago #

    Great! I'll go get it.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Paid Memberships Pro
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic