WeBid Bug Tracking

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000426WeBid[All Projects] Generalpublic2013-04-09 20:582013-05-31 11:58
Reporterjjjason84 
Assigned To 
Priority@0@SeverityminorReproducibilityhave not tried
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version1.0.6 
Target VersionFixed in Version1.1.0 
Summary0000426: Fee payments using paypal
Descriptionwell i was testing the payment system on my new mod that i am working on i found a new bug on webid and you can blame paypal for this bug in the webid_fees table the values columns need to be edited from double(8,4) to double(8,2) so paypal can read the the fee values if the value is set like this 10.0000 paypal can't read it so it has to look like this 10.00 it took me about 3hr trying to figure out what the problem was. But from what i seen changing the double to (8,2) should not mess up the webid script and paypal only reads the fee table when you are paying buyer fee, pay relist fee, pay auction fee and ect.



This problem is caused in the pay.php page where it reads the fee codes.



Example

[PHP]case 6: // pay buyer fee (live mode)

        if (isset($_GET['auction_id']))

        {

            $_SESSION['auction_id'] = intval($_GET['auction_id']);

        }

        if (!isset($_SESSION['auction_id']) || $_SESSION['auction_id'] < 1 || $system->SETTINGS['fee_type'] != 2)

        {

            header('location: index.php');

            exit;

        }

        $pp_paytoemail = $gateway_data['paypal_address'];

        $an_paytoid = $gateway_data['authnet_address'];

        $an_paytopass = $gateway_data['authnet_password'];

        $wp_paytoid = $gateway_data['worldpay_id'];

        $tc_paytoid = $gateway_data['toocheckout_id'];

        $mb_paytoemail = $gateway_data['moneybookers_address'];

        $query = "SELECT value FROM " . $DBPrefix . "fees WHERE type = 'buyer_fee'";

        $res = mysql_query($query);

        $system->check_mysql($res, $query, __LINE__, __FILE__);

        $payvalue = mysql_result($res, 0);

        $custoncode = $_SESSION['auction_id'] . 'WEBID6';

        $message = sprintf($MSG['776'], $system->print_money($payvalue));

        $title = $system->SETTINGS['sitename'] . ' - ' . $MSG['775'];

        $fees->add_to_account($MSG['775'], 'buyer_fee', $payvalue);

        break;

[/PHP]



Here is the problem

[PHP]$payvalue = mysql_result($res, 0);[/PHP]



It is reading right out of the webid_fees table so the fee amount looks like this in the table.

10.0000



Paypal can't read that as a payment amount so paypal spits out an error saying incorrect payment amount.



Fix

Old webid_fees table

webid_fees > column (value) > double(8,4)



Change the table to

webid_fees > column (value) > double(8,2)



I also tried changing the coding for the fee in the pay.php page to use salt coding but would not work correctly for example

$query = "SELECT value FROM " . $DBPrefix . "fees WHERE type = 'buyer_fee'";

$res = mysql_query($query);

$system->check_mysql($res, $query, __LINE__, __FILE__);

$total = mysql_result($res, 0);

$payvalue = $system->print_money($total);



I tried many different coding's but nothing work so changing the webid_fees > column (value) to double(8,2) fix the problem
TagsNo tags attached.
import_id427
Thread
Attached Files

- Relationships

-  Notes
(0001080)
nay27uk (reporter)
2013-04-10 11:24
edited on: 1970-01-01 00:00

verry old bug from webid 0.8.5 days mate loads of posts on the forum regarding changing iot in the database forget now what tables have 8.4 but there are a few
(0001081)
linux4me (reporter)
2013-04-10 19:09
edited on: 1970-01-01 00:00

nay27uk wrote

verry old bug from webid 0.8.5 days mate loads of posts on the forum regarding changing iot in the database forget now what tables have 8.4 but there are a few

Sorry, I'm a little confused. Are you saying this is a known bug and that changing all the double values from (x,4) to (x,2) is recommended to fix this issue even in 1.0.6., or just in 0.8.5.?

A quick look shows that four-decimal doubles are still used in these tables/columns in a clean 1.0.6. database install:
webid_accounts
[INDENT]amount[/INDENT]
webid_bids
    [INDENT]bid[/INDENT]
webid_fees
    [INDENT]fee_from[/INDENT]
    [INDENT]fee_to[/INDENT]
    [INDENT]value[/INDENT]
webid_increments
    [INDENT]low[/INDENT]
    [INDENT]high[/INDENT]
    [INDENT]increment[/INDENT]
webid_proxybid
    [INDENT]bid[/INDENT]
webid_settings
    [INDENT]fee_max_debt[/INDENT]
    [INDENT]fee_signup_bonus[/INDENT]
webid_userfees
    [INDENT]amt[/INDENT]
(0001082)
jjjason84 (reporter)
2013-04-10 19:16
edited on: 1970-01-01 00:00

That i know of it is only in the webid_fee table where paypal gets the fee amount that the user has to pay and yes it is also in 1.0.6
(0001083)
Yiannis (reporter)
2013-04-23 00:21
edited on: 1970-01-01 00:00

jjjason84 wrote

That i know of it is only in the webid_fee table where paypal gets the fee amount that the user has to pay and yes it is also in 1.0.6



Wow!!! Thanks for that...
(0001084)
nay27uk (reporter)
2013-04-23 12:45
edited on: 1970-01-01 00:00

Yes it is known but maybe not a bug as sutch and I am unsure if it is still in 1.0.6 or not as I have not checked
(0001088)
Yiannis (reporter)
2013-04-30 19:50
edited on: 1970-01-01 00:00

nay27uk wrote

Yes it is known but maybe not a bug as such and I am unsure if it is still in 1.0.6 or not as I have not checked


Hello :)
Yes it is in 1.0.6 version.
The same mod. must be done to the data base for the percentage fees etc. actually any field that has to do with money and decimal points...

Best Regards

Yiannis

- Issue History
Date Modified Username Field Change
2015-04-01 13:17 renlok New Issue
2015-04-01 13:17 renlok import_id => 427
2015-04-01 13:17 renlok Date Submitted 2015-04-01 13:17 => 2013-04-09 20:58
2015-04-01 13:17 renlok Last Update 2015-04-01 13:17 => 2013-05-31 11:58


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker