I have 2 entities in my database: Client and Product. Every time someone places order I store in DB new entity with Client data and some corresponding entities with Products (one-to-many), I don't have any other entity for keeping order as a whole. I added Payum Bundle with simple PayPal configuration and everything is working, but how can I connect payment info with Product? What is the best way to do this? Maybe there is something that I overlooked in Payum Documentation?
Asked
Active
Viewed 284 times
0
-
I think you need another entity for transactions to link the client to a specific transaction and store the payment method in this entity. You may need another entity for payment type to link to the transaction entity. It's very helpful to keep a transaction history for historical purposes. – George Nov 14 '14 at 18:47
-
Right now Product is something like whole transaction (I don't need to know if they were purchased in bulk, I just need to know Product parameters and Client data for that one specific Product). But I was thinking about adding transaction history later so as well I can do it now ;) Can I just use Order entity from PayumBundle Bundle documentation ( http://payum.org/doc/0.12/PayumBundle/get_it_started) as my transaction entity and that will take care of integrating things that I have now with payment informations in DB? – JayKey Nov 14 '14 at 19:02
-
https://github.com/Payum/Payum/blob/master/docs/symfony/get-it-started.md – Maksim Kotlyar Nov 20 '17 at 09:42