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

Backend order with Payment link is set to Pending Payment instead of Pending (or custom status) #825

Closed
mountainit-general opened this issue Nov 18, 2024 · 5 comments
Assignees
Labels
Fixed and planned for next release Fix will be included in the next release.

Comments

@mountainit-general
Copy link

Describe the bug
When a store admin creates a backend order for a customer and selects Mollie Paylink as the payment option (with or without specifying a particular payment method), the order status is set to "Pending Payment". If the order lifetime cron is set to a lower number of hours (e.g., the default 8 hours or shorter), the order gets canceled after the specified time.

The Mollie module allows configuring both the order lifetime and the desired order status. However, while you can select any "Pending" (new) status/state, "Pending Payment" is not listed.
Consequently, "Pending Payment" orders are automatically canceled by Magento after the cron job runs, unlike other "Pending"(new) statuses which remain unaffected.

When looking at the code in Model/Methods/Paymentlink.php it seems that indeed it set to Pending Payment
$stateObject->setState(Order::STATE_PENDING_PAYMENT);

We tested using a patch and are able to set the correct order status directly in the code, and there is no 3rd party cause that changes it afterwards. The order stays on our Pending state until paid and is not cancelled.

Used versions

  • Magento Version: 2.4.7-p3
  • Edition: Open Source
  • Mollie Version: v2.42.0

To Reproduce
Steps to reproduce the behavior:

  1. Navigate to the Magento admin panel.
  2. Create a new admin order for a customer.
  3. Select Mollie Paylink as the payment method and place the order.
  4. Verify the order status; it will display as Pending Payment instead of the status configured in the Mollie settings.
  5. Wait for the duration set in the pending payment order lifetime cron settings.
  6. Observe that the order is canceled, and the customer can no longer use the payment link.

Expected behavior

  1. Navigate to the Magento admin panel.
  2. Create a new admin order for a customer.
  3. Select Mollie Paylink as the payment method and place the order.
  4. Verify the order status; it should display as Pending or any other custom pending/new status/state configured in the backend.
  5. Wait for the duration set in the pending payment order lifetime cron settings.
  6. The order should remain in the Pending status for the duration specified in the module configuration (default is 28 days) or until the customer completes the payment via the link.

Actual behavior
Orders set to Pending Payment are canceled after passing the pending payment order lifetime after the cron job runs, regardless of the configured lifetime in the Mollie module. This prevents customers from completing their payments using the provided link.

Screenshots
Order Status Pending Payment
Order status set to Pending Payment after placing via Mollie Paylink.

Cron Configuration
Cron settings for order lifetime.

Mollie Configuration
Order status configuration in Mollie module.

Order Cancellation
Order should get canceled only after the configured cron interval.

Additional context

  • Tested on a fresh installation of a Hyvä demo store with the same Magento version and Mollie module.
@Frank-Magmodules
Copy link
Collaborator

Hi @mountainit-general,

Thank you for providing such a detailed issue description. I’ve scheduled some time with the team tomorrow to conduct an in-depth review of your issue and will get back to you afterward. I appreciate your patience!

@Frank-Magmodules Frank-Magmodules added the Investigating We are working on this issue together with the customer. label Nov 19, 2024
@Frank-Magmodules Frank-Magmodules self-assigned this Nov 19, 2024
@mountainit-general
Copy link
Author

hi @Frank-Magmodules thanks!

@Frank-Magmodules
Copy link
Collaborator

Hi @mountainit-general,

Good news! We’ve addressed the issue you described with a bug fix, which will be included in the upcoming release, likely next week, once we complete our testing program. I’ll keep this issue open for now and will update you here once the new version is officially released.

Thank you for bringing this to our attention and for your patience!

@Frank-Magmodules Frank-Magmodules added Fixed and planned for next release Fix will be included in the next release. and removed Investigating We are working on this issue together with the customer. labels Nov 21, 2024
@mountainit-general
Copy link
Author

Hi @Frank-Magmodules thanks!

No problem, you're welcome.

^ Ingmar

@Frank-Magmodules
Copy link
Collaborator

Hi @mountainit-general,

The moment has arrived—we’ve addressed this in our latest release! 🎉
You can now select the correct status using the “Status New” option under Stores -> Configuration -> Mollie -> Payment Methods -> Payment Link.

I’ll close this issue for now, but feel free to reopen or comment if needed.
Thanks again for your bug report—your input helps us improve the plugin together!

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