-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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(payment, stripe) stripe payment cannot be captured #8075
fix(payment, stripe) stripe payment cannot be captured #8075
Conversation
|
@silenaker is attempting to deploy a commit to the medusajs Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me, might have to fix some tests or add new one to complete the existing set of tests. I ll let @olivermrbl double check that I haven't missed anything here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as well
const providerSessionSession = | ||
await this.paymentProviderService_.createSession(input.provider_id, { | ||
context: input.context ?? {}, | ||
context: { ...input.context, resource_id: paymentSession.id }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought: Should the resource_id
be overwritable? In case you want to associate the cart instead of the payment session. The Medusa payment session will always have a direct association with the third-party session through its payment_session.data
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can use a more specific field name to associate the Medusa payment session with the provider session, so as to avoid unintentional overwriting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
session_id
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
session_id
?
it’s ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed resource_id and replaced it with session_id. If other resource identifiers like order_id or cart_id are needed, I think they can be added based on future requirements, as currently, only session_id is the most useful.
3a4e142
to
d80e30f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! @silenaker can you please also update the tests (as you can see, some are failing) so we can have this merged? Thanks!
d80e30f
to
90435fb
Compare
resolved |
ba58842
into
medusajs:develop
Thank you @silenaker |
#8074