Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 9 of 9

Thread: Fraud orders and Paypal

  1. #1
    williepete is offline Junior Member
    Join Date
    Mar 2008
    Posts
    3

    Default Fraud orders and Paypal

    Anyone getting an occasional paypal order in fraud status. We are getting about 1-2 in every hundred that are flagged in the Admin as fraud. These orders are not showing up unless you specifically search for fraud status. Prior to discovering that the orders were accually in our system, we attributed it to a "click to return to merchant" snafu on the customer's or paypal's fault.

    We still recieve emails from paypal on the orders, just no order showing in our system without specifically searching for fraud status. Taking a look at the orders in the admin, that are showing as fraud, show no common factors. Long standing customers who I know personally have been flagged as fraud.

    On a related side note: If the order is flagged as fraud, is the inventory removed?

    Thanks in advance

    Kevin

  2. #2
    ASPDNSF Staff - Jon's Avatar
    ASPDNSF Staff - Jon is offline Senior Member
    Join Date
    Sep 2004
    Posts
    11,419

    Default

    There was an issue last summer with PayPal IPN, where they were rounding the cart total in the IPN callback, so that the IPN total was different than the original cart total.

    These totals are tested to prevent "cart stuffing" with a second browser window during checkout.

    This issue was circumvented in v7.0.2.0 by allowing up to a nickle difference between the original cart total and the IPN callback total:
    Code:
    if (NetTotal != PaymentTotal)
    
    -- changed to --
    
    if (Math.Abs(NetTotal - PaymentTotal) > 0.05M)
    inside paypalok.aspx.cs and paypalnotification.aspx.cs.
    Jon Wolthuis

  3. #3
    hirish.reddy is offline Member
    Join Date
    Jul 2009
    Posts
    40

    Default

    CAn any one from storefront please help me out wht exactly below function check.

    if (Math.Abs(NetTotal - PaymentTotal) > 0.05M)

    where is math.abs check

  4. #4
    ASPAlfred is offline Senior Member
    Join Date
    Nov 2007
    Posts
    2,244

    Default

    That'll return the absolute value of a Decimal number. It checks the incoming payment from paypal whether it matches the cart total, otherwise, the system will mark it as fraud.
    Last edited by ASPAlfred; 03-11-2010 at 08:03 PM.

  5. #5
    hirish.reddy is offline Member
    Join Date
    Jul 2009
    Posts
    40

    Default

    im bit confused with this function

    if (Math.Abs(NetTotal - PaymentTotal) > 0.05M)

    My net total is 29.23 $
    Papyment total is 29.28 $

    then please do let me know whether it executes condition 1 or condition 2

    if (Math.Abs(NetTotal - PaymentTotal) > 0.05M)
    {
    condition1
    }
    Else
    {
    Condition 2
    }
    end if

    29.23 - 29.28 = .05
    math.abs(0.05) = ?
    wht does 0.05M represents




    Cheers
    Hirish

  6. #6
    ASPAlfred is offline Senior Member
    Join Date
    Nov 2007
    Posts
    2,244

    Default

    if (Math.Abs(29.23 - 29.28)) > 0.05M
    {
    Condition 1
    }
    else
    {
    Condition 2
    }

    With the given value, that condition executes #2.

    Math.Abs(29.23 - 29.28) - basically this returns .05, without the Math.Abs function it's (-.05)

    0.05M could mean any number after 5 e.g. 0.05012345

    When is the Condition 1 get executed?

    if (Math.Abs(NetTotal - PaymentTotal) > 0.05M), meaning any number greater than .05M e.g. .06 - up.

  7. #7
    hirish.reddy is offline Member
    Join Date
    Jul 2009
    Posts
    40

    Default

    if (Math.Abs(29.23 - 29.28)) > 0.05M
    {
    Condition 1
    }
    else
    {
    Condition 2
    }

    ----------------------------------------------------
    if (Math.Abs(29.23 - 29.28)) > 0.05M

    math.abs(-0.05)>0.05M

    0.05 > 0.05M

    ----------------------------------------------------

    If ( 0.05 > 0.05M )
    {
    statement 1;
    }
    else
    {
    Statement 2;
    }


    Please let me know whether statement1 will get executed or statement2 for my example.

  8. #8
    ASPAlfred is offline Senior Member
    Join Date
    Nov 2007
    Posts
    2,244

    Default

    Obviously this condition "if ( 0.05 > 0.05M )" is false, so statement 2 will be executed.

  9. #9
    hirish.reddy is offline Member
    Join Date
    Jul 2009
    Posts
    40

    Default

    but statement 1 got executed and updated order is fraud.