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!
Learn more about us!!
BSS Commerce is a full-service ecommerce agency with 14+ years of experience, supporting 75,000+ customers worldwide. As an Adobe Commerce Solution Bronze Partner and Select Magento Extensions Builder, we deliver trusted end-to-end solutions.
Our core strength is Magento, with 150+ extensions designed to enhance store performance and drive growth. With deep expertise from years of working on Magento websites, we deliver scalable, high-impact solutions backed by strong client trust.
Discover our extensions: https://bsscommerce.com/magento-2-extensions.html
You can refer our top tier extensions:
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article