Skip to content

Instantly share code, notes, and snippets.

@ericlbarnes
Created November 25, 2014 18:48
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ericlbarnes/9ad9140a1be61690a09b to your computer and use it in GitHub Desktop.
Save ericlbarnes/9ad9140a1be61690a09b to your computer and use it in GitHub Desktop.
<script>
@if (App::environment('local'))
var $el = $("#card-number");
window.stripeData = {
valid: function() {
$el.val('4242424242424242');
},
successAddressFail: function() {
$el.val('4000000000000028');
},
successZipFail: function() {
$el.val('4000000000000036');
},
fail: function() {
$el.val('4000000000000002');
},
failNumber: function() {
$el.val('4242424242424241');
},
failCVC: function() {
$el.val('4000000000000127');
},
failExpired: function() {
$el.val('4000000000000069');
},
failProcessingError: function() {
$el.val('4000000000000119');
}
}
@endif
</script>
@ericlbarnes
Copy link
Author

For more reference see this post: JavaScript Helper for Triggering Stripe Failures

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment