Thanks, I'll try them out tomorrow and let you know how it goes!
Printable View
Thanks, I'll try them out tomorrow and let you know how it goes!
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.
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.
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?
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
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?
@hairydog,
Sorry confused.
the correct code is in my git hub https://github.com/brittainmark/zenc...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
Code: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">',
),
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.
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. :(