PayPalPlugin icon indicating copy to clipboard operation
PayPalPlugin copied to clipboard

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

Open jcgdjob opened this issue 3 years ago • 0 comments

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 avatar Oct 20 '22 11:10 jcgdjob