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

[ISSUE] Paymentlink does not honor "Days to expire" #796

Closed
Swahjak opened this issue Jul 15, 2024 · 3 comments
Closed

[ISSUE] Paymentlink does not honor "Days to expire" #796

Swahjak opened this issue Jul 15, 2024 · 3 comments
Assignees
Labels
Fixed and planned for next release Fix will be included in the next release.

Comments

@Swahjak
Copy link

Swahjak commented Jul 15, 2024

Describe the bug
A paymentlink does not expire based on the setting, but rather on the selected payment method. If the payment link was not limited to a specific method, it will fallback to the default expiry of 28 days.

Used versions

  • Magento Version number(eg 2.3.5): 2.4.6
  • Open source/Enterprise/B2b: Commerce
  • Mollie version number (Check configuration): 2.40.0

To Reproduce
See Service/Order/MethodCode.php:46 this method attempts to get a specific payment method, but if none was set it will return a blank string. That blank string will then result in the expiry not being honored.

Expected behavior
Paymentlinks should honor the configuration "Days to expire" on the payment link configuration

Actual behavior
Payment links will expire either on the day of the specific selected method or will fallback to the default 28 days.

@Swahjak
Copy link
Author

Swahjak commented Jul 15, 2024

Also I'm pretty sure that Service/Mollie/Order/IsPaymentLinkExpired.php::checkWithDefaultDate will never say it is expired, since we're comparing a date in the future to the order created date.

Looking into it, isn't the same thing happening for on

$expiresAt = $this->expires->atDateForMethod($methodCode, $order->getStoreId());
. The order date is compared to a date in the future, which is always going to be true(?)

@Frank-Magmodules Frank-Magmodules added the Investigating We are working on this issue together with the customer. label Jul 15, 2024
@Frank-Magmodules Frank-Magmodules self-assigned this Jul 15, 2024
@Frank-Magmodules Frank-Magmodules changed the title Paymentlink does not honor "Days to expire" [ISSUE] Paymentlink does not honor "Days to expire" Jul 16, 2024
@Frank-Magmodules Frank-Magmodules added the Bug Bug reported and pending. label Jul 16, 2024
@Frank-Magmodules
Copy link
Collaborator

Hi @Swahjak,

Good news! We've addressed your use case with a fix, and it will be included in the upcoming release after some advanced testing. Thank you for your clear report on this issue; it's much appreciated as always!

@Frank-Magmodules Frank-Magmodules added Fixed and planned for next release Fix will be included in the next release. and removed Bug Bug reported and pending. Investigating We are working on this issue together with the customer. labels Jul 23, 2024
michielgerritsen added a commit to michielgerritsen/mollie-magento2 that referenced this issue Aug 7, 2024
@Frank-Magmodules
Copy link
Collaborator

Hi again @Swahjak, Just wanted to let you know that this issue is also covered in the 2.40.1 release. Thank you for bringing it up! We're closing the issue for now. Have a great evening!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed and planned for next release Fix will be included in the next release.
Projects
None yet
Development

No branches or pull requests

2 participants