Giter VIP home page Giter VIP logo

Comments (5)

williankeller avatar williankeller commented on June 9, 2024

Hi @rg-srini, thanks for your comment, we already have this issue tracked. In fact this module don't work properly with external payment methods. We are working pro provide a new version with these fixes.

from magento2-split-order.

rg-srini avatar rg-srini commented on June 9, 2024

Thanks a lot. We are also trying at our end.

Ref:
https://webkul.com/blog/create-payment-transaction-in-magento2/

from magento2-split-order.

wsheldon avatar wsheldon commented on June 9, 2024

Hi @rg-srini and @williankeller, I forked this and spent a few days trying to get this to work with Braintree. You'll likely run into the same issues I did which is that, for a vaulted Braintree card, it's fairly easy to get a new payment nonce for each split but for non-vaulted card, you've got to temporarily vault the card to get a re-usable token, which may be against customer's wishes. I didn't even get into PayPal once I hit this obstacle. Ideally, you'd have one auth and captures per split but it looks like Braintree uses the order number as part of allowing a capture, so each capture would have to be against a parent order. Gets pretty complicated. One of the devs on the M2 Slack channel said they did this in the past with 'meta' orders, so one parent order holds all of the payment info and there are meta 'child' orders for warehouse. Hope that helps a bit. Good luck!

from magento2-split-order.

williankeller avatar williankeller commented on June 9, 2024

Thanks for the feedback @wsheldon, I'll look into the meta orders.

from magento2-split-order.

williankeller avatar williankeller commented on June 9, 2024

The reason this doesn't work is the same reason why all native Magento online payment modules do not work with the multi-address checkout flow.
Credit card authorizations can only be captured once. In the auth-only order flow, the authorization is redeemed when the order is invoiced.
This creates issues when generating multiple invoices for a single order and/or payment authorization.

The Auth.net CIM module that @pmclain made work with multi-address shipping by creating a separate authorization for each order created when the user places an order. Here's a link to the full group of commits https://github.com/pmclain/module-authorizenetcim/pull/2/commits.
Here was the flow I used at a very high-level:

  1. Card information is tokenized via accept.js client side
  2. Card token is passed with the order placement request for redemption as a new authorization, but the token is a one-time use.
  3. The token is converted to a stored payment source in CIM. The CIM API returns the new payment source which is available for future transactions.
  4. The re-usable payment source is stored in a singleton object.
  5. As each order is created the module pulls the payment source from the singleton.

This approach works but is not ideal because you are forced to store the card in CIM even if the user opted to not store the card for future use via the Magento_Vault. This probably creates compliance issues with privacy laws such as GDPR.

Sorry, I don't have a good answer. This has been something that has bothered me for the last months.

from magento2-split-order.

Related Issues (20)

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.