You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're currently facing an issue with our Medusa integration. The problem arises when we:
Update a cart by adding the user email (from anonymous users)
Immediately call createPaymentSessions afterwards
It appears that updating the cart triggers a cart.customer_updated event, which has an associated listener. That triggers an updatePayment against the PaymentProcessor
The issue arises from a race condition; depending on its outcome, we might create the payment session before the listener has finished its processing. Since our custom payment processor cannot update sessions, each time we call updatePayment, a new PSP payment session is created.
This results in two sessions:
Session1, which is created and returned to the storefront upon calling createPaymentSessions Session2, which is created but lost once the listener finishes its processing
Although it's difficult to reproduce and somewhat of an edge case, it's proving to be a significant annoyance, and we simply cannot ignore it any longer 😢
Any help/info/advice would be supper appreciated, thanks alot !
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello everyone,
We're currently facing an issue with our Medusa integration. The problem arises when we:
createPaymentSessions
afterwardsIt appears that updating the cart triggers a
cart.customer_updated
event, which has an associated listener. That triggers anupdatePayment
against thePaymentProcessor
The issue arises from a race condition; depending on its outcome, we might create the payment session before the listener has finished its processing. Since our custom payment processor cannot update sessions, each time we call
updatePayment
, a new PSP payment session is created.This results in two sessions:
Session1, which is created and returned to the storefront upon calling createPaymentSessions
Session2, which is created but lost once the listener finishes its processing
Although it's difficult to reproduce and somewhat of an edge case, it's proving to be a significant annoyance, and we simply cannot ignore it any longer 😢
Any help/info/advice would be supper appreciated, thanks alot !
Beta Was this translation helpful? Give feedback.
All reactions