Paypal Plugin - Error

Phoca Cart - complex e-commerce extension
User avatar
nzrunner
Phoca Member
Phoca Member
Posts: 33
Joined: 27 Jul 2017, 15:52

Paypal Plugin - Error

Post 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.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Paypal Plugin - Error

Post by Jan »

Hi, thank you for the info, I will fix it in next version.

Jan
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Paypal Plugin - Error

Post by Jan »

Hi, fixed in version 3.0.0 RC9.2:
https://www.phoca.cz/download/category/ ... -component

Jan
If you find Phoca extensions useful, please support the project
Post Reply