Results 1 to 10 of 10
  1. #1
    Join Date
    May 2005
    Posts
    110
    Plugin Contributions
    0

    Default eway $1000 bug - help!

    Hi,

    I have installed the eway module i found on this forum but there is a bug with any order over the value of $1000, it only charges the customer $1 instead of $1000.

    I believe it has something to do with line 231 of eway.php attached. Code is: $my_totalamount = number_format($order->info['total'], 2) * 100;

    The idea is to convert the dollar and cent value to just cents, as eway processes all transactions in cents. So $25.25 would be 2525cents. But something goes wrong when the value is more than $1000.

    If anyone has any ideas or experience with this kinda thing using other payment modules that would be great.

    Thanks,
    Brad.
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: eway $1000 bug - help!

    This post addresses this bug, and a second one:
    http://www.zen-cart.com/forum/showthread.php?t=41952

    However, I believe the "correct" fix for this is the following:

    Code:
    $my_totalamount = number_format($order->info['total'], 2, '.', '') * 100;
    (This forces 2 decimal places, with a . to separate, and says to NOT use the standard comma as a thousands-separator.)
    .

    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
    Nov 2003
    Location
    Haarlem | Netherlands
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: eway $1000 bug - help!

    No experience at all with that module, but maybe it happens because 1000 is formatted as 1.000 or 1,000 ?

    Code:
    $my_totalamount = number_format($order->info['total'], 2, ',', '') * 100;
    (in which the hardcoded ',' should be replaced by the decimal separator definition?)

    The second '' removes the thousands separator.

  4. #4
    Join Date
    May 2005
    Posts
    110
    Plugin Contributions
    0

    Default Re: eway $1000 bug - help!

    Can anyone else confirm this would fix the problem?

  5. #5
    Join Date
    Nov 2003
    Location
    Haarlem | Netherlands
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: eway $1000 bug - help!

    Two isn't enough? ;-)
    (one of which being a Zen Cart dev)

    note: use DrByte's '.' in stead of my ',' .

    (eway is from the US I assume now, where I live we usually use the ',' )

  6. #6
    Join Date
    May 2005
    Posts
    110
    Plugin Contributions
    0

    Default Re: eway $1000 bug - help!

    Sorry, I only saw the 1 post before! Thanks guys, very much appreciated!

  7. #7
    Join Date
    Nov 2003
    Location
    Haarlem | Netherlands
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: eway $1000 bug - help!

    Sorry, I only saw the 1 post before!
    Yeah, I already thought so :-)

  8. #8
    Join Date
    Apr 2005
    Location
    Traralgon
    Posts
    56
    Plugin Contributions
    0

    Default Re: eway $1000 bug - help!

    Actually Dr Byte, eWay's policy is that amounts should be specified with no place holders at all.

    Therefore your fix, according to eWay's spec, is "incorrect".

    Cheeky.

  9. #9
    Join Date
    Jan 2007
    Posts
    226
    Plugin Contributions
    0

    Default Re: eway $1000 bug - help!

    Hello,

    I have just installed the Eway Module, and was wondering if I too need to correct the $1000 bug, or if the Eway Module has been improved on since the bug became apparent.

    Cheers,
    Anthony

  10. #10
    Join Date
    Sep 2007
    Posts
    21
    Plugin Contributions
    1

    Idea or Suggestion Re: eway $1000 bug - help!

    I believe I have fixed this issue in the new eway contrib.
    Works for me but the latest version (2.1) is still being approved, wait for it, don't get v2.

 

 

Similar Threads

  1. Need help! Generate 1000 gift certificate redeem codes
    By Daniel in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 6
    Last Post: 8 Apr 2011, 05:21 PM
  2. Eway module bug
    By emtecmedia in forum Addon Payment Modules
    Replies: 5
    Last Post: 2 Aug 2010, 06:43 AM
  3. Pls help: Do I need to edit each of the 1000+ products?
    By pppkkk in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 7 Sep 2008, 02:44 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR