Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| v:0.7.1:advanced:sso [2011/09/02 04:55] – [Alternate Uses of SSO] 97.115.192.67 | v:0.7.1:advanced:sso [2018/02/14 15:19] (current) – [The Details] marija |
|---|
| The completed redirect might look something like this (in PHP): | The completed redirect might look something like this (in PHP): |
| <code php> | <code php> |
| $redirect_complete = 'https://yourdomain.foxycart.tld/checkout?fc_auth_token=' . $auth_token . '&fcsid=' . $fcsid . '&fc_customer_id=' . $customer_id . '×tamp=' . $timestamp; | $redirect_complete = 'https://yourdomain.foxycart.com/checkout?fc_auth_token=' . $auth_token . '&fcsid=' . $fcsid . '&fc_customer_id=' . $customer_id . '×tamp=' . $timestamp; |
| header('Location: ' . $redirect_complete); | header('Location: ' . $redirect_complete); |
| </code> | </code> |
| Note that if you append any additional fields //after// the required fields above you still must separate the values with an ampersand (''&''). For example, if you're pre-populating the checkout fields: | |
| <code php> | |
| $redirect_complete = 'https://yourdomain.foxycart.tld/checkout?fc_auth_token=' . $auth_token . '&fcsid=' . $fcsid . '&fc_customer_id=' . $customer_id . '×tamp=' . $timestamp; | |
| header('Location: ' . $redirect_complete); | |
| </code> | |
| |
| |
| === What Happens on Error === | === What Happens on Error === |
| * If the SHA-1 hash passed to FoxyCart does is invalid or doesn't match the supplied cleartext values, the user is redirected back to the store's URL (as configured in the store settings). The only way this should happen is if your SSO endpoint is configured incorrectly, or if a malicious user is attempting to manipulate the redirect URL. | * If the SHA-1 hash passed to FoxyCart does is invalid or doesn't match the supplied cleartext values, the user is redirected back to the store's URL (as configured in the store settings). The only way this should happen is if your SSO endpoint is configured incorrectly, or if a malicious user is attempting to manipulate the redirect URL. |