New Zenner
- Join Date:
- Aug 2009
- Posts:
- 48
- Plugin Contributions:
- 0
The end of Zen Cart in Europe? SCA kills payments
Thanks, I'll try them out tomorrow and let you know how it goes!
20th Century Glass - Antique & Collectable Glass Store
Views: 13,276
New Zenner
Thanks, I'll try them out tomorrow and let you know how it goes!
20th Century Glass - Antique & Collectable Glass Store
Totally Zenned
Think I have found the error. I had a comma instead of a dot in the square.php which means that the token was not being set as it should be.
Try downloading the latest square.php or change line 217 from
'<input type="hidden" id="card-exp" name="' . $this->code . '_cc_exp">',
to
'<input type="hidden" id="card-exp" name="' . $this->code . '_cc_exp">'.
sorry about that.
Mark Brittain
http:\innerlightcrystals.co.uk\sales\
New Zenner
Thanks so much! That seems to have fixed it. I didn't get an SCA challenge this time, but I guess that is random and is up to the bank. I'll keep it running on my site and let you know if any problems occur.
20th Century Glass - Antique & Collectable Glass Store
Zen Follower
That change stopped the payment modules page in the admin from loading when it reached the Square row.
I tried taking the comma out without adding a period (which looked like the right fix to me) and the admin page loads again, but still clicking Next after entering card details does nothing.
There are no errors in the logs directory. Should there be?
Zen Follower
No, the timed out payments were simply that Paypal failed to respond, even after seconds of waiting.
Some customers phoned to pay by card over the phone and the payments went through OK, so there was nothing wrong with the customer or the card, just the PayPal system being overloaded.
Of course, PayPal denied there was a problem, as usual for payment providers.
And payment attempts made out of business hours just plain failed
Zen Follower
After "fixing" the problem of the comma by removing the comma I get as far as the entering card details, but no further.
So I took the entire zip file which seems to have a ZC1.5.8 installation. I installed it as a clean install, added the UK zone, tax zone, VAT tax rate. Added a test item. Set the Square payment module up (successfully) and it all seems OK.
But still when I've entered the card details and click Continue, nothing happens.
Any suggestions?
Totally Zenned
@hairydog,
Sorry confused.
the correct code is in my git hub https://github.com/brittainmark/zencart/tree/Square_SCA_Compliance and should not need modifying.
I beleive that @WayneStephens has this working.
If you took the download from https://inner-light.co.uk/square.zip this is the original version and should not need modification.
One issue seems to be that the Java script can cache.
For info the lines 212 - 219 of square.php should be
array(
'title' => '',
'field' => '<input type="hidden" id="card-nonce" name="nonce">' .
'<input type="hidden" id="card-type" name="' . $this->code . '_cc_type">' .
'<input type="hidden" id="card-four" name="' . $this->code . '_cc_four">' .
'<input type="hidden" id="card-exp" name="' . $this->code . '_cc_exp">'.
'<input type="hidden" id="token" name="' . $this->code . '_token">',
),
Mark Brittain
http:\innerlightcrystals.co.uk\sales\
Zen Follower
The zip file I used is zencart-Square_SCA_Compliance.zip which I downloaded from your Github
The API I was using was 2020-08-12 I think. I've just updated to the latest version, but that seems to have made no difference.
Good point about javascript cache. I just tried in a different browser. Still nothing happens when I click Continue after entering card details. And no log entries.
Zen Follower
brittainmark:
Do you have locations defined on your square account?
In zen cart in configuration table my MODULE_PAYMENT_SQUARE_LOCATION = Inner Light Crystals:[xxxxxxxxxxxxx]:GBP
where xxxxxxxxxxxxx is the square location id of my online store.You can check your value using sql -
SELECT * FROM configuration WHERE configuration_key = MODULE_PAYMENT_SQUARE_LOCATION
>
> if you use a prefix you will need to add it e.g. configuration = zen_configuration
Something odd here. That query returns no results, but I can see an entry in configuration that has the key
| |
| --- |
| MODULE_PAYMENT_SQUARE_LOCATION |
how does that differ from
MODULE_PAYMENT_SQUARE_LOCATION
?
I can't see a difference!
| |
| --- |
| MODULE_PAYMENT_SQUARE_LOCATION |
Zen Follower
Aha! I have managed to find the problem.
I tried changing cookie settings, and it seems that setting both "Cookie Domain" and "Force Cookie Use" to true have made a difference.
Now I get the SCA popup and everything! :)
But it isn't working on the ZC1.5.6c live site. :(
Zen Follower
Got it working on the live site by the simple expedient of uninstalling, deleting the plugin files, re-uploading them, then reinstalling the payment module.
Thank you very much for making this possible.
To celebrate this success, I've successfully updated another similar site. Perhaps yet another tomorrow, if all goes well in the interim.
Totally Zenned
Good to hear. The change was written by @rocketsites. I just happened to be the one who still had the code and sent it to Zen Cart to fix the issue for the future.
I did discover that if you do not have an entry in the configuration file for loaction then the module failed.
the select should be ```
SELECT * FROM configuration WHERE configuration_key = "MODULE_PAYMENT_SQUARE_LOCATION";
it will return amoung other fields
configuration_key = MODULE_PAYMENT_SQUARE_LOCATION
configuration_value = Location name:[xxxxxxxxxxx]:£££
where: Location name is the location of the store on your square account
[xxxxxxxxxxx] is the loactin code from square and
£££ is the three letter curency code e.g. GBP
If it is not set up then:
Log in to your store admin and go to
admin>modules>payment
Select Square then edit and change the location ID.
You should get a list of the location you have set up on Square.
Select the one that represents your online store and save the changes.
Mark Brittain
http:\innerlightcrystals.co.uk\sales\
Totally Zenned
I have updated the square sca fix it is available at https://inner-light.co.uk/SquareSCA.zip
Mark Brittain
http:\innerlightcrystals.co.uk\sales\
Zen Follower
Does this fix make Square compliant with 3DS 2.0 which Mastercard and Visa will require in UK and EU from October 2022?
From then, Paypal Website Payments Pro included in Zen Cart will no longer be any use - Cardinal (who currently handle SCA for WPP in UK) and Paypal are no longer supporting WPP.
The answer I received from a Cardinal rep
PayPal and Cardinal will not be supporting EMV 3DS 2.1 on our legacy solution for PayPal Pro UK merchants. In order to process EMV 3DS 2.1 transactions PayPal will support this on an alternate solution called Complete Payments.
Unfortunately no-one has written an integration for the new Paypal service and my post about it from Jan has over 700 views but no replies, so it looks like there is no plan to update it for UK/EU stores.
I'd prefer to stick with Paypal need a back-up plan other than Braintree. Square might be the answer.
Totally Zenned
brittainmark:
I have updated the square sca fix it is available at https://inner-light.co.uk/SquareSCA.zip
I was just curious how long you have been with Square? I did try a while ago, after a month they suddenly disconnected me lol. Think my store fell foul of T's and C's for allowed store type somehow, but maybe they have relaxed it a little bit?
Totally Zenned
I have been with them since 2019. Did you create the cron job to keep your token alive? If not, it may just have been that your token became invalid. There are instructions in the README.html file in the mod package.
Mark Brittain
http:\innerlightcrystals.co.uk\sales\
Totally Zenned
I was accepted and using it for a month, then they stopped my account, citing nature of the store I think. It was about 2019 so I just gave up, was strange they must have vetted me but then decided they made a mistake.
Totally Zenned
gsh68:
Does this fix make Square compliant with 3DS 2.0 which Mastercard and Visa will require in UK and EU from October 2022?
From then, Paypal Website Payments Pro included in Zen Cart will no longer be any use - Cardinal (who currently handle SCA for WPP in UK) and Paypal are no longer supporting WPP.
The answer I received from a Cardinal repUnfortunately no-one has written an integration for the new Paypal service and my post about it from Jan has over 700 views but no replies, so it looks like there is no plan to update it for UK/EU stores.
I'd prefer to stick with Paypal need a back-up plan other than Braintree. Square might be the answer.
So far as I know Braintree does not support SCA, I assume this is what you meant?
I tried installing the Okepay plugin but no configuration menu showed up, nothing in error log, no reply from their support.
Vismapay, only available in Finland.
Square, not available in my country.
Caibo, throws up some PHP warnings, no menu displayed for me to enter credit card details, no reply from their support.
Paylike rejected my application
Paypal works fine but some customers do not like it so it would be good to have a SCA compliant alternative.
Totally Zenned
You want the square web pay module, not this fix. This was a temporary fix for the old format that is being retired in june. I do not think there is any difference on the front end for 3ds 1.0 and 2.0 . My understanding is that 2.0 allows the card supplier to assess the risk and authorise the payment with out user input.
Mark Brittain
http:\innerlightcrystals.co.uk\sales\
Totally Zenned
You might have missed> Square, not available in my country.
Also, IF it is available in your country, you might want to check github for new things that might not have been submitted yet.
Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com
Tell staff why this post should be reviewed.