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

[BUG] Creating order in admin backend with payment link -> wrong status #757

Closed
simonmaass opened this issue Mar 7, 2024 · 6 comments
Closed
Assignees
Labels
Fixed and planned for next release Fix will be included in the next release. Question / Issue Further information is requested

Comments

@simonmaass
Copy link

simonmaass commented Mar 7, 2024

Describe the bug
When creating an order in the admin backend with payment method "payment link" the order is created with the status "pending". The order should be created with the status "pending payment" as set in the settings:

image

Used versions

  • Magento Version number(eg 2.3.5): 2.4.6-p4
  • Open source/Enterprise/B2b: OS
  • Mollie version number (Check configuration): 2.35.1

To Reproduce
Steps to reproduce the behavior:

  1. Create new order with payment method "Payment Link"
  2. Check new status order is created

There is a much bigger problem behind this!!

If you now create a shipment and ship the order the payment link totally breaks and creates a direct redirect to the order status page which of course cannot display any info and creates this magento error:

TypeError
 
/Magento/Webapi/Controller/Rest/Interceptor.php in Magento\Webapi\Controller\Rest\Interceptor::dispatch

New
Level: Error
substr(): Argument #1 ($string) must be of type string, null given

Expected behavior
Order should be set to "pending payment" and you should not be able to create shipments or invoices!!!

Actual behavior
Order is created as "pending" and only jumps to "pending payment" once you first click on the payment link.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
The problem with this state is that order are able to be shipped in the status "pending" and this can lead to very ugly states!!!

@Frank-Magmodules Frank-Magmodules added the Question / Issue Further information is requested label Mar 11, 2024
@Frank-Magmodules
Copy link
Collaborator

Thank you for opening this issue @simonmaass .

The payment link method has a custom order status option available, which can be found under:
Stores -> Configuration -> Mollie -> Payment Methods -> Payment Link -> Status New.
So it’s expected that it’s not following the other option.

For the other mentioned problem, could you elaborate more about this?
On a vanilla Magento installation with only Mollie installed, Magento is working as expected.

@simonmaass
Copy link
Author

Thank you for the hint with the option of setting a different initial status for payment link orders. Just out of curiosity: What is the reason to not set the order as "pending payment"?

In order to elaborate more about the problem:
If an order is set to "pending" you are able to ship and also invoice this order eventhou the order is not paid yet. When creating a shipment when the order in on pending and it has not been paid yet via the payment link, then the flow is messed up. For example is the payment link redirected to order page (proably the system thinks it is already paid as the order jumps to "processing" if you ship it.

@Frank-Magmodules
Copy link
Collaborator

Hi There @simonmaass ,

Thank you for your response on it, sure, this was roughly the idea this;

  • If a payment link status is set -> Use that.
  • If not, then revert to the default status it was referring to initially.

But feel free to share your thoughts on this as well.

@Frank-Magmodules
Copy link
Collaborator

Hey @simonmaass, I hope everything is fine on your end. Did our previous response answer your question? It appears that this issue may be related more to configuration than being an actual bug within the plugin. We'll investigate further to make this more clear for everyone of course. However, I'm happy to close it if you're satisfied for now.

@simonmaass
Copy link
Author

Hey @Frank-Magmodules , thank you for getting back!

As stated here:
"If an order is set to "pending" you are able to ship and also invoice this order eventhou the order is not paid yet. When creating a shipment when the order in on pending and it has not been paid yet via the payment link, then the flow is messed up. For example is the payment link redirected to order page (proably the system thinks it is already paid as the order jumps to "processing" if you ship it."

Let me try to make it more clear where the bug is created:

  • Create order with payment link (order is set to pending)
  • Now ship the order (before the order is paid)
  • Now click on the payment link -> this will result in the described bug

I hope this will help to recreated the misaligned order/payment status... we are also open for a short video call... BR Simon

@michielgerritsen michielgerritsen added the Fixed and planned for next release Fix will be included in the next release. label Apr 29, 2024
michielgerritsen added a commit to michielgerritsen/mollie-magento2 that referenced this issue May 14, 2024
@Frank-Magmodules
Copy link
Collaborator

Hi There @simonmaass ,

With the instructions of your last response, we were finally able to reproduce the issue. We changed the default status for payment link orders to “pending payment” as it makes more sense. This is available in the last version that we just released.

For now, we'll mark this issue as resolved.
However, please don't hesitate to reach out or reopen if further action is necessary.

Thanks again!

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. Question / Issue Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants