Skip to content

Instantly share code, notes, and snippets.

@mbeale
Last active December 24, 2015 02:59
Show Gist options
  • Save mbeale/6734481 to your computer and use it in GitHub Desktop.
Save mbeale/6734481 to your computer and use it in GitHub Desktop.
$('#submit-btn').click(function({
$.ajax({
dataType: 'jsonp',
url: 'https://(your-subdomain).recurly.com/jsonp/(your-subdomain)/subscribe',
data: {
signature: signature,
billing_info: {
first_name: 'Ned',
last_name: 'Stark',
address1: '1234 Winterfell Rd',
state: 'UT',
city: 'Winterfell',
zip: '84098',
country: 'US',
number: '4111111111111111',
year: '2015',
month: '4',
verification_value: '123',
},
account: {
first_name: 'Ned',
last_name: 'Stark',
company_name: 'House of Stark',
email: '[email protected]'
},
},
success: function (data) {
// do stuff
},
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment