-
-
Notifications
You must be signed in to change notification settings - Fork 825
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: convert to use standard payment forms #17886
Conversation
(Standard links)
|
dbb64dc
to
447501f
Compare
I'm working on trying to get the review queue under control so I'm closing out these PRs that acheive the same function closed as open. |
(obviously it might make sense to rebase the branch intermittently to see what might still be worth bringing over from here - ) |
I should note there are 2 significant blockers on this work based on a quick skim
|
58d283f
to
aa83d32
Compare
aa83d32
to
6ed8417
Compare
c009de0
to
9bf74bc
Compare
9bf74bc
to
9bd0da0
Compare
Can be tested by via https://github.com/mjwconsult/civicrm-eventcart |
9bd0da0
to
c80115d
Compare
3cae12e
to
9b0cdca
Compare
|
7358ba4
to
07bc45d
Compare
07bc45d
to
f83448e
Compare
CRM/Core/Payment/AuthorizeNet.php
Outdated
@@ -113,6 +113,10 @@ protected function supportsRecurContributionsForPledges() { | |||
* @throws \Civi\Payment\Exception\PaymentProcessorException | |||
*/ | |||
public function doPayment(&$params, $component = 'contribute') { | |||
if ($params instanceof \Civi\Payment\PropertyBag) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is your work in progress PR & we are not supposed to be looking at it but I stumbled here from your other PR & saw this - we can't actually have something that requires the payment processors to add something like this in what we actually merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've put it there for now but we can also put it in the eventcart code just before calling doPayment()
which would be a nice way of allowing us to pass a propertyBag to a paymentprocessor without requiring any modifications on the paymentprocessor side. Additionally a paymentprocessor could explicitly choose to switch ON legacy warnings once it's suitably converted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep - not requiring any modifications on the processor side is the pre-requisite for us to start passing out propertyBag from any core functions
3a98040
to
2474469
Compare
1910f1a
to
6b3624d
Compare
6b3624d
to
7e14a75
Compare
7e14a75
to
350e9f3
Compare
350e9f3
to
31e29b5
Compare
31e29b5
to
007d84a
Compare
This has merge conflicts and has been sitting for several months with a needs-work tag so going to close but feel free to reopen. |
Overview
Convert the event cart to use standard payment forms and supported interfaces. Builds on #17339.
Before
Very old, unsupported code. Only a single payment processor supported and some don't work (eg. Stripe). Lot's of custom code to create contribution/participants/lineitems and payment made before contribution created.
After
Checkout:
![image](https://user-images.githubusercontent.com/2052161/83862631-203bce00-a71a-11ea-9d8c-665edfffec50.png)
(The pay now button is a sneak-preview of the upcoming google/apple/payment request support in stripe).
Settings:
![image](https://user-images.githubusercontent.com/2052161/90915060-d12b3e00-e3d6-11ea-90fc-4a38e0f5145f.png)
Technical Details
This is a major refactor of the event cart checkout following it's move to an extension. We switch to using standard billingblock functionality and support an independent set of payment processors via settings. (Previously this was guessed from the events in the cart and only one processor could be used).
This switches event cart to use Order API + payment propertybag making this probably some of the most up to date code in CiviCRM!
Comments
@eileenmcnaughton @artfulrobot This is still a work in progress because I've not gone through and verified that receipting is working properly (and may switch to Payment.sendconfirmation for this). But you'll be pleased to see it uses Order API to create the contribution, participants and lineitems. And then uses payment propertybag before calling doPayment.