-
-
Notifications
You must be signed in to change notification settings - Fork 126
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
Feature/stripe payment gateway support #256
Feature/stripe payment gateway support #256
Conversation
Is this a first attempt/try at #25? |
…idunot89/wp-graphql-woocommerce into feature/stripe-payment-gateway-support
Yes and no, that issue is kinda of broad and covers a larger part of the schema then just this. This is a small patch that uses the last parameter on the |
Understood! I don't see an issue either. Just trying to understand the bigger picture with this PR. Tks for the feedback. :) |
@kidunot89 I'm still a little lost in relation to this release how do I use it on the front application in me mutation ? |
@rodrigoreeis First you would need to create the end-user's Stripe Customer, Source, and Payment Intent objects using Stripe.js or one of the other Stripe libraries, then you would pass the IDs of each of those objects as meta on the order. I plan on writing a guide or tutorial on this later, but for now I recommend just viewing this test as well as the Stripe helper functions using the If it helps the part the may be the most complex is the creation of the source. The stripe source is the instrument of payment, e.g. credit card, bank info. The test uses a test source provide by the stripe api for the purpose of testing only. |
@kidunot89 anyway I will have to use some example stripe library stripe/react-stripe-elements ?? and I'm still not quite understanding what the role of these fields is |
@kidunot89 I believe that it will not be necessary to answer my question above, I am understanding the fields and the code. I would like to thank you for the great job you are doing with this plugin !! I will probably open some PR in the documentation to be able to make the plugin documentation ! Thanks God bless youuu |
Trying to use checkout mutation with Stripe and coming up empty. Within the mutation I am passing in as metaData: [ {key: "_stripe_source_id", value: "xxx"}, {key: "_stripe_intent_id", value: "xxx"}, {key: "_stripe_customer_id, value:"xxx}]. These values are being generated server side. Any thoughts on what could be going on? |
Just a quick noteFor anyone who arrives at this pull request wondering if all |
@kidunot89 Your link for the example of how this is implemented does not work, do you have an updated link please? |
@kidunot89 the links in your examples do not work anymore. Can you update them? |
@MobyDigg @darrylmorley I messed around with checkout + Stripe over the holidays (with Gatsby) and wrote a blog post about it -> https://jacobarriola.com/post/headless-woocommerce-stripe-checkout-graphql I hope it helps! cc @kidunot89 |
Your checklist for this pull request
Thanks for sending a pull request! Please make sure you click the link above to view the contribution guidelines, then fill out the blanks below.
🚨Please review the guidelines for contributing to this repository.
What does this implement/fix? Explain your changes.
Adds supports for processing payments using the Stripe payment gateway and the
checkout
mutation._stripe_customer_id
,_stripe_source_id
, and_stripe_intent_id
to themetaData
field in theCheckoutInput
when executing the mutation.stripe/stripe-php
library is used to execute the Stripe API requests and create the stripe objects. This process can also be in client-side in Javascript with the Stripe JavaScript libraries and it's encouraged.Does this close any currently open issues?
…
Any relevant logs, error output, GraphiQL screenshots, etc?
(If it’s long, please paste to https://ghostbin.com/ and insert the link here.)
Any other comments?
…
Where has this been tested?
Operating System: Linux Mint 19.2
WordPress Version: 5.2.3