Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Fri Apr 19, 2024 3:43 pm
Predictive Dialer


All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Bug in E-Product (api_ecommerce.php)
PostPosted: Wed Jun 03, 2009 3:54 am 
Offline

Joined: Wed Jun 03, 2009 12:06 am
Posts: 2
Hi,

I found a bug in E-Product (api_ecommerce.php). When executing the script, the output is 500 Internal server error.

I made a quick solution to the problem with the following changes:

1. In api_ecommerce.php (on line 145) I removed the field userpass, so the line is as follows:
$FG_ADITION_SECOND_ADD_FIELDS = "username, useralias, credit, tariff, id_didgroup, activated, lastname, firstname, email, address, city, state, country, zipcode, phone, simultaccess, currency, typepaid, creditlimit, language, runservice, enableexpire, uipass, sip_buddy, iax_buddy";

2. In api_ecommerce.php (on line 161) I removed the value of the field which corresponded with the field userpass, so the line is now as follows:
$FG_ADITION_SECOND_ADD_VALUE = "'$forceid', '$cardnum', '$useralias', '" . $ec_prod[6] . "', '" . $ec_prod[7] . "', '" . $ec_prod[8] . "', 't', '$lastname', '$firstname', '$email', '$address', '$city', '$state', '$country', '$zipcode', '$phone', " . $ec_prod[10] . ", '" . $ec_prod[11] . "', '" . $ec_prod[12] . "', '" . $ec_prod[13] . "', '" . $ec_prod[14] . "', " . $ec_prod[15] . ", 0, '$uipass', " . $ec_prod[16] . ", " . $ec_prod[17] . "";

3. In api_ecommerce.php (on line 165), same as above I removed the value of the field which corresponded with the field userpass, so the line is now as follows:
$FG_ADITION_SECOND_ADD_VALUE = "'$cardnum', '$useralias', '" . $ec_prod[6] . "', '" . $ec_prod[7] . "', '" . $ec_prod[8] . "', 't', '$lastname', '$firstname', '$email', '$address', '$city', '$state', '$country', '$zipcode', '$phone', " . $ec_prod[10] . ", '" . $ec_prod[11] . "', '" . $ec_prod[12] . "', '" . $ec_prod[13] . "', '" . $ec_prod[14] . "', " . $ec_prod[15] . ", 0, '$uipass', " . $ec_prod[16] . ", " . $ec_prod[17] . "";

4. In lib/Misc.php (on line 656) in function get_productinfo() the query was invalid (at least with my version of mysql), so at the end of the query instead of "... AND id=", I changed it to "... AND cc_ecommerce_product.id="

I hope this bug will be fixed in the next release.

Since this is my first post on the forum, I would like to say thanks to the team of A2Billing. The product is really great, and I hope that you will also produce a great documentation for it.

Best regards to all


Top
 Profile  
 
 Post subject: Re: Bug in E-Product (api_ecommerce.php)
PostPosted: Wed Jun 03, 2009 10:53 am 
Offline

Joined: Sun Mar 12, 2006 2:49 pm
Posts: 954
Location: Barcelona
Hello,

I m going to remove this script and the e-product section from 1.4.1
This part is very badly coded and won't work correctly as it is, there is other issues to generate the sip/iax friends.

I reckon that this is not the way to implement this into A2Billing.
We should focus on using webservice/SOAP in order to create a new account remotely,
although the SOAP module might have issues as well on 1.4

Yours,
/Areski


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 
Voice Broadcast System


All times are UTC


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group