PrestaShopCorp / dotpay

Dotpay payment module
1 stars 13 forks source link

Fatal error when the module is installed #7

Closed Quetzacoalt91 closed 9 years ago

Quetzacoalt91 commented 9 years ago

When I install the module a new fresh shop, I get the following error on the module configuration page in the BO:

Parse error: syntax error, unexpected '(int)' (int) (T_INT_CAST) in /home/modules/www/public_html/dotpay/modules/dotpay/dotpay.php on line 262
[PrestaShop] Fatal error in module file :/home/modules/www/public_html/dotpay/modules/dotpay/dotpay.php:
syntax error, unexpected '(int)' (int) (T_INT_CAST)

You should store the result of Configuration::get('DP_ID') before testing it. In example:

        $dpid = (int)Configuration::get('DP_ID');
        if (empty($dpid)) return;
        [...]

Sometimes the URL is not properly built. On my shop I get the following one: http://.com/index.php?fc=module&module=dotpay&controller=callback&id_lang=1?ajax=1

We have a question mark two times in the url.

When I select DotPay as a payment provider, I get the following notice: Notice: Undefined variable: return in /home/modules/www/public_html/dotpay/modules/dotpay/controllers/front/payment.php on line 90 capture du 2015-02-04 15 38 23

'currency' => Currency::getCurrency($cart->id_currency)["iso_code"],

You should store the value of Currency::getCurrency($cart->id_currency) first, and then get the property ["iso_code"].

pkarecki commented 9 years ago

Please check in v. 1.3.4

Thank You!

Quetzacoalt91 commented 9 years ago

Thanks for the changes. We can now proceed to the security review.