Created
December 17, 2013 20:10
-
-
Save dlm423/8011739 to your computer and use it in GitHub Desktop.
new_transaction function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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