Zen Follower
- Join Date:
- Nov 2006
- Posts:
- 127
- Plugin Contributions:
- 0
Square Payment Module for Zen Cart [Support Thread]
brittainmark:
Recent E-mail from square <br>
*************************<br>
<br>
Assume as long as we have correctly set up our "Redirect URL" field on square, to <a href="https://your_store_url.com/square_handler.php" target="_blank" rel="nofollow noopener">https://your_store_url.com/square_handler.php</a> including any subdirectories then all will be well.
The mail I received from Square reads differently. I wonder if anything has to be changed on Zen Cart code.
At the mail I received the redirect URI must match exactly. On the mail brittainmark received, it does not match exactly.
Current State Example
If the redirect URL in the Developer Dashboard is configured to: https://example.com/
And the redirect_uri parameter in the authorization request is: https://connect.squareup.com/oauth2/authorize?client_id=abcd-1234-zyxw&scope=PAYMENTS_READ&redirect_uri=https://example.com/oauth-redirect
Then the request succeeds because the first part of the redirect_uri parameter matches the configured redirect URL.
After February 14th, 2022, the redirect URL sent in the Authorization request must exactly match the redirect URL in the Developer Dashboard or it will error.
Exact Match Example
If the redirect_uri parameter in the authorization request is:
https://connect.squareup.com/oauth2/authorize?client_id=abcd-1234-zyxw&scope=PAYMENTS_READ&redirect_uri=https://example.com/oauth-redirect
Then the redirect URl in the Developer Dashboard must be configured to:
https://connect.squareup.com/oauth2/authorize?client_id=abcd-1234-zyxw&scope=PAYMENTS_READ&redirect_uri=https://example.com/oauth-redirect