Search code examples
phpapipaypalpayflowpropayflowlink

Error with PayPal Payflow Gateway on mobile devices


I am using PayPal payflow gateway (Hosted Pages - Layout B) - and I have it all set up and working perfectly on desktop browsers.

However, when testing it on a mobile browser, I get the following error:

Token is missing. Please return to the website from where you started your purchase and try again. 

Paypal Error

I am using SECURETOKEN also. Here is my general flow:

  • User fills out name / address / information
  • User clicks Continue to Payment
  • Application sends a post to pilot-payflowlink.paypal.com with CREATESECURETOKEN=Y and SECURETOKENID={36 character token application generates} along with the rest of the POST data that the user submitted.
  • I get a response with RESULT=0 and a SECURETOKEN value.
  • I then redirect the user to https://pilot-payflowlink.paypal.com with the SECURETOKEN and SECURETOKENID in the url.
  • If on desktop, the site works fine. They are taken to the credit card page
  • If on mobile, they get the error noted above.

I am at a sheer loss. The paypal documentation states that layouts A and B will automatically redirect to the mobile page - but instead I am presented with the error below. I have no idea why.

I cannot find anything about this issue anywhere. Help is appreciated!


Solution

  • Adding MODE=TEST resolved the problem. For example:

    https://pilot-payflowlink.paypal.com/?SECURETOKENID=PFNSTI16NNN&SECURETOKEN=9avpLNBIxBEGXNLVPgVbXkQUN&MODE=TEST