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 8 of 8
Turning off or disabling "Suspected Fraud" check on Magento orders
 
elfling
Enthusiast
 
Avatar
Total Posts:  901
Joined:  2008-10-21
 

In the Paypal settings, I set this as aggregate order.

You may wish to check back on this thread to disable to line of code as well that checks for the suspect fraud.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ggarth
Jr. Member
 
Total Posts:  10
Joined:  2012-08-12
 

I’m using PayPal Payments Advanced, so is that the setting I have circled in red in the attached image? That setting is under the PayPal Payments advanced configuration -> Express Checkout area. There’s also one under PayPal Billing Agreements, but I don’t have that enabled. Should I, or is there another area that specifically tells PayPal to aggregate the order?

By the way, thanks for the help. I’ve been racking my noggin’ over this the last week and have tried many fixes. This is the fix I have in place for the isCaptureFinal() function:

protected function _isCaptureFinal($amountToCapture)
    
{
        $amountToCapture 
round($this->_formatAmount($amountToCapturetrue), 2);
        
$orderGrandTotal round($this->_formatAmount($this->getOrder()->getBaseGrandTotal(), true), 2);
    
        
/** @var $log Mage_Core_Model_Log_Adapter */
        
$log Mage::getModel('core/log_adapter''payment_payflow_advanced.log');
        
$log->log(array(
            
'order_grand_total' => $orderGrandTotal,
            
'base_amount_paid'  => $this->_formatAmount($this->getBaseAmountPaid(), true),
            
'amount_to_capture' => $amountToCapture,
            
'paid'              => $this->_formatAmount($this->getBaseAmountPaid(), true) + $amountToCapture,
        ));
    
        if (
$orderGrandTotal == $this->_formatAmount($this->getBaseAmountPaid(), true) + $amountToCapture{
            
if (false !== $this->getShouldCloseParentTransaction()) {
                $this
->setShouldCloseParentTransaction(true);
            
}
            
return true;
        
}
        
return false;
    
}

Since everything I’ve been doing hasn’t been working, and I’d like to not disable fraud protection if its important at all, then this is what my “last” resort will be to make sure $orderGrandTotal = $getBaseAmountPaid:

protected function _isCaptureFinal($amountToCapture)
    
{
        $amountToCapture 
round($this->_formatAmount($amountToCapturetrue), 2);
        
$orderGrandTotal round($this->_formatAmount($this->getOrder()->getBaseGrandTotal(), true), 2);
    
        
/** @var $log Mage_Core_Model_Log_Adapter */
        
$log Mage::getModel('core/log_adapter''payment_payflow_advanced.log');
        
$log->log(array(
            
'order_grand_total' => $orderGrandTotal,
            
'base_amount_paid'  => $this->_formatAmount($this->getBaseAmountPaid(), true),
            
'amount_to_capture' => $amountToCapture,
            
'paid'              => $this->_formatAmount($this->getBaseAmountPaid(), true) + $amountToCapture,
        ));
    
        if (
$orderGrandTotal == round($this->_formatAmount($this->getBaseAmountPaid(), true),2)) {
            
if (false !== $this->getShouldCloseParentTransaction()) {
                $this
->setShouldCloseParentTransaction(true);
            
}
            
return true;
        
}
        
return false;
    
}

EDIT::::
After looking at what I just sent, and realizing that BaseAmountPaid is what PayPal secures from the customer if the transaction is successful on their end, that variable/amount SHOULD always equal $amountToCapture if the order was processed by PayPal correctly. And since $orderGrandTotal is the same as $amountToCapture (at least in our setup with “Hosted C” checkout pages), $orderGrandTotal should never equal BaseAmountPaid which is what PayPal secured, PLUS the $amountToCapture which is what Magento tells PayPal to secure. That’d explain why Magento is always thinking that the customer paid double what the $orderGrandTotal/$amountToCapture is. Does this make sense?

Image Attachments
paypal-settings.jpg
 
Magento Community Magento Community
Magento Community
Magento Community
 
oralunal
Jr. Member
 
Total Posts:  10
Joined:  2010-08-07
 

Hi all,

It happened to me today, too. As a developper now I understand my problem. I have changed the digits after decimals to three. Because of this problem my customer paid $56.04 by PayPal. But has to pay $56.05. My new configuration calculated the bill $56.05. Because of this, Magento flagged this as a “Suspected Fraud.”

Now I’m going to use entercompryan’s cron job solution. If it’s OK, my problem will be solved.

Regards,

Update
I figured out my problem. entercompryan’s solution is works perfectly. But I think that it shouldn’t be my solution. Because it is only correcting my problem but not fixing. I have to fix it and I did!

I fixed my problem with the roundPrice function in app/code/core/Mage/Core/Model/Store.php

I have edited this line

return round($price2);
to this:
return round($price3);

Now, I revert back my edition, it works perfect. Now price is calculatin $56.04 by rounding 2 digits. Before it was calculating $56.05 by rounding 3 digits. But I noticed that magento just sending the cart list and prices. PayPal calculates the Tax. So, my problem is happening during the tax calculation.

Maybe someone has the same problem.

Regards,

 
Magento Community Magento Community
Magento Community
Magento Community
 
Paul-xib
Sr. Member
 
Avatar
Total Posts:  116
Joined:  2009-02-02
The Netherlands
 

Still having a 1 cent rounding problem between magento and paypal.
Tried alle the fixes in this topic and more. Still no luck.

It happens in stores running magento version 1.7.0.2 and even with 1.8.0.0 (and also older versions)

Magento:
Subtotal: 17,28
Shipping: 3,95
Tax: 3,68
Total: 21,23

PayPal
Total: 21,22

Going crazy here :S

 
Magento Community Magento Community
Magento Community
Magento Community
 
loeffel
Guru
 
Avatar
Total Posts:  427
Joined:  2009-02-03
 

I am using these two fixes:

http://www.magentocommerce.com/magento-connect/catalog/product/view/id/20012/
https://github.com/therouv/Magento-BetterPriceRounding

I have tried all of the fixes and it seems, this combination is the best. Sofar only two transactions haven’t gone through and this is by far the best result I’ve had with any of these.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Paul-xib
Sr. Member
 
Avatar
Total Posts:  116
Joined:  2009-02-02
The Netherlands
 

hmmm when i tried this fix:

http://magentodevelopmentservices.com/magento-and-paypal-total-mismatch-issue.html

I saw the shippingcost jumped from 3,95 to 3,94. The 1 cent difference in paypal.
So when i set the shipping back to 3,95 with the tablerates the total price in magento and paypal is the same. both 21,23

Steps to follow:
1. Move /app/code/core/Mage/Tax/Model/Calculation.php to /app/code/local/Mage/Tax/Model/Calculation.php
2. Edit Calculation
.php file and find calcTaxAmount function in it (Around line no466)
3. Find following code in that same function
    
if (
$priceIncludeTax{
    $amount 
$price*(1-1/(1+$taxRate));
else {
    $amount 
$price*$taxRate;
}

4. Just after it
add following line of code
    
$amount 
$this->truncate($amount2);

5. And test implementation at front-end.

This is tested and working for magento 1.7.0.0.

Need to test this more.

Edit: The Fix is working here in magento 1.7.0.2 & 1.8.0.0 smile

edit 2: still suspected fraud orders :(

 
Magento Community Magento Community
Magento Community
Magento Community
 
loeffel
Guru
 
Avatar
Total Posts:  427
Joined:  2009-02-03
 

I am so tired of this issue. I even read that the problem is not fixed in 1.8. I have had good results with these two fixes:
http://www.magentocommerce.com/magento-connect/rounding-error-fix-for-magento-and-paypal.html
http://www.magentocommerce.com/magento-connect/tigerbytes-paypal-bugfix-10413.html
But none of the fixes I have tried sofar seem to get rid of the entire problem.

I am now trying to include a rather dirty fix, which changes the tolerance of the suspected fraud amount to 5 cent instead of 1.

 
Magento Community Magento Community
Magento Community
Magento Community
 
sasoriza
Jr. Member
 
Total Posts:  4
Joined:  2009-05-26
 

Updated to 1.8.1.0 and still no luck, I filed a bug report:
http://www.magentocommerce.com/bug-tracking/issue?issue=16202

 
Magento Community Magento Community
Magento Community
Magento Community
 
lshnyc
Jr. Member
 
Total Posts:  1
Joined:  2009-11-11
 

I wanted to offer a potential solution (not tested) to this because it has aggravated us for weeks. My main concern was the customer NOT see \"Suspected Fraud\” after making a payment because most will not be fraudulent. This looks very unprofessional on our side.

From admin panel:
Go to > System > Order Statuses > Click \"Suspected fraud\” > Change \"status label\”

We changed ours to \"Pending\" as well as all the \"payment review\” labels. No reason to put a customer into a panic.

Again we have not yet tested it but can\’t see why it won\’t work.
I\’ll be watching this thread in case there\’s a better solution or someone figures it causes bugs.
Hope this helps.

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