M2.4.6, v1.1.2: receive emails with the gift card code twice if pay via PayPal

Created by Esther Nguyen, Modified on Fri, 18 Oct at 10:05 AM by Esther Nguyen

ISSUE:


If I collect payment via PayPal, the recipient will receive an email with the gift card code 2x and with different gift card codes.


I have PayPal set to Payment Action=Sale.


If I have this option set for PayPal, an invoice will be created automatically after payment and this is probably where the problem will be.


When I pay via COD everything is fine, the recipient only gets one email.


SOLUTION:


To resolve the issue, please edit the file app/code/Bss/GiftCard/Observer/AutoGenerateCode.php as below:


If you need any further assistance, please feel free to contact us. We'd be happy to support you!

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article