Skip to content

Instantly share code, notes, and snippets.

View sparkweb's full-sized avatar

David Hollander sparkweb

View GitHub Profile
@sparkweb
sparkweb / gist:92012734196537603390
Created April 2, 2015 19:29
FoxyShop Reverse Login - Button Version
{% if is_anonymous == 0 %}
{% set timestamp = checkout_date|date_modify("+5 minutes")|date("U") %}
<script type="text/javascript">
jQuery(".fc-receipt-action--continue a.fc-button").attr("href", "http://YOURSITE.COM/foxycart-checkout-complete/?fc_auth_token={{ generate_sso_token(timestamp) }}&timestamp={{ timestamp }}&foxycart_customer_id={{ customer_id }}");
</script>
{% endif %}
@sparkweb
sparkweb / gist:27fc6c0e5dda1959abb8
Last active August 29, 2015 14:18
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 %}
@sparkweb
sparkweb / gist:c6a5a21ab44a23589b9c
Last active September 18, 2021 15:54
Order Desk PHP Client
<?php
class OrderDeskApiClient
{
private $store_id;
private $api_key;
private $base_url = "https://app.orderdesk.me/api/v2";
public $last_status_code = "";
public function __construct($store_id, $api_key) {