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

[Bug] Partial refund on the same day lead to error #264

Open
jcgdjob opened this issue Oct 20, 2022 · 0 comments
Open

[Bug] Partial refund on the same day lead to error #264

jcgdjob opened this issue Oct 20, 2022 · 0 comments
Labels

Comments

@jcgdjob
Copy link

jcgdjob commented Oct 20, 2022

SyliusPayPalPlugin version affected: 1.x.y
Any
Description
Error: Invoice ID was previously used to refund a capture occur when partial refund on the same order twice on the same day.

Steps to reproduce

  1. partial refund an item
  2. partial refund another item
  3. error: Invoice ID was previously used to refund a capture

Possible Solution
src/Provider/PaymentReferenceNumberProvider.php
Add the time on the ref no. as well:
return ((string) $payment->getId()) . '-' . (new \DateTime())->format('d-m-Y H:i:s');

@jcgdjob jcgdjob added the Bug label Oct 20, 2022
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