drastik / com.drastikbydesign.stripe

CMS Independent Stripe payment processor for CiviCRM 4.x
Other
35 stars 48 forks source link

email address is required for "offline" donations #130

Open jmcclelland opened 8 years ago

jmcclelland commented 8 years ago

We just discovered that you can't make an "offline" (aka admin entered donation) if the contact does not have an email address. I think the only reason for that is because the civicrm_stripe_customer table is keyed to the email address. Can this be keyed to the contact id instead? Or does stripe require an email address to make a contribution?

laryn commented 8 years ago

We are just finding this, too, and interested in the answer here.

drastik commented 8 years ago

@jmcclelland Stripe does not require it.

I think we can rip out the queries to civicrm_stripe_customer without any ill effects.

drastik commented 8 years ago

Just to elaborate:

Those queries and the customer id stored there were originally to save on API calls to Stripe early on when this was first built.

Later, Stripe has made numerous changes, and I think we check if the customer_id is in Stripe for verification anyway.

If we stopped using that DB table, I think Stripe would merge new charges to existing customers in its system, opposed to making a new customer for each transaction (if we were to stop storing customer_id locally, and just push charges through without attaching the customer to it).