Skip to content

Instantly share code, notes, and snippets.

@spaomalley
Last active December 15, 2015 05:29
Show Gist options
  • Save spaomalley/5209115 to your computer and use it in GitHub Desktop.
Save spaomalley/5209115 to your computer and use it in GitHub Desktop.
Create a basic order with our API
<?php
require 'Creds.php';
require 'OAuth.php';
$c = new Creds();
$creds = $c->creds();
$links = $c->links();
$accessTokenData = getAccessToken($links, $creds);
$orderInfo = array(
"merchantId"=> $c->merchantId(),
"totalAmount"=> "10.00"
);
$order = new OAuthRequest($links['postOrder'], $creds, $accessTokenData);
$order->createHeader($orderInfo);
print_r ($order->linkArray);
print_r ($order->sendRequest($orderInfo));
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment