HelloTiago Posted December 11, 2012 Share Posted December 11, 2012 Hello there everyone, I installed PrestaShop's latest version and then decided to test the compatibility of a payment gateway I used before. Found some stuff that needed to be updated among the way and I managed to fix that, but then I saw this on the payment validation page: [b]Fatal error[/b][font=Arial, Verdana, sans-serif][size=2]: Call to undefined method PDF::invoice() in... [payment gateway file here][/size][/font] I'm guessing this is because of the PDF invoice creator which appears to be unexistent. Was this method changed in 1.5? How should I proceed? The current code for this is: // Join PDF invoice if ((int)(Configuration::get('PS_INVOICE')) AND Validate::isLoadedObject($orderStatus) AND $orderStatus->invoice AND $order->invoice_number) { $fileAttachment['content'] = PDF::invoice($order, 'S'); $fileAttachment['name'] = Configuration::get('PS_INVOICE_PREFIX', (int)($order->id_lang)).sprintf('%06d', $order->invoice_number).'.pdf'; $fileAttachment['mime'] = 'application/pdf'; } else $fileAttachment = NULL; if (Validate::isEmail($customer->email)) Mail::Send((int)($order->id_lang), 'order_conf', Mail::l('Order confirmation'), $data, $customer->email, $customer->firstname.' '.$customer->lastname, NULL, NULL, $fileAttachment); Looking forward to your replies, Cheers! Link to comment Share on other sites More sharing options...
tuk66 Posted December 12, 2012 Share Posted December 12, 2012 The payment gateway is not compatible with PrestaShop v1.5. It should only use validateOrder() method from PaymentModuleCore class, not to create PDF invoice itself.. Look for example on postProcess() method in /modules/cashondelivery/controllers/front/validation.php. Link to comment Share on other sites More sharing options...
Recommended Posts