Sha256: 81a1762121bc2616fd23c03473ac202d8c4f4b20cd87705c7f3f60e3ad56392b
Contents?: true
Size: 916 Bytes
Versions: 2
Compression:
Stored size: 916 Bytes
Contents
<!DOCTYPE html> <html> <head> <meta charset='utf-8'> <script src='braintree.js'></script> <script src='jquery-2.1.0.js'></script> </head> <body> <div class='form'> <input name='number'> <input name='expiration-date'> <input id='submit' type='submit'> </div> <div id='status'></div> <script> jQuery(function() { var token = <%= @token.to_json %>; var client = new braintree.api.Client({ clientToken: token }); $('#submit').click(function() { var ccInfo = { number: $('input[name=number]').val(), expirationDate: $('input[name=expiration-date]').val() }; client.tokenizeCard(ccInfo, function (error, nonce) { $.post('/credit_cards', { payment_method_nonce: nonce }, function() { $('#status').html(nonce ? 'success' : 'failure'); }); }); }); }); </script> </body> </html>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fake_braintree-0.8.0 | spec/dummy/views/advanced_checkout.html.erb |
fake_braintree-0.7.0 | spec/dummy/views/advanced_checkout.html.erb |