close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

transaction only successful with $1 not $1.00 (eway payment gateway)

Thread began 5/28/2009 10:48 am by email377288 | Last modified 5/28/2009 6:37 pm by Ray Borduin | 1563 views | 7 replies |

email377288

transaction only successful with $1 not $1.00 (eway payment gateway)

this is very strange...i have been testing for hours and i can't get a successful transaction when my cart has a decimal place defined.

if i redefine the cart and uncheck the "force decimal checkbox" and insert "value 0" in its text field, i then get a successful transaction.

i have tried this in both live and test modes with the gateway, same result.

biggest problem is when i put through a live transaction with no decimal place defined e.g $1 i get $0.01 deposited in my account!

as i don't really want to be responsible for putting the client out of business! please help if you can...

Sign in to reply to this post

Ray BorduinWebAssist

I am not familiar with this problem, but it sounds like you could multiply the value by 100 and it would all work out.

Have you looked at the full request and full response to try to spot what might be wrong in the code?

Sign in to reply to this post

email377288

i have had a look but as i have limited knowledge of php i'm not really sure whats going on, i assume the bug is in Adv_CO_Scripts\eWAY_XML_PHP.php

here is a snippet from that file...

<?php
if (!session_id()) session_start();
$WA_eWAY_VersionNumber = "2.20";

function eWAY_XML_Post($reqArray,$itemArray,$optArray) {
global $WA_eWAY_VersionNumber;
$varvalueArray = array();
for ($x=0; $x<count($reqArray[0]); $x++) {
$varvalueArray[strtolower($reqArray[0][$x])] = $reqArray[1][$x];
}
for ($x=0; $x<count($optArray[0]); $x++) {
$varvalueArray[strtolower($optArray[0][$x])] = $optArray[1][$x];
}
for ($x=0; $x<2; $x++) {
$varvalueArray[strtolower($itemArray[0][$x])] = $itemArray[1][$x];
}
$usecvn = ((isset($varvalueArray["usecvn"]) && $varvalueArray["usecvn"] == "true") ? true : false);
$usetest = ((isset($varvalueArray["testingserver"]) && $varvalueArray["testingserver"] == "true") ? true : false);
$usest = ((isset($varvalueArray["storedtransaction"]) && $varvalueArray["storedtransaction"] == "true") ? true : false);
$postXML = "<ewaygateway>".
"<ewayCustomerID>" . $varvalueArray["ewaycustomerid"] . "</ewayCustomerID>".
"<ewayTotalAmount>" . $varvalueArray["ewaytotalamount"] . "</ewayTotalAmount>";

is it something to do with the statement ($x=0; $x<2; $x++) from line 14?

Sign in to reply to this post

Ray BorduinWebAssist

Try:


"<ewayTotalAmount>" . ($varvalueArray["ewaytotalamount"]*100) . "</ewayTotalAmount>";

Please post a support incident on this issue it appears it must be a bug.

Sign in to reply to this post

email377288

"<ewayTotalAmount>" . ($varvalueArray["ewaytotalamount"]*100) . "</ewayTotalAmount>";

thanks this has got it working correctly, will post a support incident on the issue.

not sure if its related but when i add an item to cart with a price of $0.10, the quantity field in the cart also shows 0.1 is this also a bug, i would have thought you cannot buy decimal places of an item? it allows me to do the whole checkout with the quantity set to 0.1

my setup is powerstore reading product information from the products table in the database

Sign in to reply to this post

Ray BorduinWebAssist

You can set up quantity to be a number or an integer in the eCart defintion. Some people sell product by the pound or ounce and quantity can have decimals.

The quantity update seems wrong. It should have a quantity of 1 regardless of the price.

Sign in to reply to this post

email377288

my ecart definition shows quantity type = number (default from install)

also in the database ProductStock type = float (default from install)

is float the correct type in the database? i only require whole numbers for stock and no decimals

Sign in to reply to this post

Ray BorduinWebAssist

Change them both to integer and they will only accept whole numbers (note: you will have to reapply the add to cart server behavior after the change to take effect)

Sign in to reply to this post

email377288

This post has been deleted.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...