Hi, as I find out under "Localisation->Currencies" the currencies do no more update because Yahoo stopped the service.

Regards

Hermann
In General
Saturday, November 04 2017, 05:16 AM
Share this post:
Responses (7)
  • Accepted Answer

    Saturday, November 04 2017, 08:12 PM - #Permalink
    Darn, I had not noticed it, thanks for letting us know.

    Added it to GitHub Issues: https://github.com/arastta/arastta/issues/729
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, November 08 2017, 04:26 AM - #Permalink
    My old website uses http://www.webservicex.net

    If it helps, here's the file contents.

    <?php

    class CURRENCY_WEBSERVICEX extends ISC_CURRENCY
    {
    public $_id;
    public $_name;
    public $_description;
    public $_help;
    public $_url;
    public $_targetURL;

    public function __construct()
    {
    // Setup the required variables for the module
    parent::__construct();

    $this->_id = "currency_webservicex";
    $this->_name = GetLang("CWebXName");
    $this->_description = GetLang("CWebXDesc");
    $this->_help = GetLang("CWebXHelp");
    $this->_url = "http://www.webservicex.net";

    // Target URL
    $this->_targetURL = "http://www.webservicex.net/CurrencyConvertor.asmx/ConversionRate";
    }

    public function FetchExchangeRate($fromCode, $toCode)
    {
    // Can make a SOAP request but a REST (POST or GET) request is quicker
    // The fields to post
    $postFields = "FromCurrency=" . urlencode(strtoupper($fromCode)) . "&ToCurrency=" . urlencode(strtoupper($toCode));

    $rtn = PostToRemoteFileAndGetResponse($this->GetTargetURL(), $postFields);

    // If we have failed then there is nothing really useful you can tell the client other than this service is temporarly unavailable
    if (!$rtn) {
    $this->SetError(GetLang("CurrencyProviderRequestUnavailable"));
    return false;
    }

    // Now we parse the return XML. Its not a big XML result and we only need one value out of it so we don't need anything heavy to read it.
    // If the parsing failed or if we didn't receive a value then we wern't given a valid XML due to the code(s) being incorrect
    $xml = @simplexml_load_string($rtn);
    if(!is_object($xml)) {
    $this->SetError(GetLang("CurrencyProviderRequestInvalidCode"));
    return false;
    }

    if (empty($xml)) {
    return (double)$xml;
    } else {
    return (double)$xml[0];
    }
    }
    }
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, November 08 2017, 04:27 AM - #Permalink
    Note that it is written in php 5.2 so it may need updating.
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, January 03 2018, 10:54 PM - #Permalink
    Dear Rune,

    I'm sorry to see that nobody has resolved this currency issue in GitHub.

    Kind regards

    Hermann
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, January 04 2018, 12:05 AM - #Permalink
    Me too Hermann, me too ...
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, March 10 2018, 06:29 PM - #Permalink
    It's a shame after this time that the currency exchange do NOT update. NO FIX FOR IT?
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, March 10 2018, 07:15 PM - #Permalink
    While I understand your pain ...

    The software is free open source, available at GitHub for you and me, and everyone else.
    We are all free to contribute and improve it, providing fixes etc.

    Did you pay for Arastta?! Did you contribute to Arastta?!

    The only shame is people yelling at others, for something they got for free.

    Please read and understand the license terms: https://github.com/arastta/arastta/blob/master/license.txt
    15. Disclaimer of Warranty.

    THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
    APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
    HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
    OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
    THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
    IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
    ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
    The reply is currently minimized Show
Your Reply