• [EDIT: See follow up regarding my facePalm hiccup.. ]
    Been trying to figure out what’s going on with Stripe not appearing as a payment option, then discovered the post from a year+ ago that indicated an incompatibility with Aelia Currency Switcher (which I’ve confirmed) and your Stripe addon (also affects the WC Stripe plugin too).

    There’s an FAQ about this on the Aelia site here:
    https://aelia.freshdesk.com/support/solutions/articles/158712-one-or-more-payment-methods-don-t-appear-after-installing-the-currency-switcher-how-can-i-fix-it-
    … which might be worth a look to resolve the checkout option disappearing.

    [ EDIT: Issue above resolved ]

    …but I also have a request as the Stripe system has a different set of API keys for each currency account, which makes it tricky to use when you plugin only allows for one of them.

    Would it be possible to update the plugin to allow additional API keys and associate them with the appropriate currency codes?

    Happy to contribute towards development, charity or simply pay-it-forward if that would help. Similarly happy to debug any dev’ version too.

    Thanks in advance…

    • This topic was modified 7 years, 8 months ago by websnail.
Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter websnail

    (@websnail)

    For anyone else following this…

    One thing I’d completely forgotten to do with the Aelia settings is make sure I’d added the Stripe plugin to the appropriate currencies under the settings in:
    WooCommerce > Currency Switcher Options > Payment Gateways

    Once that was done the Stripe payment option appears and is available…

    So this isn’t a Stripe plugin bug, but more a “feature” that Aelia currency-switcher users will hit when they’ve not added a payment gateway plugin to their WC setup for a while (this would be me – aka Doofus!).

    My request about the multiple API codes is still very much active though and would improve the utility of this plugin immensely so hope the above is useful and that the suggestion will be welcomed as/when time allows ??

    • This reply was modified 7 years, 8 months ago by websnail.
    Plugin Author syednazrulhassan

    (@nazrulhassanmca)

    @websnail

    Glad to know it worked for you but my question is based on your request is it a case that different currency is associated to different stripe accounts ?

    Maybe you can have it made custom based on your need

    Regards
    Nazrul

    Thread Starter websnail

    (@websnail)

    Hi Nazrul,

    The way Stripe works for additional currencies is that you have sub-accounts linked to your Stripe login. Where Stripe does things differently is that they have created API credentials for each currency account so you can’t just input one accounts API keys and expect the addon to assign the payment to the target currency if the keys are for a different one. It’s just going to process it as a foreign exchange payment which is not ideal for someone like me who maintains currency accounts in USD, EUR and GBP.

    As the bulk of the work of accommodating this sort of change, for non-coders, is in the admin UI I’m more inclined to just hard code the keys into your module for now and rewrite the code a little so it uses the appropriate keys depending on what currency has been selected by the customer in WooCommerce…

    I might cut my teeth on learning how to code the UI changes into the WC plugin and share them with you when they’re done but I suspect you’d be a whole lot faster at doing this if the demand was there…

    Anyway, just a thought as Stripe does make things a little more challenging in the scenario described above… Fun and games.. ??

    • This reply was modified 7 years, 8 months ago by websnail.
    • This reply was modified 7 years, 8 months ago by websnail.
    Plugin Author syednazrulhassan

    (@nazrulhassanmca)

    I have looked at stripe dashboard long back however i assume they accept multiple currencies just we need to make sure convert the base amount to different currencies based on current international rate and pass the appropriate currency code to stripe rest they take care of it

    What you are talking seems to be case of stripe connect but what my plugin implements is stripe charges have a look here https://stripe.com/docs/currencies

    Thread Starter websnail

    (@websnail)

    Not sure what Stripe call it but if it helps I wrote a plugin for Interspire Shopping Cart before it was retired and all that’s required for your plugin to work as a true multi-currency checkout module is the following:

    Admin Settings

    1. Allow admin to select the currencies that are natively supported by Stripe (ie: the ones that are setup as specific currencies – no conversions)
    2. Display input form to collecting sets of keys (1 per currency required)

    Checkout process

    1. Determine cart currency selected
    2. Set PKey and SKeys from settings for appropriate currency
    3. Process payment as normal

    I suspect there are going to be aspects of this that I haven’t considered but from what I’ve looked at so far, it shouldn’t require much any additional work beyond making the Admin UI intuitive.

    Thread Starter websnail

    (@websnail)

    Oh and one thought… I’m not referring to a fully integrated Stripe plugin that allows subscriptions, etc…

    Literally all I’m looking at here is the ability to use Stripe at checkout to take payments in different currencies that are setup in Stripe as specific currency accounts. Not the usual, single currency and conversion approach.

    Plugin Author syednazrulhassan

    (@nazrulhassanmca)

    Well this plugin is just for single stripe account (obviously single currency) capable of accepting payment in supported currencies but changing currency code based on order currency

    Question : Are you a multivendor type of woocommerce powered store that makes sense of using multiple currencies like each vendor of respective store have their own set of stripe account with their chosen currency.

    Thread Starter websnail

    (@websnail)

    Understand the limitations of your plugin and as I said originally it was a feature request so I understand your reluctance to add complexity. Especially as my reading on other currencies implies there’s more to it than I’d first supposed.

    For clarity though, no I’m not multi-vendoring (ie: creating multiple stores, 1 per currency) but accepting true multi-currency payments. By which I mean the payment is made in the currencies selected, retained as that currency and critically, NOT converted to another base currency.

    I maintain currency accounts without going through exchange rates simply because I pay suppliers in various currencies so losing money on two exchange fees is just a waste I can avoid this way.

    Coming back to stripe though, I think the simplest fix in this instance is to clone your plugin, rename each clone to the target currency and then just use Aelia currency selector plugin to set which of the clones is available for which currency. That may be the simplest approach all round although it does mean a little more work when updates come out…

    I’ll let you know if that works and how to achieve it in case someone else comes along with a similar request in the future.

    Thread Starter websnail

    (@websnail)

    Hi Nazrul,

    Just to provide you with an update on this… It’s actually really simple to hard-code in the functionality I mentioned (ie: true multi-currency support within Stripe).

    I just added in new variable sets for each of the currencies eg:

    $this->stripe_testpublickey_eur = 'pk_test_foo';
    $this->stripe_testsecretkey_eur = 'sk_test_foo';
    $this->stripe_livepublickey_eur = 'pk_live_foo';
    $this->stripe_livesecretkey_eur = 'sk_live_foo';

    … then wrote a simple function that reads the get_woocommerce_currency() value and sets the $this->stripe_testpublickey, etc… values according to that (defaulting to the one input in the form).

    The rest of your add-on and stripe handle the rest pretty natively so really the only real job would be to create an Admin UI that allows currencies to be selected and then keys added for each.. along with the associated function to set keys from those.

    My solution is a hack that does what I need so I’ll probably leave it as is but thought you might find the info useful if you decide you want to play with the feature list in the future.

    Thanks for a nicely thought out add-on though… Was easy to figure out once I delved in…

    Plugin Author syednazrulhassan

    (@nazrulhassanmca)

    Hi Websnail,

    What does your simple function looks like can you paste it here so it can be contributed to feature list

    Thread Starter websnail

    (@websnail)

    in __construct()

    The other currency keys are set as per the post above…
    …then there’s a call to the function below..

    public function set_currency_keys() {
    				
    				try  {
    					$curr = strtoupper(get_woocommerce_currency());
    				} catch (Exception $ex) {
    					$curr = '';
    				}
    				
    				if($curr == 'USD') {
    					$this->stripe_testpublickey = $this->stripe_testpublickey_usd;
    					$this->stripe_livepublickey = $this->stripe_livepublickey_usd;
    					$this->stripe_testsecretkey = $this->stripe_testsecretkey_usd;
    					$this->stripe_livesecretkey = $this->stripe_livesecretkey_usd;
    				}
    				elseif($curr == 'EUR') {
    					$this->stripe_testpublickey = $this->stripe_testpublickey_eur;
    					$this->stripe_livepublickey = $this->stripe_livepublickey_eur;
    					$this->stripe_testsecretkey = $this->stripe_testsecretkey_eur;
    					$this->stripe_livesecretkey = $this->stripe_livesecretkey_eur;
    				}
    				else {
    					// Defaults to GBP
    					$this->stripe_testpublickey = $this->stripe_testpublickey_gbp;
    					$this->stripe_livepublickey = $this->stripe_livepublickey_gbp;
    					$this->stripe_testsecretkey = $this->stripe_testsecretkey_gbp;
    					$this->stripe_livesecretkey = $this->stripe_livesecretkey_gbp;
    				}
    			}

    Not sure if you have a means of direct comms but if you can PM or similar, I can send a copy of the code file…

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Aelia Currency Switcher & Stripe hides’ is closed to new replies.