Results 1 to 10 of 16

Hybrid View

  1. #1
    Join Date
    Mar 2009
    Posts
    64
    Plugin Contributions
    0

    Default Re: HTTP 500 error on PayPal site

    The error was happening in the function_taxes.php and here is the change I made:

    Here what I change in function_taxes.php around line 170 (in bold)


    // Calculates Tax rounding the result
    function zen_calculate_tax($price, $tax) {
    global $currencies;
    // $result = bcmul($price, $tax, $currencies->currencies[DEFAULT_CURRENCY]['decimal_places']);
    // $result = bcdiv($result, 100, $currencies->currencies[DEFAULT_CURRENCY]['decimal_places']);
    // return $result;
    if ( (is_numeric($tax) == 'true') && ($tax > 0) ) {

    return zen_round($price * $tax / 100, $currencies->currencies[DEFAULT_CURRENCY]['decimal_places']);
    }
    }

  2. #2
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: HTTP 500 error on PayPal site

    I submit that the approach you've taken there will result in further problems if the $tax value is not numeric. Namely, what you've done there prevents *any* value from being returned, which means whatever asked for a tax calculation is going to get no results, thus resulting in incorrect calculations, and possibly even mismatched transaction/order amounts.
    .
    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. v151 PayPal iPN intermittant failure HTTP error 500
    By d0ugparker in forum General Questions
    Replies: 15
    Last Post: 18 Sep 2014, 07:59 AM
  2. v139f Shopping Cart error: HTTP Error 500 (Internal Server Error)
    By Tulameen in forum General Questions
    Replies: 0
    Last Post: 15 Jan 2012, 01:48 AM
  3. HTTP Error 500
    By ABC123eef in forum General Questions
    Replies: 7
    Last Post: 14 May 2011, 06:29 PM
  4. HTTP 500 Error
    By Jace in forum General Questions
    Replies: 3
    Last Post: 6 Dec 2010, 02:33 AM
  5. HTTP 500 errors in Paypal IPN checkout??
    By BDCreations in forum Built-in Shipping and Payment Modules
    Replies: 45
    Last Post: 5 Jan 2008, 01:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg