Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2006
    Posts
    20
    Plugin Contributions
    0

    Default Paypal IPN problem with comma in price

    Hi,

    I think I narrowed down my problem with stuck orders in the PayPal IPN module. Here is an error message from the Debug mode:

    IPN WARNING :: Currency/Amount Mismatch. Details:
    PayPal email address =
    | mc_currency = USD
    | submitted_currency = USD
    | order_currency = USD
    | mc_gross = 3312.56
    | converted_amount = 3,312.56
    | order_amount = 3312.56

    It looks like it is adding a comma to the coverted amount making the currency a mismatch. This particular order got stuck and had to be retrieved via the Stuck order contibution.

    The last order that I received a few days ago came through fine but coincidentially it was only for $300.00. It seems like once the order total reaches 1000.00 it's adding a comma to the converted amount making the order not go though to the admin and email.

    Anyone have an ideas??

    I did apply the latest Paypal IPN Handler file. Can the IPN Module be deleted and reinstalled? If so, what is the best way to do this. Or do you think something else is causing the comma to be added to the currency.

    Any help would be greatly appreciated, It's kind of a pain to have these stuck orders.

    Thanks,

    CB

  2. #2
    Join Date
    Apr 2006
    Posts
    20
    Plugin Contributions
    0

    Default Re: Paypal IPN Handler Problems

    Does anything look wrong with this code? -here is the code from paypal_functions for currecny:

    function valid_payment($amount, $currency) {
    global $currencies;
    if (MODULE_PAYMENT_PAYPAL_CURRENCY == 'Selected Currency') {
    $my_currency = $_SESSION['currency'];
    } else {
    $my_currency = substr(MODULE_PAYMENT_PAYPAL_CURRENCY, 5);
    }
    $currency_list = array('CAD', 'EUR', 'GBP', 'JPY', 'USD', 'AUD', 'CHF', 'CZK', 'DKK', 'HKD', 'HUF', 'NOK', 'NZD', 'PLN', 'SEK', 'SGD', 'THB');
    if (!in_array($my_currency, $currency_list)) {
    $my_currency = 'USD';
    }
    $transaction_amount = number_format(($amount) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency));
    if ( ($_POST['mc_currency'] != $my_currency) || ($_POST['mc_gross'] != $transaction_amount && $_POST['mc_gross'] != -0.01) && MODULE_PAYMENT_PAYPAL_TESTING != 'Test' ) {
    ipn_debug_email('IPN WARNING :: Currency/Amount Mismatch. Details: ' . "\n" . 'PayPal email address = ' . $_POST['business'] . "\n" . ' | mc_currency = ' . $_POST['mc_currency'] . "\n" . ' | submitted_currency = ' . $my_currency . "\n" . ' | order_currency = ' . $currency . "\n" . ' | mc_gross = ' . $_POST['mc_gross'] . "\n" . ' | converted_amount = ' . $transaction_amount . "\n" . ' | order_amount = ' . $amount );
    return false;
    }
    ipn_debug_email('IPN INFO :: Currency/Amount Details: ' . "\n" . 'PayPal email address = ' . $_POST['business'] . "\n" . ' | mc_currency = ' . $_POST['mc_currency'] . "\n" . ' | submitted_currency = ' . $my_currency . "\n" . ' | order_currency = ' . $currency . "\n" . ' | mc_gross = ' . $_POST['mc_gross'] . "\n" . ' | converted_amount = ' . $transaction_amount . "\n" . ' | order_amount = ' . $amount );
    return true;

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

    Default Re: Paypal IPN problem with comma in price

    The May 10 patch should fix this.
    http://www.zen-cart.com/forum/showth...071#post372071
    .
    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.

  4. #4
    Join Date
    Apr 2006
    Posts
    20
    Plugin Contributions
    0

    Default Re: Paypal IPN problem with comma in price

    Thanks a bunch Dr. Byte. I applied the 5/10 update. I'll let you know how it works out.

    CB

 

 

Similar Threads

  1. No unit price with Paypal IPN - Website Payments Standard
    By mwilliams in forum Built-in Shipping and Payment Modules
    Replies: 11
    Last Post: 26 Oct 2010, 10:21 AM
  2. Problem with Paypal IPN and Download
    By Kendall in forum Managing Customers and Orders
    Replies: 2
    Last Post: 1 Apr 2010, 06:20 AM
  3. Strange Problem with Paypal IPN
    By innovafire in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 14 Dec 2008, 09:50 PM
  4. Problem with PayPal IPN after upgrade
    By artcoder in forum Upgrading from 1.3.x to 1.3.9
    Replies: 3
    Last Post: 11 Aug 2008, 07:48 AM
  5. Problem with Paypal IPN
    By arth in forum Built-in Shipping and Payment Modules
    Replies: 15
    Last Post: 27 Aug 2007, 10:24 PM

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