GithubHelp home page GithubHelp logo

magento2-hyva-checkout-stripe's People

Contributors

edubskiyeltrino avatar odi-um avatar wigman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

magento2-hyva-checkout-stripe's Issues

Duplicate Payment in Stripe

Hello,

Thanks for a great module !
I am having an issue where every payment is duplicated in Stripe...

Is there any configuration I missed in Magento or Stripe to avaoid that ?

Regards
T

Improvements needed

  1. We are collecting dispatch value of AppContext through the custom hook src/hooks/useAppContext. However, using dispatch directly is vague and confusing as it clearly does not tell which dispatch it is. Maybe using appDispatch make much more sense here.
  2. It is good to rename hooks below. This way it will be clear the custom hooks are local to stripe payment:
    • useAppContext => useStripeAppContext
    • useCartContext => useStripeCartContext
    • useCheckoutFormContext => useStripCheckoutFormContext
  3. place order method in src/hooks/useStripePayments.js is not passing all the dependencies into useCallback
  4. Dependencies not specified in useEffect here https://github.com/eltrino/magento2-hyva-checkout-stripe/blob/main/src/components/Cards.jsx#L21-#L28

Incorrect additional_data Handling on Payment Submission Retry

Issue Overview:
When submitting payment information through the form, if the initial submission fails due to incorrect details and the user corrects the details for a second submission, the additional_data associated with the payment remains empty or incorrect, leading to a failed submission. This issue occurs despite correct information being provided on the second attempt. The expected behavior is for the additional_data to update correctly with the new, valid details upon re-submission, allowing for a successful payment process.

Steps to Reproduce:

Open the payment form and enter incorrect payment details.
Place order
Correct the payment details to ensure they are valid.
Re-submit the form.
Observe that the submission fails due to additional_data not being updated or reset correctly after the first failed attempt.

Avoid usage of @hyva/react-checkout in the main branch

I understand that this payment integration requires an example template to be set up in order to make it work. But, the support for example template should be an addition and the main branch should aim at the Hyvä Checkout repository itself. This is because the example template is one among the solution with which we can setup Hyvä Checkout.

Developers can set up Hyvä Checkout in app/code directory. They can also create a fork from the repo and do customization through the fork. In those cases @hyva/react-checkout would not work.

I recommend moving the current main branch to some other branch, for example, hyva-checkout-example-template so that those who use the example template can still use the current state. Then replace @hyva/react-checkout reference with the relative reference to the original component. See hyva-checkout-example-template from payone repo.

Reference needs to be corrected:

  1. https://github.com/eltrino/magento2-hyva-checkout-stripe/blob/main/src/components/config.js#L1
  2. https://github.com/eltrino/magento2-hyva-checkout-stripe/blob/main/src/api/stripe/getClientSecret/modifier.js#L3
  3. https://github.com/eltrino/magento2-hyva-checkout-stripe/blob/main/src/api/stripe/getClientSecret/restGetClientSecret.js#L1-#L4
  4. https://github.com/eltrino/magento2-hyva-checkout-stripe/blob/main/src/api/stripe/refreshPaymentIntent/modifier.js#L3
  5. https://github.com/eltrino/magento2-hyva-checkout-stripe/blob/main/src/api/stripe/refreshPaymentIntent/restRefreshPaymentIntent.js#L1-#L4
  6. https://github.com/eltrino/magento2-hyva-checkout-stripe/blob/main/src/components/Cards.jsx#L6
  7. https://github.com/eltrino/magento2-hyva-checkout-stripe/blob/main/src/hooks/useAppContext.js#L3
  8. https://github.com/eltrino/magento2-hyva-checkout-stripe/blob/main/src/hooks/useCartContext.js#L4
  9. https://github.com/eltrino/magento2-hyva-checkout-stripe/blob/main/src/hooks/useCheckoutFormContext.js#L3
  10. https://github.com/eltrino/magento2-hyva-checkout-stripe/blob/main/src/hooks/useStripePayments.js#L2-#L4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.