Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 8
Turning off or disabling "Suspected Fraud" check on Magento orders
 
entercompryan
Jr. Member
 
Total Posts:  16
Joined:  2011-02-04
 

Our company recently made a giant update of our website, going from Magento 1.3.2.1 to Magento 1.5. One of the issues with the upgrade has been that every single Credit Card order is being flagged as “Suspected Fraud”. I noticed this feature was added in Magento 1.4.1, and we’ve never dealt with it before.

From what I could tell, the orders are going from my store to Paypal, where they’re being flagged as Unverified, sent back to my Magento, and set as “Suspected Fraud”.

How do I turn off this fraud check?

 
Magento Community Magento Community
Magento Community
Magento Community
 
iambobafett
Jr. Member
 
Total Posts:  24
Joined:  2010-04-10
 

Thank god, I thought I was the only one with this problem.

I have 1.5.0.1.

I use PayPal Standard to accept payments.

9 out of 10 orders are marked as “Suspected Fraud”.

This is a huge problem because I can not change them to Processing - I can only cancel them and make the orders again manually.

I do not see any pattern, I am not sure why some are marked “Suspected Fraud” and some are not. Does anyone know a quick fix, for example the code that checks for fraud? I would like to just turn this function off until there is a better solution.

 
Magento Community Magento Community
Magento Community
Magento Community
 
iambobafett
Jr. Member
 
Total Posts:  24
Joined:  2010-04-10
 

app/code/core/Mage/PayPal/Model/Api/Abstract.php has this line

public function getFraudManagementFiltersEnabled()
    
{
        
return 1;
    
}

I tried changing the 1 to 0, but that had no effect on the situation.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Rhonda_Rondeau
Enthusiast
 
Total Posts:  924
Joined:  2010-08-03
Culver City
 

Hi Guys,

Hi guys, I’m looking at this thread wondering if it belongs in another forum? (is this directly Magento Connect related somehow) Maybe technical issues or upgrades? I’d be happy to move it where it will receive the best audience.

Additionally, I am wondering what you have to do (steps) to each and every order that gets a suspicious flag? (Inconvenience factor vs. cosmetic irritation) ? Please let me know.

Rhonda

 
Magento Community Magento Community
Magento Community
Magento Community
 
entercompryan
Jr. Member
 
Total Posts:  16
Joined:  2011-02-04
 
rondata - 07 March 2011 08:30 AM

Hi Guys,
Additionally, I am wondering what you have to do (steps) to each and every order that gets a suspicious flag? (Inconvenience factor vs. cosmetic irritation) ? Please let me know.
Rhonda

Right now, our sales team is totally thrown off as to why this is happening, and as the programmer, I’m stumped on how to get rid of it. Our customers are freaked out and think we’re saying they’re fraudulent. We finally changed the status’ text to “Processing Order”, but that did nothing past changing the text. The only button up there is “Back”.

edit: vvv yeah, that’s the issue. I just want to turn off the fraud check. Why is there not just some checkbox in the admin somewhere?

 
Magento Community Magento Community
Magento Community
Magento Community
 
iambobafett
Jr. Member
 
Total Posts:  24
Joined:  2010-04-10
 

This is not merely a cosmetic problem. It is not related to Magento Connect in any way.

The scenario:

A customer makes an order. The customer pays with PayPal. The payment is successful. Our PayPal account receives the payment, there is no problem, no flag, no warning from PayPal.

But Magento, instead of marking the order as “Processing” like normal, marks it as “Suspected Fraud”. This is still happening to 90% of my orders. I see no pattern. It is not related to the order size. Maybe some connection with PayPal exceeds a time limit?

Can you please just tell us how to disable Magento’s Suspected Fraud check?

 
Magento Community Magento Community
Magento Community
Magento Community
 
entercompryan
Jr. Member
 
Total Posts:  16
Joined:  2011-02-04
 

Can any Magento administrators address this issue?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Rhonda_Rondeau
Enthusiast
 
Total Posts:  924
Joined:  2010-08-03
Culver City
 

Let me look into this.

Rhonda

 
Magento Community Magento Community
Magento Community
Magento Community
 
entercompryan
Jr. Member
 
Total Posts:  16
Joined:  2011-02-04
 

After exhaustive research, I’ve found these instances of fraud check. The commented sections are what is in the code now that I would remove, and the non-commented code is the code I’d add:

code/core/Mage/Paypal/Model/IPN.php

if ($this->_info->isPaymentReviewRequired($payment)) {
            $payment
->setIsTransactionPending(true);
            
/*
            if ($fraudFilters) {
                    $payment->setIsFraudDetected(true);
            }
            */
        
}

code/core/Mage/Paypal/Model/Payflowlink.php

// No code to add
 /*
        if ($response->getResult() == self::RESPONSE_CODE_FRAUDSERVICE_FILTER ||
            $response->getResult() == self::RESPONSE_CODE_DECLINED_BY_FILTER) {
            $canSendNewOrderEmail = false;
            $fraudMessage = $this->_getFraudMessage() ?
                $response->getFraudMessage() : $response->getRespmsg();
            $payment->setIsTransactionPending(true)
                ->setIsFraudDetected(true)
                ->setAdditionalInformation('paypal_fraud_filters', $fraudMessage);
        }
 */

code/core/Mage/Paypal/Model/Payflowpro.php
There are two occurences of this code, in authorize() and capture(). The switch statement would be replaced by one variable declaration

$payment->setTransactionId($response->getPnref())->setIsTransactionClosed(0);
/*
        switch ($response->getResultCode()){
            case self::RESPONSE_CODE_APPROVED:
                $payment->setTransactionId($response->getPnref())->setIsTransactionClosed(0);
                break;
            case self::RESPONSE_CODE_FRAUDSERVICE_FILTER:
                $payment->setTransactionId($response->getPnref())->setIsTransactionClosed(0);
                $payment->setIsTransactionPending(true);
                $payment->setIsFraudDetected(true);
                break;
        }
*/

code/core/Mage/Paypal/Model/Pro.php
The if/else statement would be replaced by one variable declaration

$to->setIsTransactionPending(true);
/*
        if ($from->getDataUsingMethod(Mage_Paypal_Model_Info::IS_FRAUD)) {
            $to->setIsTransactionPending(true);
            $to->setIsFraudDetected(true);
        } elseif ($this->getInfo()->isPaymentReviewRequired($to)) {
            $to->setIsTransactionPending(true);
        }
*/

And finally, which I believe MAY act as a SOLE killswitch...
code/core/Mage/Sales/Model/Order/Payment.php

if ($this->getIsTransactionPending()) {
                $message 
Mage::helper('sales')->__('Capturing amount of %s is pending approval on gateway.'$this->_formatPrice($amountToCapture));
                
$state Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW;
                
/*
                if ($this->getIsFraudDetected()) {
                   $status = Mage_Sales_Model_Order::STATUS_FRAUD;
                }
                */
                
$invoice->setIsPaid(false);
 
Magento Community Magento Community
Magento Community
Magento Community
 
iambobafett
Jr. Member
 
Total Posts:  24
Joined:  2010-04-10
 

Thank you entercompryan, have you tried this, did it work for you? I will implement it now and let you know the result.

About the last file to modify, is the correct directory:

app/code/core/Mage/Sales/Model/Order/Payment.php?

 
Magento Community Magento Community
Magento Community
Magento Community
 
iambobafett
Jr. Member
 
Total Posts:  24
Joined:  2010-04-10
 

I made only the last change, but now paid orders are marked as Pending Payment, and there is no way to change them to Processing.

 
Magento Community Magento Community
Magento Community
Magento Community
 
entercompryan
Jr. Member
 
Total Posts:  16
Joined:  2011-02-04
 
iambobafett - 09 March 2011 10:36 PM

Thank you entercompryan, have you tried this, did it work for you? I will implement it now and let you know the result.

About the last file to modify, is the correct directory:

app/code/core/Mage/Sales/Model/Order/Payment.php?

Yes, it’s in .../Sales/..., sorry about that.

You said the orders that used to be “Fraud Suspected” now show as “Pending Payment” and can’t go on to “Processing"… I really don’t know why that would happen if you only edited that last file. I take it this means that all 5 need to be changed for it to work?

I’ve been unable to test this out on our work server for now, unfortunately. If anyone else can give it a shot, please post results!

 
Magento Community Magento Community
Magento Community
Magento Community
 
entercompryan
Jr. Member
 
Total Posts:  16
Joined:  2011-02-04
 

Bumping. It would be really great if any Magento staff members could comment!

 
Magento Community Magento Community
Magento Community
Magento Community
 
sliilvia
Sr. Member
 
Total Posts:  82
Joined:  2010-01-25
 

Is there a fix for this issue yet?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sam C
Jr. Member
 
Total Posts:  12
Joined:  2010-08-23
 

Hello entercompryan,
thank you for your help, I have changed these 5 files, but I still got ‘Suspected Fraud’ order status. could you please check these code again?
thank you

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sam C
Jr. Member
 
Total Posts:  12
Joined:  2010-08-23
 

Hello everyone,
I have to solve this problem according to the instructions above.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 8