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.