Page 1 of 1

Paypal Plugin - Error

Posted: 06 Aug 2017, 08:48
by nzrunner
I think I may have found a small code error in your Paypal payment plugin.

Line # 69 in the file /plugins/pcp/paypal_standard/paypal_standard.php formats the invoice number and is currently coded as: -

Code: Select all

$invoiceNr = PhocacartOrder::getInvoiceNumber($order['common']->id, $invoice_prefix, $invoice_number_format, $invoice_number_chars);
However, based on the getInvoiceNumber function, it should also pass the Order Date, and so should read as follows: -

Code: Select all

$invoiceNr = PhocacartOrder::getInvoiceNumber($order['common']->id, $order['common']->date, $invoice_prefix, $invoice_number_format, $invoice_number_chars);
It's not a major issue for Paypal as it looks like Paypal doesn't display the invoice number. However other payment gateways do display the invoice number so it might be worth verifying and correcting the code for others using the Paypal payment plugin as a starting point for developing Phoca Cart payment plugins.

Re: Paypal Plugin - Error

Posted: 08 Aug 2017, 13:58
by Jan
Hi, thank you for the info, I will fix it in next version.

Jan

Re: Paypal Plugin - Error

Posted: 06 Sep 2017, 16:30
by Jan
Hi, fixed in version 3.0.0 RC9.2:
https://www.phoca.cz/download/category/ ... -component

Jan