Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event Cart: pass the contactID to fix payment on Stripe #14173

Merged
merged 1 commit into from
May 1, 2019

Conversation

mlutfy
Copy link
Member

@mlutfy mlutfy commented May 1, 2019

Overview

When using the Stripe payment processor with the Event Cart, it was not possible to complete the checkout process. When submitting the payment form, it would just loop back to the main form, without any visible error.

Technical Details

I eventually managed to find an exception : Stripe Customer (find): contact_id is required.

And related issue: https://lab.civicrm.org/extensions/stripe/issues/16

The Cart Checkout does not do the same trick as the Event Payment does, so I figured it was simpler to fix it this way.

@civibot
Copy link

civibot bot commented May 1, 2019

(Standard links)

@civibot civibot bot added the master label May 1, 2019
@mattwire
Copy link
Contributor

mattwire commented May 1, 2019

test this please

@mattwire
Copy link
Contributor

mattwire commented May 1, 2019

Question for @eileenmcnaughton What is the preferred syntax for contact ID key in the array? Referencing https://lab.civicrm.org/extensions/stripe/blob/master/CRM/Core/Payment/StripeTrait.php#L51 My "preference" is contact_id but we have quite a few at the moment..

Also @mlutfy If you have the opportunity to do a PR for the normal event payment then we can get rid of this nasty hack: https://lab.civicrm.org/extensions/stripe/blob/master/CRM/Core/Payment/StripeTrait.php#L64

@eileenmcnaughton
Copy link
Contributor

@mattwire yeah I tried to get agreement on that once under Lobo - I failed - although the general interest on standardisation was lower then.

I prefer

  • contact_id in an array & $contactID as a variable - but I think I sometimes use $contact_id too - not sure.

I'm too old fashioned to support $contactId

@mattwire
Copy link
Contributor

mattwire commented May 1, 2019

@mlutfy So if you can change it to $params['contact_id'] (unless you have any strong objections :-) ) then I think we're good to merge this.

@mlutfy mlutfy force-pushed the cart-payment-cid branch from 034032b to 979cc17 Compare May 1, 2019 21:53
@mlutfy
Copy link
Member Author

mlutfy commented May 1, 2019

done!

@eileenmcnaughton
Copy link
Contributor

unrelated fail

@eileenmcnaughton eileenmcnaughton merged commit ad66955 into civicrm:master May 1, 2019
@eileenmcnaughton eileenmcnaughton deleted the cart-payment-cid branch May 1, 2019 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants