Jump to content

Misleading text in anti fraud rules


Callum MacGregor

Recommended Posts

I believe the text warning about anti fraud rules to be incorrect. For example when I create some rules i get this message: 

NdXuQ1X.png

It says the the last rule that matches all conditions will be used. However, this is simply not true. If I have a rule called 'refuse' that blocks all transactions with a maxmind score of over 30, and another rule that holds for approval any transaction that has a maxmind score of over 3. If I order them so that refuse is after the approve rule (aka, it is the LAST rule, it never gets hit even with transactions with a 99% maxmind score).

I went ahead and checked the code, and indeed it doesn't pick the last rule, it will use end the rule lookup when it finds the first matching one:

		foreach ( \IPS\nexus\Fraud\Rule::roots() as $rule )
		{
			if ( $rule->matches( $this ) )
			{
				$this->fraud_blocked = $rule;
				$this->save();
				
				return $rule->action; <---- matching rule found, end the loop here?!?!
			}
		}

I'm just pointing this out because the fraud rules have confused me for such a long time, so now I know why I'm posting here.

 

Regards

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...