-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[WIP] Sylius payum integration #275
[WIP] Sylius payum integration #275
Conversation
@@ -37,15 +38,19 @@ public function displayAction(ProcessContextInterface $context) | |||
*/ | |||
public function forwardAction(ProcessContextInterface $context) | |||
{ | |||
/** @var Order $order */ |
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.
you can do this on the docblock of createOrder and not here
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 agree with you that createOrder is a better place for that.
@@ -52,6 +52,7 @@ public function build(ProcessBuilderInterface $builder) | |||
->add('shipping', 'sylius_checkout_shipping') | |||
->add('payment', 'sylius_checkout_payment') | |||
->add('finalize', 'sylius_checkout_finalize') | |||
->add('do_payment', 'sylius_checkout_do_payment') |
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 want to like the name however there must be some better name maybe
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.
@cordoval you are welcome to propose one.
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.
something with capture or complete purchase?
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.
weird to have something after finalize... maybe the others names should also be renamed
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.
@jjanvier yes I am completely agree with you. I am thinking of such renaming
- finalize to approve
- payment to choose_payment
- do_payment to payment or purchase.
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.
@makasim perfect for me, cc/ @pjedrzejewski
I am testing the integration of payum with paypal but I am having some troubles. I am going to tell you the changes I had to make and the issue that have me stucked. First of all, I have changed the following lines of the DoPaymentStep.php file: 1- Line 23, function displayAction 2- Line 38, function forwardAction 3- Change the function When the process finishes and when I create the order I get this error for the relative url "/payment/capture/{token}": I am attaching an image. Thank you very much |
@chugas I did some BC breaks in 0.6 version, you know it is not stable so I can break it (: I am going to fix it right now. |
@chugas Should work fine except one place: Currently relation between payment details and order is not establish. So the payment always endup with Thanks for your feedback |
Also I am thinking of moving some code from CoreBundle to PaymentBundle. IMO it would be a better place. |
@makasim which part of the CoreBundle would you like to move ? |
the one I added and which related to payum integration. |
Any news about that? |
@jeremyFreeAgent I have lots of ideas and plans how to move it forward but I decided to wait for some feedback from sylius team side. Unfortunately any news so far. |
@stloyd Yeah, or maybe we just move it outside main app. (like it was before) At some point maybe someone/other org would like to adopt it, because we're not going to use it in Sylius apparently. One repo less to maintain is always good. |
PR requires a rebase, @maksim need a hand? :) |
@pjedrzejewski hands are always welcome, I can do something only tomorrow, no time left for today. |
rebased&squashed |
fixed - formapro-forks@aa8e12c |
@pjedrzejewski what is left? I am gonna write some specs today\tomorrow what else should I do? |
rebased&squashed |
My new scenarios for inventory update during checkout are failing, but I'll fix this with another PR. Thank you for your amazing work Maskim, I think it's great start and big step forward. There are some little issues, but we'll iterate on the payments just like with everything else. More in the blog post today, I'm writing it right now. Also I'll register the payum bundle on packagist and update my subtree split script. Thanks to everyone involved in this PR! Awesome work. 👍 |
[WIP] Sylius payum integration
@pjedrzejewski oh my... good news before weekends |
congratulations @makasim :) |
Time for a 🍺 ! Congratz @makasim |
👍 |
👍 @makasim ! |
@makasim 👍 too ! Great work !! Jérémy LEHERPEUR 2013/10/18 Arnaud Langlade notifications@github.com
|
thanks & congratz |
Good job guys |
SyliusPayumBundle is available as standalone package on packagist.org - https://packagist.org/packages/sylius/payum-bundle. |
Awesome, great job guys! |
Awesome! Congratz & great job! |
Hello, I can customize this behavior? |
could you check Let me know if you have other then this reason.
yes it is expected behavior. You have to see a flash message on the home page. Right now you can customize it only extending PurchaseStep. I have plans to add an event there to make such tasks easier to do. |
Thanks, that was exactly what the problem! 2013/10/27 Maksim Kotlyar notifications@github.com
|
Update taxable_interface.rst
The PR attempt to integration payum into sylius e-commerce. Currently it contains two examples. First is offsite payment (paypal express checkout was used) and second credit card payment (stripe via omnipay bridge was used).
Integration
I briefly describe integration steps required. Check Files Changes for more details.
PaymentMethods
. Remove all exist and add Stripe and Payal EC.PurchaseStep
to checkout scenario.Order <-> Payment details relation problem
We should definitely discuss the order <-> payment details relation problem.
Clarification:
Payum does not provide unified payment model in any way. All of them payment specific, do not share any interfaces or parent classes. For paypal rest situation even better: we reuse their official model that comes with
paypal/rest-api-sdk
. The bridge for jms plugings works with itsPaymentInstruction
model. Omnipay does not provide any model yet.How I solve it in customers projects:
We have
Order
toPaymentDetails
realtion (Order is owning side). Let's say one-to-one.PaymentDetails
model implements class table inheritance pattern. There should be a way to dynamiclly add new classes to the map. I think it is possible with metadata doctrine event. I used this strategy in several projects: works fine but I doubt it is the best solution for the e-comerrace platform.Solution:
I added details property to
Paymnet
model (and its iterface). The details contains simple array. This way we do not need any extra models and can reuse current code. Payum native and omnipay's gateways have to work fine with this solution where jms plugins not.Moving payum related code to a bundle
What about moving all payum related stuff to payment bundle? or even better create one
SyliusPayumBundle
. It will contains all integration details.Solution:
Moved.
Credit card processing questions?
Where to ask for credit card (if it is required)? It could be asked on payment method selection method (after user choose one) or inside
CaptureOrderWithXXXAction
.Note: Since it is proof of concept everybody are welcome to discuss\criticize\ask about this PR. I am looking forward to get your feedback.
Solution:
It is asked on the separate page only if payment require it.
TODO (maybe not in this PR (: )