Stripe doesn't require full addresses by default, but many businesses choose to always submit payments with full addresses. The Stripe module should support this.
I am looking at a couple ways of implementing this feature. The most straightforward seems to be adding the address data to the call to Stripe.createToken(). These fields do not need to be prevented from submitting to Drupal, as they are not considered sensitive data.
EDIT: this turned out to be way simpler than i thought. Patch will be up shortly.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | commerce_stripe-include_billing_address_in_token_request-2168339-9.patch | 2.92 KB | andyg5000 |
| #2 | commerce_stripe_send_address_with_card-2168339.patch | 2.21 KB | aviindub |
Comments
Comment #1
aviindub commentedComment #2
aviindub commentedpatch.
Comment #3
aviindub commentedComment #4
iler commentedThis is now fixed in RC6.
Comment #5
RaSpirit commentedThis is wrong!
It causes send address values equal to "undefined" to stripe if no address elements found in dom and stripe does not accept any card. Use
if (formInputElement.length)instead, since jQuery returns object even if no element was found by given selector. Also not sure about code added above that, please make sure it is correct.Comment #6
aviindub commentedComment #7
aviindub commentedComment #9
andyg5000Note, this only works if you have the customer profile billing checkout pane on the same page as payment and doesn't not work with a multi-step checkout process. Perhaps we should add the address as js settings and use it if form elements aren't available on the payment page?
Comment #10
andyg5000Currently this only works when the customer billing pane is on the same checkout page as the payment pane. Here's a patch that exports the billing address to Drupal.settings.commerce_stripe_address and uses those values whenever the billing form fields are missing from the DOM.
Comment #11
pnigro commentedExporting the billing address to the js settings also helps when the billing address is displayed with custom markup. I tested patch #10 with commerce_stripe-7.x-1.x-dev (2015-Jan-21) and I get the following:
checking file commerce_stripe.js
Hunk #2 FAILED at 103.
1 out of 2 hunks FAILED
checking file commerce_stripe.module
Thank you for the patch,
Paul
Comment #13
aviindub commentedcode looks good. i dont have a multi-step checkout process set up to test with, but you seem trustworthy :)
Comment #14
aviindub commentedComment #15
aviindub commentedComment #17
svouthi commentedI am interested in Stripe's processing controls for ZIP code and CVC verification. I am still using test mode at Stripe.com (but plan to go live soon), and haven't seen that Stripe receives billing address data (which includes the ZIP code.) I have a multi-step checkout process, and patched my setup with #10.
I now see in addition to POST/v1/charges, POST/v1/tokens at Stripe.com/test/payments/*. When I click on the latter, I now see my public key, payment_user_agent, the last four digits of the card number, the CVC (as asterisks), the card's expiration month and year, and the cardholder name. The address_zip_check still shows as null, as does the other address info.