Skip to content

Instantly share code, notes, and snippets.

@yazinsai
Created October 11, 2015 15:02
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 yazinsai/e01fe37f44c8e17527cc to your computer and use it in GitHub Desktop.
Save yazinsai/e01fe37f44c8e17527cc to your computer and use it in GitHub Desktop.
<?php
// Setup Start object
require_once('./lib/Start.php');
Start::setApiKey("test_sec_k_e06df93760b388375e1f6");
// Get the customer ID (usually from your Database)
$customer_id = "cus_abc123def456ghi789";
// Charge the customer (can be done many times, over a period of time)
Start_Charge::create(array(
"amount" => 1000,
"currency" => "aed",
"customer" => $customer_id,
"description" => "Two widgets (test@example.com)"
));
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment