Prevent Paypal Duplicate Payments

We have been getting some paypal duplicate payments Using paypal express checkout and keep having to refund customers.

I read the link below and logged in paypal to make sure the setting was to NOT allow duplicate invoice numbers which it was, but upon checking it seems the invoice/order number from cs cart has been appended from 987654 to 987654-2 in paypal so paypal doesnt see it as a duplicate invoice, and takes 2 payments.

Does anyone have an idea if it is CS that is appending the invoice number or paypal?

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

Yes, CS-Cart do it to make each transaction unique. For example, if the repay function is used by the customer (pay order again on the order details page), the PayPal will return error if the transaction does not have unique order ID