I was asked a question in an interview and I couldn't answer it. Need to know it's answer.
I may not remember the question exactly but it was somewhat as given below:
Suppose, you have a shopping site. When a user buys a product and pays for it you open the user's bank site from your own shopping site. Now, once the payment has been made the response of the bank's site should get displayed on your site. How would you accomplish this?
If I am not understanding you wrong, you want to make online shopping feasible and everything happening real-time, payments being made online and changes being reflected in the bank account then and there.
I believe your shopping site and bank's site should have a tie up. You can not share your shopping cart knowledge with the bank. Bank can not give you the source-code or knowledge of how they are maintaining their transactions, they can only give you some information like, give me account number, give me amount, tell me what transaction to do, i will give you back the response.
I guess your site should be using services from of the bank. Will the term web-services come into play? I dont know because I am learning web-services, but i doubt if that is the case.
I am not closely following yur question, but if the question was after submitting the items in shopping cart and forwarding the purchase details to the payment site and once the payment is made, display the required details in your site, there are 2 things here 1. the payment success state 2. the payment gateway site forwarding back to the origin site based on payment result. If the payment is made successfully, the payment site will itself confirm the same and will forward the user back to the origin site. Based on the success state a specific page/action can be invoked and the required details can be displayed. Usually all this happens in a https , so the required information and payment result can be exchanged as hidden formfields or a complete form submit. Also as mentioned above webservices can also be used here. Hope this helps