-
Notifications
You must be signed in to change notification settings - Fork 108
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
Allow webform_civicrm to work with any payment processor #100
Allow webform_civicrm to work with any payment processor #100
Conversation
@mattwire cool, thanks for this. But will this break Civi 4.6 compatibility with this module? If so, we'll need to switch between old and new handling depending on Civi version in use. |
@colemanw I don't think there is anything in there that will break 4.6 support but I'm unable to test for a few days yet as I don't have access to a 4.6 dev environment. |
bb76b0d
to
249be8a
Compare
@colemanw Now verified on 4.6. A minor change was required (5d4fa90) to retain compatibility with 4.6. With a little more testing this should be good to merge. @KarinG Could you confirm if iats is working properly for you with this PR (it works for me) as this includes the previous changes on #106 and #90. |
@mattwire Just to note that I have successfully tested this on 4.7 using Stripe. I have not attempted to test the new features, but it does not appear to break anything in my limited testing of existing features. |
Hey @mattwire - so some non-cc payment processors were already working fine w/ webform_civicrm & 4.6 or 4.7 -> notably iATS ACHEFT (Direct Debit/e-Cheque) - I will want to make sure that this does not break that; will try get to that soon. |
42a04dc
to
699a3f7
Compare
699a3f7
to
c51e1dc
Compare
Tested successfully on 4.7.27 using org.civicrm.smartdebit . |
Thank you @davejenx - I want to make sure this does not break an already (pre-PR) working DirectDebit payment integration; will try find time soon. |
Hey @mattwire - sorry for the delay - key thoughts:
We had to - however - revert the PR in which you introduced validatePaymentInstrument #107 as it produced a critical regression in credit card processing - for more than one payment processor; I see you're re-introducing validatePaymentInstrument in this PR; Did you test this PR with e.g. iATS TEST88 credit card and/or Authorize.net fake visa (the funny one with 15 digits); |
c51e1dc
to
4bff0ff
Compare
Hi @KarinG thankyou for your feedback.
Right. So I've changed the title from "non-creditcard" to "any" as that is more accurate. After
It should be tested with:
Background
The reason behind this was actually because we left in the hard-coded customisations which modified fields before passing them to CiviCRM. So now the hard-coded customisations have gone with this PR the failure with validatePaymentInstrument is gone too.
No I haven't. I will try and find some time but I'm not really very familiar with those two processors as I've never used them. Do let me know if you get chance to test with one/both of them. |
Hey @mattwire - it's really the older/core payment processors - for which the validation in core was hard-coded - that need to be tested, i.e. Authorize.net and PayPal; and 4.6 - webform_civicrm module still supports many 4.6 sites; So - how about? |
And I suspect you'll find the same with PayPal... |
@KarinG Just to confirm, did you test authorizenet on 4.7 or just 4.6? And is it only broken on 4.6? |
I ran that on a 4.6/production clone (I don't have any authorize.net clients on 4.7) |
@KarinG I just pushed a possible fix for authorizeNet on 4.6 based on @eileenmcnaughton comments. I haven't tested it yet though as I still need to setup a 4.6 environment. |
That makes sense - that should work; I can pull that in and double check that; |
What about PayPal - can you do a PayPal test on 4.7? |
@mattwire fix above looks right - The unfortunate thing is we have never documented what parameters the payment processors should expect to get in the $params array and I think since 'year' & 'month' have always been passed through there is reasonable to see those as part of the contract. But I think over time we should migrate to using getters on CRM_Core_Payment & try to deprecate the concept of processing the params array in the processors - so we would have $this->getAmount() etc |
I've now tested Paypal pro on 4.7 (Note that I can't complete because I don't have a validated paypal pro test account but running via the phpstorm xdebugger I get past the validation fine then it fails with "security key is not valid"). |
Yeah - I would be wary of anything in this commit that causes something previously passed to be no- longer passed - that also seems like a tangental change to the main goal of using validatePaymentInstrument etc |
b55308d
to
0b26732
Compare
@eileenmcnaughton @KarinG I've just dropped the final commit from here (which added paypal pro parameter fixes for php notices) as I now realise this has nothing to do with my webform changes here and is a general core issue which is now included in this Work In Progress PR against core here: civicrm/civicrm-core@d46f1d6 |
Hey @mattwire - so we need to park this until that core issue gets in - or we break Paypal/Webform integration - is that right? |
@KarinG No, the paypal pro notices are nothing to do with my changes to webform, I thought they were until I ran across this on stackexchange https://civicrm.stackexchange.com/questions/24316/paypal-pro-billing-address-state-province-country-not-being-passed |
Hey Matt - we still need some all the way through testing w/ PayPal on this PR though; |
0b26732
to
3dc9c6b
Compare
3dc9c6b
to
be6c8b8
Compare
…ment processors expect these to be set
…datePaymentInstrument. This allows webform_civicrm to work with other, non-creditcard processors (eg. smartdebit)
…horizeNet and paypal)
be6c8b8
to
0fbd943
Compare
On the same form that we have stripe and gocardless we also have Paypal. I successfully completed a PayPal payment with outcome in civi being that the payment was completed. |
@petednz so that was testing this PR specifically? And the functionality was not working before? |
I can't give that answer - @jitendrapurohit may be able to test to confirm. afaik paypal had not been retested after the upgrade - we found stripe + gocardless were not working post upgrade - this patch fixed for those two - i was then checking to see this fix had not broken paypal - all i can say at this point. |
@petednz @jitendrapurohit - thank you for testing this on PayPal. @colemanw - these Edits are required for Stripe to work with webform_civicrm; they are fine with payment processor extensions - but risky to core-baked-old payment processors like authnet (that failed and Matt fixed it); only outstanding test was a PayPal one - and Fuzion just confirmed that for us. So merging this. |
Now we are using validatePaymentInstrument we don't need to hardcode any of the credit card validation in the webform_civicrm as it's all handled through that function. This PR adds the necessary changes to allow webform_civicrm to use payment processors that do not have credit card fields (tested with smartdebit).
WIP pending further testing - I think this is good to merge, but waiting for it to be tested by a couple of clients first!