PayPal subscription - PayPal Sandbox

13 replies [Last post]
webhuni
Offline
Joined: 09/20/2009
Status: 
Answered

I can't use the Sandbox mode of my site with paypal subscription module. I get error message :

The link you have used to enter the PayPal system is invalid. Please review the link and try again.

This message I receive only in Sandbox mode.

Please help to resolve.

 

Best regards,

Hunor

Leighton Whiting
Offline
Joined: 06/02/2009
Hunor, This error is most

Hunor,
This error is most commonly caused by a 'space' in the paypal sandbox email that you used for the subscription plan. This is because when you copy and paste it from paypal, there is usually a space inserted as well. Paypal needs to fix this, because it causes a lot of problems. Can you check to make sure that there are no spaces in the email address you used?

Another reason is a possible error in the variables being sent to Paypal, but it is much less common.

Sincerely,
Leighton

webhuni
Offline
Joined: 09/20/2009
No space

Hi ,

 

I checked for a few time but no space in the email address.

(This error comes only in sandbox mode?)

What can I do to resolve this problem?

 

Best regards,

Hunor

webhuni
Offline
Joined: 09/20/2009
Sandbox

What can I do to resolve this error?

 

Mambo89
Offline
Joined: 11/07/2009
same here

Hello, i have the same problem and my email is also typed correctly. I hope you can help both of us:)

Thnx, by. 

Leighton Whiting
Offline
Joined: 06/02/2009
I gave this some more

I gave this some more thought, and it seems that there are only a few reasons for this error to be there:

1) You mistyped the Paypal Sandbox email (most common)

2) The email you are using is not a Paypal Sandbox email (some people don't realize you have to have a special Sandbox account to use the Sandbox testing)

3) Your site is installed on a strange path and Drupal is not able to find the correct $base_path, so Paypal is being sent invalid return and notice URLs

It seems that number 1 is not the problem here, but can you confirm that the email addresses you are using are Paypal Sandbox emails?

Also, can you confirm whether you are using drupal on a strange path (something other than www.yoursite.com)? This normally shouldn't be a problem, but sometimes Drupal gets confused about the $base_path variable and it needs to be set in your settings.php file to fix this.

Also, if none of these solve the problem, please message me with your site so that I can go try it out. I can inspect the Paypal Variables and see what the problem is firsthand.

Let's get this fixed so that you can continue with your site development! :)

Sincerely,
Leighton Whiting

Leighton Whiting
Offline
Joined: 06/02/2009
To follow up on this, after

To follow up on this, after speaking with Mambo via email, we determined that the cause of the error was due to using a non-Paypal Sandbox email address. To reiterate, you must have a Paypal Sandbox account to use the Sandbox Testing feature. It is free to use, just go to http://sandbox.paypal.com to sign up for one.

Sincerely,
Leighton Whiting

beth56
Offline
Joined: 07/10/2010
same issue

I'm having the same issue. I've confirmed the proper email with no spaces. It is the Paypal Sandbox 'buyer's' email that I created to test out the purchase. I'm running the drupal site in a sub-directory (http://blahblah.com/test) so I'm wondering if it's the $base_path you mentioned. If so, how to correct this?

Thanks!

~ Beth

beth56
Offline
Joined: 07/10/2010
settings.php

I edited the settings.php file, adding the subdirectory: $cookie_domain = 'mysite.com/test';

Now I can log in to paypal with my test buyer account but the dollar amount for the purchase is zero - and it's asking the buyer to enter a purchase amount other than zero ... not good!

Please help.

~ Beth

Leighton Whiting
Offline
Joined: 06/02/2009
Beth, It may be that your

Beth,
It may be that your user account record for the anonymous users has been deleted. This error happens randomly on some drupal sites, and to fix it, you need to re-add the record in your Drupal users table. Check the user table and see if there is a record with uid 0. If there is, then it must be something else.

The problem with not having a user record for the anonymous user, is that it won't save the SESSION info for that user, which is used by most Shopping Cart solutions such as MoneyScripts. I suspect that the order info wasn't being passed to PayPal because of that.

Sincerely,
Leighton Whiting

beth56
Offline
Joined: 07/10/2010
OK I checked the Users table

OK I checked the Users table and there is a uid 0. There is no content for that entry which I guess is how it should be ...? I've attempted this with this particular user about 8 times, so if I go into Profile->Order History it does show all of my attempts that were unfinished. Do I need to clear these out somehow? Not sure what other info to provide to you that would be helpful.

~ Beth

beth56
Offline
Joined: 07/10/2010
Update

I rebuilt the permissions (as prompted when I logged back into my drupal admin account) and then reloaded my buyer drupal account and now I'm back to the dead link error when I try to log into paypal sandbox with my test buyer email account. :-/ ~ B

Leighton Whiting
Offline
Joined: 06/02/2009
Beth, Yes the uid 0 in your

Beth,
Yes the uid 0 in your table looks correct. Can you email me your login information for drupal so I can take a look at the settings?

support@moneyscripts.net

Sincerely,
Leighton Whiting

beth56
Offline
Joined: 07/10/2010
Issue solved

After Leighton took the time to review my site, we realized that I had not configured it correctly. Even though I was using the fake paypal sandbox buyer account to purchase the ad, I still had the wrong email account listed on the Paypal WPS Configuration Page.

To configure the account correctly with paypal sandbox go to Home > Administer > MoneyScripts > Gateways > PayPal WPS and where it says "Seller PayPal Email" at the top, enter the fake seller email that sandbox created for you (ex: blahblah_1234567_biz@gmail.com). This matched with the fake sandbox buyer email account worked for me.

Thanks Leighton!

~ Beth

Twitter Feed