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
4156 1875 9925 4751 |
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
<?php | |
error_reporting(0); | |
ini_set('display_errors',0); | |
ini_set('max_execution_time', 1800); | |
require_once(ROOTPATH . '/lib/Stripe.php'); | |
Stripe::setApiKey("your_test_secret_key_here"); | |
$customer_ids = array('cus_4Gyfqsj4bqxFXl', 'cus_4EkyGLHNkZhTNS', 'cus_4Ejjhhw2HwNUhS'); | |
foreach($customer_ids as $id) { |
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
// The following would create a customer, subscribe them to your penny plan, and cost $1.00/month. | |
$customer = Stripe_Customer::create(array( | |
"card" => $token, | |
"email" => $email_to, | |
"description" => $planId.": ".$somiiPlan." plan.", | |
"plan" => "penny_plan", | |
"quantity" => 100) | |
); |
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
Captain.TicketsShowRoute = Ember.Route.extend | |
model: (params) -> | |
@store.find('ticket', params['ticket_id']) | |
setupController: (controller, model) -> | |
controller.set('model', model) | |
controller.set('queues', @store.all('queue')) | |
renderTemplate: -> | |
@render 'tickets/show' | |
Captain.Ticket = DS.Model.extend |
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
private static String className(Class<?> clazz) { | |
String className = clazz.getSimpleName().toLowerCase().replace("$", " "); | |
// TODO: Delurk this, with invoiceitem being a valid url, we can't get too | |
// fancy yet. | |
if (className.equals("applicationfee")) { | |
return "application_fee"; | |
} else { | |
return className; | |
} |
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 token(token, args){ | |
// You have access to the following: | |
// args.billing_address_line1 | |
// args.billing_address_city | |
// args.billing_address_state | |
// args.billing_address_zip | |
// args.billing_address_country | |
} |
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
<html> | |
<body> | |
<form action="/paypal/purchase_stripe.php" method="post"> | |
<script src="https://checkout.stripe.com/checkout.js" class="stripe-button" | |
data-key="pk_test_YhIozHG3kvG8j0BOkMpvaqtF" | |
data-amount="99" | |
data-name="BakeSpace Cookbook" | |
data-currency="USD" |
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
stripe.customers.cancelSubscription( | |
"customer_id", { at_period_end: true }, function(err, response){ | |
// handle the err/response here | |
} | |
) |
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
stripe.charges.create(obj, function(err, data){ | |
if (err) { | |
// an error occurred | |
} else { | |
// access data here, because it was a successful response | |
} | |
}); |
NewerOlder