Skip to content
Snippets Groups Projects
Commit 16aad81a authored by Jani Palsamäki's avatar Jani Palsamäki
Browse files

Issue #1836870 by hbochner: "card number shouldn't go to drupal"

Added a comment.
parent d3237926
No related branches found
Tags 7.x-1.0-rc3
No related merge requests found
......@@ -62,7 +62,10 @@
$btnTrigger = $('.form-submit.auth-processing').eq(0);
var trigger$ = $("<input type='hidden' />").attr('name', $btnTrigger.attr('name')).attr('value', $btnTrigger.attr('value'));
form$.append(trigger$);
// Remove "name" attributes from Stripe related input elements to
// prevent card data to be sent to Drupal server
// (see https://stripe.com/docs/tutorials/forms)
$('[id^=edit-commerce-payment-payment-details-credit-card-number]').removeAttr('name');
$('[id^=edit-commerce-payment-payment-details-credit-card-code]').removeAttr('name');
$('[id^=edit-commerce-payment-payment-details-credit-card-exp-month]').removeAttr('name');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment