zencart / zencart

Zen Cart® is a full-function e-commerce application for your website.
https://github.com/zencart/zencart/releases
Other
375 stars 233 forks source link

Square rework required #4679

Closed scottcwilson closed 2 years ago

scottcwilson commented 2 years ago

Per Square: We wanted to remind you that the SqPaymentForm JavaScript library will be retired on 07/21/2022 and its functionality will be shut off. SqPaymentForm has been replaced by the Web Payments SDK and we encourage you to migrate as soon as possible by following this step-by-step migration guide.

brittainmark commented 2 years ago

Can we make sure SCA compliance is included.

scottcwilson commented 2 years ago

Can we make sure SCA compliance is included.

Notes on doing this from the current implementation: https://github.com/zencart/zencart/pull/4629

brittainmark commented 2 years ago

Square website https://developer.squareup.com/docs/sca-overview and https://developer.squareup.com/docs/web-payments/sca

Basically, you need to add a verify buyer step. This is fine for all countries, even if SCA is not required. In non SCA countries, no authorisation is requested from the buyer.

You can see the changes I made to make it work in this zip file SquareSca This correctly shows the invalid credit card entries unlike @rocketsites version which was in #4629 it can be downloaded from RocketSquare

If you want, I can branch 1.5.8 and add my version to my git hub for easy comparison.

Things to note. Neither version copes with the person not ticking the accept condition box. In this scenario, all the credit card details are lost. At the moment, if SCA fails, you are returned to the payment details page (re-enter credit card details) all credit card details are blank again on the form.

don't know if you want to post a comment on ZenCart Forum to say this is being looked at.

proseLA commented 2 years ago

https://www.dropbox.com/s/b2pabxh4tk6q1rh/Screencast%20from%2003-16-2022%2007%3A36%3A52%20AM.webm?dl=0

scottcwilson commented 2 years ago

Fantastic progress!

brittainmark commented 2 years ago

Excellent is that with the new web payment method as well.

brittainmark commented 2 years ago

Do you want any testing done?

scottcwilson commented 2 years ago

Please wait until the work is done.

proseLA commented 2 years ago

Excellent is that with the new web payment method as well.

i believe its called the web payments SDK. and yes, it does use that SDK.

Do you want any testing done?

still a ways away from needing outside testing... but will keep it in mind.

scottcwilson commented 2 years ago

Closing this ticket now that we have a plugin at https://www.zen-cart.com/downloads.php?do=file&id=2345

lat9 commented 2 years ago

Given that the plugin works and the square payment method included in the Zen Cart base doesn't, shouldn't the base version be removed from the distribution? We could add informative text to the zc158 distribution's documentation to identify what needs to happen on an upgrade.

scottcwilson commented 2 years ago

Yes, the base version will be removed. And yes the doc needs work - agreed. See #4725 for the core change. The documentation change is being tracked by this issue: https://github.com/zencart/documentation/issues/813

scottcwilson commented 2 years ago

I'd like this to be closed, since it represents the first phase of work, which has been completed. Please open new tickets if need be.

lat9 commented 2 years ago

Sounds good; closing.