title: Extracting Express Checkout Tokens
body: <p>When it comes to PayPal I'm a total newbie, so, sorry if this is answered somewhere else.  I've checked in multiple locations including here and have been unable to find any information.</p>
  
  <p>I want to integrate paypal with python.</p>
  
  <p>My problem is I'm trying to implement Express Checkout in an e-commerce site.  I'm working on kind of a dummy test site using sandbox to try and get it to work.  As a reference, I've been using <a href="https://cms.paypal.com/cms_content/en_US/files/developer/PP_ExpressCheckout_IntegrationGuide.pdf" rel="nofollow">https://cms.paypal.com/cms_content/en_US/files/developer/PP_ExpressCheckout_IntegrationGuide.pdf</a></p>
  
  <p>Chapter 6 as a guide on how to do this.</p>
  
  <p>Where I'm at now is I've gotten everything to work, up until I need to extract the Tokens after a successful invocation to the PayPal API.  Essentially, I get a message in the browser that looks like</p>
  
  <pre><code>TIMESTAMP=2007%2d04%2d05T23%3a23%3a07Z
  &amp;CORRELATIONID=63cdac0b67b50
  &amp;ACK=Success
  &amp;VERSION=52%2e000000
  &amp;BUILD=1%2e0006
  &amp;TOKEN=EC%2d1NK66318YB717835M 
  </code></pre>
  
  <p>First, how do I extract the ACK and TOKEN values from the message?  Are these part of hidden query string that I could extract by using something like <code>Request.QueryString["TOKEN"]</code>? </p>
  
  <p>Technically, all I need to do is extract and check if ACK is successful, otherwise redirect back with an error.  If sucessful, I need to extract the token and continue on to paypal and eventually redirect to my order review page. </p>
  
  <p>How do I extract the tokens? </p>
  
  <p>How do I redirect the browser from this page?  (I'm working on a local copy that hasn't been uploaded yet. </p>
  
  <p>Sorry for the wall of text.  Please let me know if anyone has any other resources I could review, or if you have any suggestions or solutions for me.</p>