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

Turning off or disabling "Suspected Fraud" check on Magento orders
 
hankzh
Member
 
Total Posts:  56
Joined:  2011-02-08
 

Related to this bug: http://www.magentocommerce.com/bug-tracking/issue/?issue=11331
paypal web standard in magento v1.5,.

A quick fix:.  in file: app/code/coreMage/Sales/Model/Order/Payment.php, function _isCaptureFinal(),
comment line 1289 and 1290

//       $orderGrandTotal = sprintf('%.4F', $this->getOrder()->getBaseGrandTotal());
//        if ($orderGrandTotal == sprintf('%.4F', ($this->getBaseAmountPaid() + $amountToCapture))) {

add two lines:

$orderGrandTotal =  $this->getOrder()->getBaseGrandTotal();
        if (
abs($orderGrandTotal - ($this->getBaseAmountPaid() + $amountToCapture)) < 0.01 {

There are some other bugs in the Magento Payment module and paypal module, I cannot do a full test/fix now.
If you just use magento paypal module do some basic payment process, I think this quick fix is good enough to handle it.

For Magento v1.4, You can do the similiar fix, although there is one value is different.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Rhonda_Rondeau
Enthusiast
 
Total Posts:  924
Joined:  2010-08-03
Culver City
 
7thSENSE Magento E-Commerce Systeme - 26 April 2011 09:51 PM

Hi Rhonda,

any news to this issue?

I checked the total amounts of the fraudulent orders. The PayPal amount exactly matches the Magento amount.

So unfortunately this doesn’t solve the issue… confused

Hey there, sorry I missed this—I need to check in. Last week the team has a deadline and I’m not sure if it’s been looked at yet.  I did add some logs that I was sent and attached to the request.  Also, please email me if you need to folrlow up because as much as I try to get back to all the threads, sometimes I miss some.

rhonda at magento dot com :>

 
Magento Community Magento Community
Magento Community
Magento Community
 
7thSENSE Magento E-Commerce Systeme
Jr. Member
 
Avatar
Total Posts:  27
Joined:  2008-11-18
Stuttgart, München, Reutlingen
 

@hankzh: This is a workaround for a rounding problem in the Magento-Paypal-Module. But it has nothing to do with the fraud-problem. :-(

 
Magento Community Magento Community
Magento Community
Magento Community
 
hankzh
Member
 
Total Posts:  56
Joined:  2011-02-08
 

7thSENSE Magento :
just try it.

More detail:
if you read some more code, you will find why that will fix the bug.
Line 325- Line 346 in the Payment.php file:

public function registerCaptureNotification($amount)
    
{
        
......
        
// register new capture
        
if (!$invoice{
            
if [b]($this->_isCaptureFinal($amount))[/b] {
                $invoice 
$order->prepareInvoice()->register();
                
$order->addRelatedObject($invoice);
                
$this->setCreatedInvoice($invoice);
            
else {
                [b]$this
->setIsFraudDetected(true);[/b]
                $this
->_updateTotals(array('base_amount_paid_online' => $amount));
            
}
        }
.....
 
Magento Community Magento Community
Magento Community
Magento Community
 
rzendejas
Jr. Member
 
Total Posts:  7
Joined:  2009-02-18
 

Rhonda I just emailed you my paypal log. Please let me know if you need any more info.

 
Magento Community Magento Community
Magento Community
Magento Community
 
rondata3
Jr. Member
 
Total Posts:  20
Joined:  2010-10-22
 
rzendejas - 04 May 2011 07:23 AM

Rhonda I just emailed you my paypal log. Please let me know if you need any more info.

I did--- thank you.  I’ve attached it to the internal ticket/request.  Hopefully I’ll hear back soon and i will keep you updated.  As always feel free to email me directly. I always try to get back in a timely manner but sometimes it’s difficult to get back to everything.

rhonda at magento dot com

 
Magento Community Magento Community
Magento Community
Magento Community
 
7thSENSE Magento E-Commerce Systeme
Jr. Member
 
Avatar
Total Posts:  27
Joined:  2008-11-18
Stuttgart, München, Reutlingen
 

@hankzh: I’ll give it a try. Weird that this omnipresent rounding bug has influences to the fraud check. I think the Magento team should really fix this rounding bug which annoys us for such a long time hmmm

In a week or so I’ll report whether this fixes the problem.

 
Magento Community Magento Community
Magento Community
Magento Community
 
7thSENSE Magento E-Commerce Systeme
Jr. Member
 
Avatar
Total Posts:  27
Joined:  2008-11-18
Stuttgart, München, Reutlingen
 

Hi Rhonda,

finally I can confirm that hankzh\’s hot fix seems to work. No more fraudulent orders…

Thanks hankzh grin

 
Magento Community Magento Community
Magento Community
Magento Community
 
richy69
Jr. Member
 
Total Posts:  13
Joined:  2010-03-08
 
7thSENSE Magento E-Commerce Systeme - 10 May 2011 02:19 AM

Hi Rhonda,

finally I can confirm that hankzh\’s hot fix seems to work. No more fraudulent orders…

Thanks hankzh grin

Hi!, I was applied the same hot fix, quoted the two lines and added the other two, but in my case still the bug. You made other changes? My magento version is 1.5.0.1

Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
hankzh
Member
 
Total Posts:  56
Joined:  2011-02-08
 

to 7thSENSE:
I am glad to hear that the fix is work for you.

to kek0te:
My test server is also v1.5.0.1.
Do you directly update the core file, or you create a new file to \"extends and overwrite\” that class?

You can add two log to confirm that code is invoked:

Line 325- Line 346 in the Payment.php file:

public function registerCaptureNotification($amount)
    
{
        
......
        
// register new capture
        
if (!$invoice{
            
if ($this->_isCaptureFinal($amount)) {
                $invoice 
$order->prepareInvoice()->register();
                
$order->addRelatedObject($invoice);
                
$this->setCreatedInvoice($invoice);
            
else {
Mage
::log(\'====hankzh log==== find fake fraud again, amount = \'.$amountnull,null,true);
                
$this->setIsFraudDetected(true);
                
$this->_updateTotals(array(\'base_amount_paid_online\' => $amount));
            
}
        }
.....

app/code/coreMage/Sales/Model/Order/Payment.php, function _isCaptureFinal(),

$orderGrandTotal =  $this->getOrder()->getBaseGrandTotal();
Mage::log(\'====hankzh log====  orderGrandTotal=\'.$orderGrandTotalnull,null,true);
        if (
abs($orderGrandTotal - ($this->getBaseAmountPaid() + $amountToCapture)) < 0.01 {
 
Magento Community Magento Community
Magento Community
Magento Community
 
richy69
Jr. Member
 
Total Posts:  13
Joined:  2010-03-08
 

Thanks for your reply hankzh.

I was checked that the code is ok, I will add the other code for see the logs.

Maybe some extension is bugging it.

thanks again smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
Req_rondata
Jr. Member
 
Total Posts:  1
Joined:  2011-03-21
 

Thank you for this.  Would you like to become a Magento Contributor? smile

http://www.magentocommerce.com/blog/comments/be-part-of-the-solution-become-a-magento-contributor/

(rondata here under a test account)

hankzh - 04 May 2011 04:27 AM

7thSENSE Magento :
just try it.


More detail:
if you read some more code, you will find why that will fix the bug.
Line 325- Line 346 in the Payment.php file:

public function registerCaptureNotification($amount)
    
{
        
......
        
// register new capture
        
if (!$invoice{
            
if [b]($this->_isCaptureFinal($amount))[/b] {
                $invoice 
$order->prepareInvoice()->register();
                
$order->addRelatedObject($invoice);
                
$this->setCreatedInvoice($invoice);
            
else {
                [b]$this
->setIsFraudDetected(true);[/b]
                $this
->_updateTotals(array('base_amount_paid_online' => $amount));
            
}
        }
.....
 
Magento Community Magento Community
Magento Community
Magento Community
 
mtgoodrich
Jr. Member
 
Total Posts:  2
Joined:  2010-12-29
 

I tried the above hack and it worked great for simple PayPal transactions. Unfortunately, we also use PayPal Pro Payments as our gateway and each of those Credit Card transactions came up as ‘Suspected Fraud’ too.

I simply went to Admin Panel System > Order Statuses and unassigned the Suspected Fraud Status

I don’t assume I need to reactivate it as we can see manually whether or not a payment goes through.

thanks

Image Attachments
1-1order-statuses.gif1-2suspected_fraud.gif1-3unassign-status.gif1-4-suspected-fraud-unassigned.gif
 
Magento Community Magento Community
Magento Community
Magento Community
 
Pinpoint
Member
 
Total Posts:  56
Joined:  2010-01-19
 
stu1903 - 19 April 2011 03:46 AM

I also expreience this problem with some PayPal transactions but not all of them.

The money has cleared in my PayPal account but shows as ”Suspected Fraud” in the Magneto back end.

I go to the databse and change the status of the orders from ”Suspected Fraud” to ”Processing”. This allows me to create invoices and complete the order.

Hi,

Could you please tel me where I can change the order status.

Thanks so much!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Shaun Ohagan
Member
 
Total Posts:  34
Joined:  2010-02-21
UK
 

Can’t we just turn this awful feature off.  It actually has cost us money as when this error hits the shipping charge is not captured in paypal.  We had lots of orders without shipping being paid.  What a disaster !

Stop being clever and if you are being clever give us the option to turn it off cost we are talking about money here and for small businesses that is really important.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top