title: Building a complete online payment gateway like Paypal
body: <p>So this question isn't about integrating an existing payment gateway into my site. This is more of a architectural question.</p>
  
  <p>I want to build a system similar to Paypal. Now I understand that Paypal offers a lot of features under the roof and I can't implement all of them at once. I want to implement the core functionality of Paypal and other such services.</p>
  
  <p>So my question is (rather discussion is) around how would one go about building such a system. Some points to discuss:</p>
  
  <ol>
  <li>Handle payments through existing banks. I am guessing that I would need access to local bank protocols to get this.</li>
  <li>Allow users to securely store and process their payments</li>
  <li>How does Paypal handle the transactions?</li>
  </ol>
  
  <p>Thoughts?</p>