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
When calling update cart {{strapi-auth-host}}/medusa/store/carts/cart_01H7B8CKY62W5TA3TCK83VKPS5 after you set shipping_methods and/or payment_sessions, they both get lost .
This is probably because of security or something? But now how am I supposed to add meta info to my cart such as order reference, message & other fields? I have agreement items on my payment step as well that I would like to save to the cart's context.
At the end, the info should be visible in the order on the frontend. The cart's context is the way to go right?
update 1
More info, when I already set a shipping_address, and I update the context, the shipping_address's country_code is set to null, this might be why the shipping_methods is emptied as well. Does this also explain payment_sessions resetting?
Update 2
I am using Strapi for authentication. so my calls go trough there. I send along a header from Strapi to Medusa and use that header to set the using in Medusa by using middleware in Medusa:
When I do not use Strapi for the call, but medusa straight away, it does not occur, so it looks like it because of the middleware part?
However, I just found out that I don't even need to authorize to update a cart using {{medusa-host}}/store/carts/cart_01H7CPN30XGXAFXZ2PATHAXGZN? When I omit the Authorization and medusa-customer-id header, it still succeeds. Is that intended?
The text was updated successfully, but these errors were encountered:
Medusa
1.13.1
.Kosek on Discord suggested to put this up here. Here's the discord thread
When calling update cart
{{strapi-auth-host}}/medusa/store/carts/cart_01H7B8CKY62W5TA3TCK83VKPS5
after you setshipping_methods
and/orpayment_sessions
, they both get lost .This is probably because of security or something? But now how am I supposed to add meta info to my cart such as order reference, message & other fields? I have agreement items on my payment step as well that I would like to save to the cart's context.
At the end, the info should be visible in the order on the frontend. The cart's
context
is the way to go right?update 1
More info, when I already set a
shipping_address
, and I update thecontext
, theshipping_address
'scountry_code
is set tonull
, this might be why theshipping_methods
is emptied as well. Does this also explainpayment_sessions
resetting?Can somebody reproduce this:
shipping_address
{"context": "test"}
in the bodyshipping_address.country_code
isnull
Maybe related: #2683
Update 2
I am using Strapi for authentication. so my calls go trough there. I send along a header from Strapi to Medusa and use that header to set the using in Medusa by using middleware in Medusa:
This way I set the user on the medusa side.
When I do not use Strapi for the call, but medusa straight away, it does not occur, so it looks like it because of the middleware part?
However, I just found out that I don't even need to authorize to update a cart using
{{medusa-host}}/store/carts/cart_01H7CPN30XGXAFXZ2PATHAXGZN
? When I omit theAuthorization
andmedusa-customer-id
header, it still succeeds. Is that intended?The text was updated successfully, but these errors were encountered: