Add billing address name to card

This commit is contained in:
Matt-Yorkley
2021-12-03 12:21:30 +00:00
parent 6b8c91845e
commit d22cb0e1e1

View File

@@ -13,6 +13,8 @@
= t('split_checkout.step2.form.stripe.use_new_card')
%div{ "data-controller": "stripe", "data-stripe-key": "#{Stripe.publishable_key}" }
= hidden_field_tag "order[payments_attributes][][source_attributes][first_name]", @order.bill_address.first_name
= hidden_field_tag "order[payments_attributes][][source_attributes][last_name]", @order.bill_address.last_name
= hidden_field_tag "order[payments_attributes][][source_attributes][month]", nil, { "data-stripe-target": "expMonth" }
= hidden_field_tag "order[payments_attributes][][source_attributes][year]", nil, { "data-stripe-target": "expYear" }
= hidden_field_tag "order[payments_attributes][][source_attributes][cc_type]", nil, { "data-stripe-target": "brand" }