Skip to content

Instantly share code, notes, and snippets.

@sparkweb
Last active August 29, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sparkweb/27fc6c0e5dda1959abb8 to your computer and use it in GitHub Desktop.
Save sparkweb/27fc6c0e5dda1959abb8 to your computer and use it in GitHub Desktop.
FoxyShop Reverse Login - JSONP Version
{% if is_anonymous == 0 %}
{% set timestamp = checkout_date|date_modify("+5 minutes")|date("U") %}
<script type="text/javascript">
jQuery.ajax({
url: 'http://YOURSITE.COM/foxycart-checkout-complete/?fc_auth_token={{ generate_sso_token(timestamp) }}&timestamp={{ timestamp }}&foxycart_customer_id={{ customer_id }}',
dataType: 'jsonp'
});
</script>
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment