Skip to content

Instantly share code, notes, and snippets.

Avatar

Theo Mills twmills

View GitHub Profile
View gist:83a8161c77e2c1404610
<script type='text/javascript'>
EasyShip.token = function (orderNumber) {
var $token = "";
$.ajax({
url: "/tokens",
type: "post",
dataType: "json",
async:false,
data: { "order_number": orderNumber }
}).done(function(data) {
View keybase.md

Keybase proof

I hereby claim:

  • I am twmills on github.
  • I am twmills (https://keybase.io/twmills) on keybase.
  • I have a public key whose fingerprint is E29A 5A60 4930 563F CD17 6DBA 88DD 15C8 F711 65EC

To claim this, I am signing this object:

View gist:7649e6abbb4642b6cec3
<?php
$method = "post";
$path = "/presta/index.php";
$params = $_POST;
$json_body = http_get_request_body();
$authenticator = new ShippingEasy_Authenticator($method, $path, $params, $json_body);
$authenticator->isAuthenticated();
?>
@twmills
twmills / account_payload.json
Created Jul 9, 2014
ShippingEasy Partner API New Account Payload
View account_payload.json
{
"account":{
"first_name":"Bonita",
"last_name":"Yundt",
"company_name":"Emard, Becker and Morissette",
"email":"heber@kuhlman.net",
"phone_number":"787.128.7490",
"address":"97509 Littel Throughway",
"address2":"",
"state":"AA",
@twmills
twmills / body.json
Last active Aug 29, 2015
Example ShippingEasy order payload.
View body.json
{ "order":
{
"external_order_identifier":"ABC-100",
"ordered_at":"2014-01-16 14:37:56 -0600",
"order_status":"awaiting_shipment",
"subtotal_including_tax":"10.00",
"total_including_tax":"10.00",
"total_excluding_tax":"10.00",
"discount_amount":"0.00",
"coupon_discount":"1.00",
@twmills
twmills / se_api_find_order.json
Created May 21, 2014
Example response of ShippingEasy API call: find order.
View se_api_find_order.json
{"order": {
"id": 73150,
"external_order_identifier": "45640",
"ordered_at": "2014-03-05T08:00:00Z",
"order_status": "ready_for_shipment",
"total_including_tax": "94.90",
"total_excluding_tax": "0.00",
"discount_amount": "0.00",
"coupon_discount": "0.00",
"subtotal_including_tax": "89.95",
@twmills
twmills / se_api_order_find_all.json
Created May 21, 2014
Example response of ShippingEasy API call: find all orders.
View se_api_order_find_all.json
{"orders": [
{
"id": 73150,
"external_order_identifier": "45640",
"ordered_at": "2014-03-05T08:00:00Z",
"order_status": "ready_for_shipment",
"total_including_tax": "94.90",
"total_excluding_tax": "0.00",
"discount_amount": "0.00",
"coupon_discount": "0.00",
@twmills
twmills / se_example_ruby.rb
Last active Aug 29, 2015
Example ShippingEasy API order hash
View se_example_ruby.rb
{ "order" => {
"external_order_identifier" => "ABC-1004",
"ordered_at" => "2014-01-16 14:37:56 -0600",
"order_status" => "awaiting_shipment",
"subtotal_including_tax" => "10.00",
"total_including_tax" => "10.00",
"total_excluding_tax" => "10.00",
"discount_amount" => "0.00",
"coupon_discount" => "1.00",
"subtotal_including_tax" => "0.00",
@twmills
twmills / order_array.php
Last active Jul 29, 2016
Example payload for ShippingEasy_Order
View order_array.php
<?php
array(
"external_order_identifier" => "ABC-1004",
"ordered_at" => "2014-01-16 14:37:56 -0600",
"order_status" => "awaiting_shipment",
"subtotal_including_tax" => "10.00",
"total_including_tax" => "10.00",
"total_excluding_tax" => "10.00",
"discount_amount" => "0.00",
"coupon_discount" => "1.00",
@twmills
twmills / create_order.sh
Last active Jan 3, 2016
ShippingEasy Example API Call (subject to change)
View create_order.sh
curl -XPOST https://app.shippingeasy.com/api/orders?api_key=fc2d75c0212154d4ff394bfdc436b45a&api_timestamp=1390314539&api_signature=662f775289a34b3852fa28230f396ae73433c793c86b120be6bf7252816d83a1 -d '{
"order" : {
"order_identifier":"ABC-1004",
"ordered_at":"2014-01-16 14:37:56 -0600",
"order_status":"awaiting_shipment",
"subtotal_including_tax":10.0,
"total_including_tax":10.0,
"total_excluding_tax":10.0,
"discount_amount":0,
"shipping_cost_including_tax":1.5,