Skip to content

Instantly share code, notes, and snippets.

@dlm423
Created December 17, 2013 20:10
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 dlm423/8011739 to your computer and use it in GitHub Desktop.
Save dlm423/8011739 to your computer and use it in GitHub Desktop.
new_transaction function
function new_transaction($cc_token=NULL, $total=NULL, $order_id=NULL){
$customer = \Balanced\Customer::get('/v1/customers/CU7guBPfer2uEkOEopU0KgXl');
$transaction=$customer->debit($total*100, array('MerchantFuse.com'), "MerchantFuse Order #".$order_id, $cc_token);
return $transaction->uri;
}
//Note: I tried both of the following as values for $cc_token
// /v1/customers/CU7guBPfer2uEkOEopU0KgXl/cards/CC1KxhXOuHYrwGR8opxLuKjQ
// /v1/marketplaces/TEST-MP7zdo0P3hVyCJv5jGH4OVPo/cards/CC1KxhXOuHYrwGR8opxLuKjQ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment