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(medusa-payment-stripe): missing transaction on create payment #2603

Merged
merged 6 commits into from
Nov 14, 2022

Conversation

adrien2p
Copy link
Member

@adrien2p adrien2p commented Nov 14, 2022

What

Add missing transaction in the new stripe base service.
Also, now there is a number of intents equal to the number of expected sessions based on the number of providers instead of for example 3 payment intents for 2 providers.
The number of customers created on stripe is still equal to the number of intent when they are meant for different payment providers such as stripe + stripe blik

FIXES CORE-787

@changeset-bot
Copy link

changeset-bot bot commented Nov 14, 2022

🦋 Changeset detected

Latest commit: 4d922d7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
medusa-payment-stripe Patch
@medusajs/medusa Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@olivermrbl
Copy link
Contributor

/snapshot-this

@adrien2p adrien2p marked this pull request as ready for review November 14, 2022 15:44
@adrien2p adrien2p requested a review from a team as a code owner November 14, 2022 15:44
@adrien2p
Copy link
Member Author

ready just to trigger the snap

@adrien2p adrien2p force-pushed the fix/stripe-missing-transactions branch from f050593 to b059897 Compare November 14, 2022 15:50
@adrien2p adrien2p force-pushed the fix/stripe-missing-transactions branch from b059897 to 45ab3da Compare November 14, 2022 15:50
@olivermrbl
Copy link
Contributor

/snapshot-this

@github-actions
Copy link
Contributor

🚀 A snapshot release has been made for this PR

Test the snapshots by updating your package.json with the newly published versions:

yarn add @medusajs/medusa@0.0.0-snapshot-20221114155607
yarn add medusa-payment-stripe@0.0.0-snapshot-20221114155607

Latest commit: 3aa0827

@olivermrbl
Copy link
Contributor

@adrien2p Snapshot is ready 💪

@LWJerri
Copy link

LWJerri commented Nov 14, 2022

That is most likely not the issue. THis is a missing transaction on payment session creation. Your errors out on cart completion.

@olivermrbl
Copy link
Contributor

Can this PR resolve the possible errors from this issue?

Yes, that is very likely! We are currently testing in staging. Feel free to give the snapshot version a go - the more tests, the merrier.

@LWJerri
Copy link

LWJerri commented Nov 14, 2022

Can this PR resolve the possible errors from this issue?

Yes, that is very likely! We are currently testing in staging. Feel free to give the snapshot version a go - the more tests, the merrier.

Okay. We talk about it here - https://discord.com/channels/876835651130097704/1041669823043731466

@LWJerri
Copy link

LWJerri commented Nov 14, 2022

No, it's still giving me errors.

@LWJerri
Copy link

LWJerri commented Nov 14, 2022

image

image

image

@olivermrbl
Copy link
Contributor

/snapshot-this

@github-actions
Copy link
Contributor

🚀 A snapshot release has been made for this PR

Test the snapshots by updating your package.json with the newly published versions:

yarn add @medusajs/medusa@0.0.0-snapshot-20221114182648
yarn add medusa-payment-stripe@0.0.0-snapshot-20221114182648

Latest commit: 3aa0827

@adrien2p
Copy link
Member Author

@LWJerri can you try the last snap

@LWJerri
Copy link

LWJerri commented Nov 14, 2022

@LWJerri can you try the last snap

Sure, 1 min.

Copy link
Contributor

@olivermrbl olivermrbl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Waiting for @LWJerri to run a test as well 💪

@LWJerri
Copy link

LWJerri commented Nov 14, 2022

LGTM! Waiting for @LWJerri to run a test as well 💪

No, still get this error ;(

@chemicalkosek
Copy link
Contributor

I still think @LWJerri issue is a race condition between stripe webhook completing the cart and storefront completing the cart.

@LWJerri
Copy link

LWJerri commented Nov 14, 2022

I also restarted all services (back, front, admin)

lwjerri@LWJerri:~/medusa/medusa-store$ npm list
medusa-starter-default@0.0.1 /home/lwjerri/medusa/medusa-store
├── @babel/cli@7.19.3
├── @babel/core@7.20.2
├── @babel/preset-typescript@7.18.6
├── @medusajs/medusa-cli@1.3.4
├── @medusajs/medusa@0.0.0-snapshot-20221114182648
├── babel-preset-medusa-package@1.1.19
├── medusa-file-minio@1.1.1
├── medusa-file-s3@1.1.7
├── medusa-fulfillment-manual@1.1.31
├── medusa-interfaces@1.3.3
├── medusa-payment-manual@1.0.16
├── medusa-payment-paypal@1.2.6
├── medusa-payment-stripe@0.0.0-snapshot-20221114182648
└── typeorm@0.2.45

@olivermrbl
Copy link
Contributor

@LWJerri Have you set up the Stripe webhook for the plugin?

@LWJerri
Copy link

LWJerri commented Nov 14, 2022

@LWJerri Have you set up the Stripe webhook for the plugin?

Yes.

@LWJerri
Copy link

LWJerri commented Nov 14, 2022

We can meet in Discord channel and I show you my code.

@chemicalkosek
Copy link
Contributor

chemicalkosek commented Nov 14, 2022

When he disabled webhook, then it worked for him.

@adrien2p
Copy link
Member Author

Yes the amount capturable updated webhook need to be disabled for now. Is that the one?

@olivermrbl
Copy link
Contributor

Alright, let's proceed in Discord. Can I get you to create a fresh entry in the help forum?

I think we should keep it out of this PR

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.

4 participants