Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2008
    Location
    Edmonton, AB
    Posts
    12
    Plugin Contributions
    0

    Default Cart adding random value to gross amount before sending to paypal

    Zen Cart Version 1.3.8a

    Add-ons: Products with Attributes Stock

    Using PC01 Template

    My site is at fusionscrubs.ca

    The problem is in the code that is sent to Paypal (using paypal standard) from the checkout confirmation page. When the customer selects a product or products, the cart calculates the correct price, shipping, etc. The totals are right. BUT in the code that is sent to Paypal, the gross amount is a randomly calculated HIGHER number. I say randomly, because if the form is re-sent, the number can change. Paypal charges the customer this amount. Then the zen cart sends the customer an invoice with the original, lower amount.

    For example, if I purchase a top for $49.99, tax is 5% (so $2.50). Shipping is free. My total should be $52.49.

    The relevant code from my checkout confirmation page is as follows:

    <h2 id="checkoutConfirmDefaultHeadingCart">Shopping Cart Contents</h2>

    <div class="buttonRow forward"><a href="http://fusionscrubs.com/shop/index.php?main_page=shopping_cart"><img src="includes/templates/template_default/buttons/english/small_edit.gif" alt="Edit" title=" Edit " width="40" height="16" /></a></div>
    <br class="clearBoth" />



    <table border="0" width="100%" cellspacing="0" cellpadding="0" id="cartContentsDisplay">
    <tr class="cartTableHeading">
    <th scope="col" id="ccQuantityHeading" width="30">Qty.</th>
    <th scope="col" id="ccProductsHeading">Item Name</th>
    <th scope="col" id="ccTotalHeading">Total</th>
    </tr>
    <tr class="rowEven">
    <td class="cartQuantity">1&nbsp;x</td>
    <td class="cartProductDisplay">6301/6400PR SCRUB SET
    <ul class="cartAttribsList"> <li>Colour: Sienna Brown</li>
    <li>Size: XS</li>
    </ul> </td>

    <td class="cartTotalDisplay">
    $49.99 </td>
    </tr>
    </table>
    <hr />

    <div id="orderTotals"><div id="otsubtotal">
    <div class="totalBox larger forward">$49.99</div>
    <div class="lineTitle larger forward">Sub-Total:</div>
    </div>
    <br class="clearBoth" />
    <div id="otshipping">
    <div class="totalBox larger forward">$0.00</div>
    <div class="lineTitle larger forward">Delivery (Delivery is free within Edmonton and surrounding area):</div>
    </div>
    <br class="clearBoth" />
    <div id="ottax">
    <div class="totalBox larger forward">$2.50</div>
    <div class="lineTitle larger forward">Canada GST 5%:</div>
    </div>
    <br class="clearBoth" />
    <div id="ottotal">
    <div class="totalBox larger forward">$52.49</div>
    <div class="lineTitle larger forward">Total:</div>
    </div>
    <br class="clearBoth" />
    </div>

    <form name="checkout_confirmation" action="https://www.paypal.com/cgi-bin/webscr" method="post" id="checkout_confirmation" onsubmit="submitonce();"><input type="hidden" name="charset" value="iso-8859-1" />
    <input type="hidden" name="lc" value="CA" />
    <input type="hidden" name="page_style" value="Primary" />
    <input type="hidden" name="custom" value="zenid=b1566551fa3bb148ca30c2a9da4cb273" />
    <input type="hidden" name="business" value="[email protected]" />
    <input type="hidden" name="return" value="http://fusionscrubs.com/shop/index.php?main_page=checkout_process&amp;referer=paypal" />
    <input type="hidden" name="cancel_return" value="http://fusionscrubs.com/shop/index.php?main_page=checkout_payment" />
    <input type="hidden" name="shopping_url" value="http://fusionscrubs.com/shop/index.php?main_page=shopping_cart" />
    <input type="hidden" name="notify_url" value="http://fusionscrubs.com/shop/ipn_main_handler.php" />
    <input type="hidden" name="redirect_cmd" value="_xclick" />
    <input type="hidden" name="rm" value="2" />
    <input type="hidden" name="bn" value="zencart" />
    <input type="hidden" name="mrb" value="R-******" />
    <input type="hidden" name="pal" value="*****" />
    <input type="hidden" name="first_name" value="*****" />
    <input type="hidden" name="last_name" value="****" />
    <input type="hidden" name="address1" value="*******" />
    <input type="hidden" name="city" value="*****" />
    <input type="hidden" name="state" value="AB" />
    <input type="hidden" name="zip" value="****" />
    <input type="hidden" name="country" value="CA" />
    <input type="hidden" name="email" value="***@****.ca" />
    <input type="hidden" name="H_PhoneNumber" value="****" />
    <input type="hidden" name="night_phone_a" value="***" />
    <input type="hidden" name="night_phone_b" value="***" />
    <input type="hidden" name="night_phone_c" value="***" />
    <input type="hidden" name="day_phone_a" value="***" />
    <input type="hidden" name="day_phone_b" value="***" />
    <input type="hidden" name="day_phone_c" value="****" />
    <input type="hidden" name="no_shipping" value="1" />
    <input type="hidden" name="upload" value="1" />
    <input type="hidden" name="currency_code" value="CAD" />
    <input type="hidden" name="cmd" value="_ext-enter" />
    <input type="hidden" name="item_name" value="fusionscrubs.com Purchase" />
    <input type="hidden" name="item_number" value="Store Receipt" />
    <input type="hidden" name="amount" value="56.31" />
    <input type="hidden" name="shipping" value="0.00" />
    <input type="hidden" name="tax" value="0.00" />
    <input type="hidden" name="tax_cart" value="0.00" />
    <div class="buttonRow forward"><input type="image" src="includes/templates/template_default/buttons/english/button_confirm_order.gif" alt="Confirm Order" title=" Confirm Order " name="btn_submit" id="btn_submit" /></div>
    </form>
    <div class="buttonRow back"><strong>Final Step</strong><br />- continue to confirm your order. Thank you!</div>

    </div>


    [/I]

    I'm just wondering if anyone else has had this problem. Or maybe there is an easy fix.

    I've searched the forum. I've looked in the FAQ. Please help me.

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

    Default Re: Cart adding random value to gross amount before sending to paypal

    If your PayPal module is set with USD as selected currency but your customer is shopping in CAD, then you'll have a problem.
    Similarly if your store's default currency is set to USD and the customer is shopping in CAD, then the exchange rate from USD to CAD is being calculated.
    Similarly again if you've got your PayPal module set to CAD and the customer is shopping in USD.

    Sort out your currency settings and things should take care of themselves.
    .

    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.

  3. #3
    Join Date
    Dec 2008
    Location
    Edmonton, AB
    Posts
    12
    Plugin Contributions
    0

    Default Re: Cart adding random value to gross amount before sending to paypal

    Thanks, Dr. Byte! That did it.

    I changed everything to CAD - both the Paypal module and the currency under Localization. But then all my prices went to 0 . . . ack! When I added USD to Currency under Localization again and made USD and CAD both worth $1.00 equally, it works again. I know I've still got a problem, because no prices show when I only have CAD, but this will be OK for now.

    EchoTasha

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

    Default Re: Cart adding random value to gross amount before sending to paypal

    .

    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 Zen Cart v151 not sending the correct total amount over to Paypal
    By cjcoward in forum PayPal Express Checkout support
    Replies: 5
    Last Post: 5 Jan 2014, 07:15 PM
  2. Everything in Gross prices but still calculalate net amount too?
    By neutrino in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 1
    Last Post: 9 Jan 2013, 07:11 AM
  3. Total Number of Items in Cart must be a MULTIPLE of a stated value before checkout
    By schoolboy in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 2 Jun 2009, 05:36 PM
  4. several attritubes before adding to cart
    By genuine15 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 17 Oct 2007, 05:00 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