Last post Jun 02, 2020 07:13 AM by Yang Shen
May 21, 2020 02:18 PM|Donald416|LINK
I am working on a project, and almost completed but there is an obstacle I am facing in my project. I want to make user's deposited funds to display on my webform when a user makes deposit to his or her web account and supposed a user uses a service and
gets charge for it, there should be a reduction of the funds from the user's web account and the remaining balance should also be displayed (changing from the previous balance to the current balance). I know how to integrate payment gateway, but the issue
here is the user will click on a "deposit button" and will be redirected to the gateway to effect payment and after completion, the payment will be displayed on the web form and also, how to effect deduction if the user clicks a button to use a service. Please
i will want to get full details of how this can be done and if there is a tutorial on this, I will like to know how to go about this. Thank you
May 21, 2020 03:14 PM|wavemaster|LINK
Ok, what you need to do is keep track of (i.e. stored) payment status, so you can display that deposit button.
Then when the payment gateway finalizes the transaction it will send you some confirmation message. That information will also be stored.
Then you will need to add some logic to keep track of things. Most likely there will not be any tutorials relevant to your application.
What payment gateway are you using?
May 21, 2020 05:53 PM|Donald416|LINK
May 21, 2020 07:42 PM|mgebhard|LINK
Your question spans the .NET stack and general design. What problem you are trying to solve? Do you need help designing a ledger to store debits and credits? Do you need help writing a SUM query to get the user's balance? Do you need help interfacing
with a payment gateway? How do you currently keep track of the user's balance and why are you unable to display the balance?
May 21, 2020 08:08 PM|Donald416|LINK
May 21, 2020 09:07 PM|mgebhard|LINK
I know how to embed payment gateway, and I don't want to currently keep track of the user's balance but the user will see balance once the user is logged in to his or her account. Regarding the rest you mentioned - SUM query, payment gateway interfacing, credits
and debits I really don't know how those are included in a Website
I still do not know the exact problem you are trying to solve. I'll provide a design approach. Always use standard accounting practices when handling financial transactions. For a real life example, login to your bank and take a look at your checking
account transactions. You'll notice each record is a debit or credit. Follow this logic in your application. Every transaction is a record. A credit record is positive and a debit is negative. Then all you have to do is SUM the debits and credits to get
the user's balance.
May 21, 2020 09:27 PM|wavemaster|LINK
Begin with making a list (the old fashioned style) with what you need to know about this user to make this work:
userId / created / status / ...
Then you need to create the tables in your db to keep track of this.
Then write the code to populate this data at the various stages in your application
Then write the code to take information from your payment gateway and add that data to the db
May 22, 2020 09:13 AM|Donald416|LINK
May 22, 2020 12:54 PM|Donald416|LINK
Thank you mgebhard,
I think I have a clue of what you mean. I have a few questions to ask though. I already have a table that serves as sign up and login for users; it has email, username and password. Will I have to add three columns like credit_amount, debit_amount and balance_amount
(AS INTEGERS DATA TYPE) to the table, that will serve as
And if so, will there be a way to make the already existing table accept data into fields like email, username and password, with other new fields like credit_amount, debit_amount and balance_amount being empty ? I dont know how to interface
with a payemtn gateway and also coding for credit, debit and sum query. Please kindly help. thank you.
Jun 02, 2020 07:13 AM|Yang Shen|LINK
Will I have to add three columns like credit_amount, debit_amount and balance_amount
(AS INTEGERS DATA TYPE) to the table
Since the table serves as sign up and login for users, i would suggest to create a new table for storing the users' financial related information.
And if so, will there be a way to make the already existing table accept data into fields like email, username and password, with other new fields like credit_amount, debit_amount and balance_amount being empty ?
Sure, unless the fields(credit_amount, debit_amount and balance_amount) are set to be
how to interface with a payemtn gateway
Please check payment gateway for asp.net page.
coding for credit, debit and sum query
I think this is just simple calculation with records in your table, credit(+) plus debit(-). Maybe you can share some code you are testing with and having troubles so that the community can provide suggestions specific to your questions.