title: PayPal Payments Advanced Setup Error
body: <p>I am trying to integrate PayPal advanced payments into my website so that users can make payments directly on the website, however I am having trouble with setting it up. This is what my code looks like:</p>
  
  <pre><code>$amt = 10.00;
  $txt = "Pay Now!";
  
  $PF_HOST_ADDR = "https://pilot-payflowpro.paypal.com";
  
  $secureTokenId = uniqid('', true);
  
  $postData = "USER=" . "username"
          .   "&amp;VENDOR=" . "username"
          .   "&amp;PARTNER=" . "PayPalCA"
          .   "&amp;PWD=" . "Password"
          .   "&amp;CREATESECURETOKEN=Y"
          .   "&amp;SECURETOKENID=" . $secureTokenId
          .   "&amp;TRXTYPE=S"
          .   "&amp;AMT=" . $amt;
  
  
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $PF_HOST_ADDR);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
  curl_setopt($ch, CURLOPT_POST, TRUE);
  
  curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
  
  $resp = curl_exec($ch);
  
  if (!$resp) {echo "&lt;p&gt;To order, please contact us.&lt;/p&gt;";}
  
  parse_str($resp, $arr);
  
  if ($arr['RESULT'] != 0) {echo "&lt;p&gt;To order, please contact us.&lt;/p&gt;";}
  
  echo "&lt;iframe src='https://pilot-payflowlink.paypal.com?SECURETOKEN=" . $arr['SECURETOKEN'] . "&amp;SECURETOKENID=" . $secureTokenId . "&amp;MODE=TEST' width='490' height='565' border='0' frameborder='0' scrolling='no' allowtransparency='true'&gt;";
  </code></pre>
  
  <p>I'm using layout C (embedded iframe) instead of A or B (Hosted checkout pages, which would use a form at the end instead of an iframe).</p>
  
  <p>The result I get looks like this:</p>
  
  <pre><code>Array ( [RESULT] =&gt; 1 [RESPMSG] =&gt; User authentication failed ) 
  </code></pre>
  
  <p>And the iframe gives the following error:</p>
  
  <pre><code>Error: Invalid Merchant or Merchant doesn't exist!
  </code></pre>
  
  <p>I am entering the same information I use to log into my account at <a href="https://manager.paypal.com/" rel="nofollow">https://manager.paypal.com/</a> and I have done all the required setup on that website. Any help would be greatly appreciated.</p>