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

fix(payments-plugin): Idempotent 'paid' Mollie webhooks #2462

Conversation

martijnvdbrug
Copy link
Collaborator

@martijnvdbrug martijnvdbrug commented Oct 17, 2023

This PR fixes:

  • Only add Already paid orderline to Mollie order if it has a value. See more info here about already paid
    image
    ⬆️ We dont want this.
  • Error throwing for multiple Mollie webhooks coming in with status 'paid'. Status update is now idempotent: if Mollie says order is paid but Vendure order is already paymentSettled, we don't do anything and return 200. (It was throwing an error). This was the error thrown when another paid webhook comes in: Failed to process incoming webhook: "Error adding payment to order A47MESUAJY7NVBHV: ORDER_PAYMENT_STATE_ERROR"

@netlify
Copy link

netlify bot commented Oct 17, 2023

Deploy Preview for effervescent-donut-4977b2 ready!

Name Link
🔨 Latest commit 8c20a11
🔍 Latest deploy log https://app.netlify.com/sites/effervescent-donut-4977b2/deploys/652e92c42309f10008b8bf01
😎 Deploy Preview https://deploy-preview-2462--effervescent-donut-4977b2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@michaelbromley michaelbromley merged commit 2f7a8d5 into vendure-ecommerce:master Oct 17, 2023
11 of 14 checks passed
@michaelbromley
Copy link
Member

Thanks Martijn!

@martijnvdbrug martijnvdbrug deleted the fix/duplicate-paid-webhooks branch October 19, 2023 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants