Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoice Number preg_replace() adjustment..?? #467

Closed
angelleye opened this issue May 18, 2016 · 0 comments
Closed

Invoice Number preg_replace() adjustment..?? #467

angelleye opened this issue May 18, 2016 · 0 comments
Assignees
Labels
Milestone

Comments

@angelleye
Copy link
Collaborator

A user is reporting that they are using a custom order ID plugin with WooCommerce that generates invoice IDs like this: 0518A1

For some reason, though, the A is getting stripped and the value sent to PayPal is 05181.

Looking at our Express Checkout class I see that we're doing the following with the $invoice_number:

$invoice_number = preg_replace("/[^0-9,.]/", "", $order->get_order_number());

I'm not sure why we're doing that, but it seems that this could be why the A is getting stripped from the value..??

We need to fix this issue, and also check the other gateways to ensure we aren't doing the same thing (ie. DDP, PayFlow, REST, etc.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant