Answer the question
In order to leave comments, you need to log in
What is the optimal structure of the database of the site's payment system?
Approximately I imagine how it should be, but I'm interested in, let's say, "best practices" so as not to reinvent the wheel. As I imagine it, there should be an orders, payments, payment_types, payment_statuses table and possibly also xxxxx_response tables for the responses of the respective payment systems. Scheme of work: the buyer (registered user) selects a product and after choosing the payment method (payment_types), an entry is created in orders with the corresponding status. Perhaps webhooks or cron scripts will be used, but these are details. Interested in the optimal scheme of such a database structure with fields and relationships. Googling didn't work.
Answer the question
In order to leave comments, you need to log in
Table xxxxx_response is not needed!
The script from the payment system immediately changes the STATUS of the order.
Table one - ORDERS. It is connected with the PRODUCTS, BUYERS table and perhaps enough for you)))
All the best practices for creating a store alone end with obtaining a passport and the beginning of a real adult life with girls, blackjack and cognac.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question