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
|