This file contains hidden or 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
Recurly.buildSubscriptionForm({ | |
/* other options */ | |
subscription: { | |
couponCode: 'testplan' | |
}, | |
distinguishContactFromBillingInfo: true, | |
afterInject: function(){ | |
$('.interval').hide(); | |
}, | |
}); |
This file contains hidden or 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
$signature = Recurly_js::sign(array('account'=>array('account_code'=>'test_gbp_1234'),'subscription' => array('plan_code' => 'instant'))); | |
$signature = Recurly_js::sign(array('account'=>array('account_code'=>'test_1234'))); | |
$signature = Recurly_js::sign(array('account'=>array('account_code'=>'test_382re6'),'subscription' => array('plan_code' => 'test-plan-333806','starts_at'=>'Wednesday, August 22, 2012 12:00:00 PM GMT-6'))); | |
$signature = Recurly_js::sign(array('account'=>array('account_code'=>'tsakdfjl225'),'subscription' => array('plan_code' => 'test-plan-340480','quantity'=>'2','trial_ends_at'=>'Sunday, June 3, 2012 4:35:00 PM GMT-6','unit_amount_in_cents'=>20000))); | |
$signature = Recurly_js::sign(array('account'=>array('account_code'=>'tsakdfjl330'),'subscription' => array('plan_code' => 'setup_fee','currency'=>'USD', 'unit_amount_in_cents' => '22_00'))); | |
$signature = Recurly_js::sign(array('account'=>array('account_code'=>'aaa1234588'),'subscription' => array('plan_code' => 'plan_trial','currency'=>'USD', |
This file contains hidden or 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
try { | |
$pdf = Recurly_Invoice::getInvoicePdf('2149', 'en-US'); | |
} catch (Recurly_NotFoundError $e) { | |
print "Invoice not found.\n"; | |
} | |
header('Content-type: application/pdf'); | |
header('Accept-Language: en-US'); | |
header('Content-Disposition: attachment; filename="downloaded.pdf"'); |
This file contains hidden or 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
#add this after adding your api key, before you make any calls to the API | |
log = logging.getLogger('recurly.http.response') | |
log.setLevel(logging.DEBUG) | |
#create console handler and set level to debug | |
ch = logging.StreamHandler() | |
ch.setLevel(logging.DEBUG) | |
#create formatter | |
formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") | |
#add formatter to ch | |
ch.setFormatter(formatter) |
This file contains hidden or 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
Recurly.buildSubscriptionForm({ | |
/* other options */ | |
afterInject: function(){ | |
$('.month select').val(2); //month | |
$('.year select').val(2016); //year | |
}, | |
}); |
This file contains hidden or 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
Recurly.buildSubscriptionForm({ | |
/* other options */ | |
subscription: { | |
couponCode: 'testplan' | |
}, | |
distinguishContactFromBillingInfo: true, | |
afterInject: function(){ | |
$('.submit').text('Join Playa'); | |
$('div.check').click(); | |
}, |
This file contains hidden or 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 | |
require_once('recurlyphp/lib/recurly.php'); | |
// Required for the API | |
//greenlantern | |
Recurly_Client::$apiKey = 'yourapikey'; | |
Recurly_js::$privateKey = 'yourprivatekey'; | |
$signature = Recurly_js::sign(array('account'=>array('account_code'=>'1'),'transaction' => array('description' => "test trans \n for you",'amount_in_cents'=>'999'))); | |
?> |
This file contains hidden or 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 | |
require_once('recurlyphp/lib/recurly.php'); | |
// Required for the API | |
Recurly_Client::$subdomain = 'yoursubdomain' | |
Recurly_Client::$apiKey = 'apikey'; | |
Recurly_js::$privateKey = 'privatekey'; | |
$signature = Recurly_js::sign(array('account'=>array('account_code'=>'aaa1234588'),'subscription' => array( | |
'plan_code' => 'plan_trial', |
This file contains hidden or 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
£ == £ |
This file contains hidden or 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
Turns this: | |
accounts = Account.all() | |
while accounts: | |
for account in accounts: | |
print 'Account: %s' % account | |
try: | |
accounts = accounts.next_page() | |
except PageError: | |
accounts = () |