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

Paypaldp.php INVNUM format change to fight duplicated orders #5650

Merged
merged 1 commit into from
Jun 27, 2023

Conversation

njcyx
Copy link
Contributor

@njcyx njcyx commented Mar 14, 2023

As mentioned in the forum:

https://www.zen-cart.com/showthread.php?229318-Advise-needed-to-change-the-format-of-INVNUM-to-fight-duplicated-orders&p=1393626

This PR is a walk around solution to reduce/fight the duplicated orders/submissions. It will reduce the resolution for INVNUM value from 1s to 60s. Paypal will auto denied the duplicated transactions with the same INVNUM number.

Update INVNUM format to fight duplicated orders/submission. Reduce the resolution for INVNUM from 1s to 60s.
@njcyx
Copy link
Contributor Author

njcyx commented Mar 14, 2023

time() function used twice in paypaldp.php. One is for INVNUM. Another is CUSTOM.

Paypal only uses INVNUM to identify whether it is a duplicated order or not, so I only changed INVNUM. CUSTOM remains unchanged.

paypal statement regarding INVNUM can be found here:

https://www.paypal.com/us/cshelp/article/how-do-i-avoid-duplicate-transactions-ts1097

Note: I tested this mod only in zen cart 1.5.7d and it worked. Not sure if the root issue to cause duplicated orders have been fixed in 1.5.8 or 1.5.8a or not.

@scottcwilson scottcwilson merged commit 5de66cc into zencart:v158 Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants