Could not resolve host: download.finance.yahoo.com. Please help me

More
6 years 11 months ago - 6 years 11 months ago #113427 by P.V.T
Hello, Today, I see a error when my customer use paypal plugin to pay: "Could not resolve host: download.finance.yahoo.com"
I am a old customer. Please help me!

I am use joomla 3.6.5
MemberShip Pro: 2.9.0

Thanks!
Last edit: 6 years 11 months ago by P.V.T.

Please Log in or Create an account to join the conversation.

More
6 years 11 months ago - 6 years 11 months ago #113428 by Tuan Pham Ngoc
Hi

It's because you are using outdated version of the extension. Try to use the instructions below to fix it:

1. Open the file components/com_osmembership/helper/helper.php

2. Find this method convertAmountToUSD and change it to:
Code:
public static function convertAmountToUSD($amount, $currency) { $http = JHttpFactory::getHttp(); $url = 'https://finance.google.com/bctzjpnsun/converter?a=1&from=USD&to=' . $currency; $response = $http->get($url); if ($response->code == 200) { if (preg_match("/<span class=bld>(.*)<\/span>/", $response->body, $converted)) { $rate = JFilterInput::getInstance()->clean($converted[1], 'float'); if ($rate > 0) { $amount = $amount / $rate; } } } return round($amount, 2); }

Then check it again, the error should be sorted

Tuan
Last edit: 6 years 11 months ago by Tuan Pham Ngoc.

Please Log in or Create an account to join the conversation.

More
6 years 11 months ago - 6 years 11 months ago #113429 by P.V.T
Thank you very much!
Last edit: 6 years 11 months ago by P.V.T.

Please Log in or Create an account to join the conversation.

More
6 years 11 months ago #113432 by Tuan Pham Ngoc
You're welcome. Happy to hear that it helps solving the issue

Regards,

Tuan

Please Log in or Create an account to join the conversation.