You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 18, 2021. It is now read-only.
Logic: Instead of posting cc, cvv, etc, grab them with js, call stripe.js, get token, inject token, post token
Problem: Hook on what, Magento isn't submiting forms on checkout, he's "collecting" payment info with js and sends it with ajax on both payment continue and place order. Sending payment info through ajax 2 times + validate() in pgw 2 times. So we can't use onsubmit or similar.
_ajax( something + payment.form.serialize() )
Integration:
It seems the only way to achieve this is to mess with Magento checkout javascript (rewrite core widgets, block on continue click or similar) which is slightly aggressive. Also, I assume things are different in onepage vs multishipping vs order from admin, not to mention future onestep checkouts.
I also can't find custom "fire" events in js which exists in Mage1. Most likely they didn't need them yet for Mage2 EE :)
It's interesting that similar rewrites are seen in \app\code\Magento\Authorizenet\view\frontend\web\js\direct-post.js ( placeOrder.off('click').on('click', new_logic) )
One more thing, I didn't test, but it's mentioned at one place that "stripe tokens can only be used once". Since multishipping is creating multiple orders in a loop, multiple payment calls are executed, so token approach can't work here ?!?
Conclusion:
Funny thing is, if we implement usual backend cc non-token way, we're compatible with everything at the same time.
Go with backend cc approach, branch stripe.js approach and make it work on onepage as Mage2 practice for start? Suggestions?
The text was updated successfully, but these errors were encountered:
Since implementation as usual backend cc wouldn't require almost any changes compared to Mage1 version, I would suggest to branch stripe.js and proceed with tokens.. Of course, this implies that multishipping will not be available with this method.
Logic: Instead of posting cc, cvv, etc, grab them with js, call stripe.js, get token, inject token, post token
Problem: Hook on what, Magento isn't submiting forms on checkout, he's "collecting" payment info with js and sends it with ajax on both payment continue and place order. Sending payment info through ajax 2 times + validate() in pgw 2 times. So we can't use onsubmit or similar.
_ajax( something + payment.form.serialize() )
Integration:
It seems the only way to achieve this is to mess with Magento checkout javascript (rewrite core widgets, block on continue click or similar) which is slightly aggressive. Also, I assume things are different in onepage vs multishipping vs order from admin, not to mention future onestep checkouts.
I also can't find custom "fire" events in js which exists in Mage1. Most likely they didn't need them yet for Mage2 EE :)
It's interesting that similar rewrites are seen in \app\code\Magento\Authorizenet\view\frontend\web\js\direct-post.js ( placeOrder.off('click').on('click', new_logic) )
One more thing, I didn't test, but it's mentioned at one place that "stripe tokens can only be used once". Since multishipping is creating multiple orders in a loop, multiple payment calls are executed, so token approach can't work here ?!?
Conclusion:
Funny thing is, if we implement usual backend cc non-token way, we're compatible with everything at the same time.
Go with backend cc approach, branch stripe.js approach and make it work on onepage as Mage2 practice for start? Suggestions?
The text was updated successfully, but these errors were encountered: