Listes des IP effacée dans Plugin PayPal

  • Posts: 473
  • Thank you received: 30
  • Hikashop Business
10 years 9 months ago #135002

-- HikaShop version -- : 2.2.2 Business
-- Joomla version -- : 2.5.16
-- PHP version -- : 5.3.27

Bonjour,

J'ai voulu rafrâichir la liste des IP dans les paramètres du plugin PayPal.

Bizarre : la liste a simplement été effacée, contrairement au plugin de ma version précédente où je n'avais jamais eu ce souci (v2.1.2)

Attachments:
Last edit: 10 years 8 months ago by lesyeux. Reason: Problème résolu

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

  • Posts: 26122
  • Thank you received: 4023
  • MODERATOR
10 years 9 months ago #135089

Bonjour,

C'est une petite coquille qui a été corrigée depuis (et qui sera dans la prochaine release).
Vous pouvez mettre à jour la fonction "getIPList" du plugin en utilisant ce code:

	function _getIPList(&$ipList) {
		$hosts = array(
			'www.paypal.com',
			'notify.paypal.com',
			'ipn.sandbox.paypal.com'
		);

		$ipList = array();
		foreach($hosts as $host) {
			$ips = gethostbynamel($host);
			if(!empty($ips)) {
				if(empty($ipList))
					$ipList = $ips;
				else
					$ipList = array_merge($ipList, $ips);
			}
		}

		if(empty($ipList))
			return $ipList;

		$newList = array();
		foreach($ipList as $k => $ip) {
		$ipParts = explode('.', $ip);
		if(count($ipParts) == 4) {
			array_pop($ipParts);
			$ip = implode('.', $ipParts) . '.*';
		}
		if(!in_array($ip, $newList))
			$newList[] = $ip;
		}
		return $newList;
	}
Cordialement,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.060 seconds
Powered by Kunena Forum