PDA

View Full Version : Testing with PayPal


The Geek
08-24-2005, 07:35 PM
GeekMart integrates with PayPal's Instant Payment Notification system that alerts GeekMart when an item has been physically paid for regardless if the payment was made with a credit card or a paypal balance transfer.

To facilitate testing, PayPal has set up a 'snadbox' that emmulates every aspect of the normal PayPal service except for one: No money ever changes hands.

That means you can set up GeekMart to work with PayPal's sandbox in order to test out the facilities before you actually go live.

In this tutorial ill walk through the steps required to set up a sandbox account and configure GeekMart to send and recieve information to the sandbox instead of the real Mcoy.

The first thing you need to do is set up an account at https://developer.paypal.com/

Once you have verified your account information, log in to developer.paypal.com and click the sandbox tab.
There you will be able to create as many test accounts as you wish.
Please note that these accounts only exist in the sandbox however they are still bound to all the same paypal rules and restrictions.
Also, notice the email tab? That is where all the email for your test accounts go (i.e. payment notices, etc...).

When you have a business account set up, select the account and click Launch Sandbox. This opens up a new window that looks exactly like paypal.com ony this one has a blue border with a sandbox logo in the corner. This is how you know you are not in the real thing!
Please note that when testing transactions, you MUST be logged into your developer account! If it times out, you will get errors during transaction processing. I think its always easier to leave a window open in the background with it running.
[break=Now get your account set up!]
Setting up your account in the sandbox is exactly like setting up an account in the real deal.

Once logged in:

click profile
In the right column, click Instant Payment Notification
Click Edit
Tick the Enable IPN box
Enter in your IPN URL (will be something like http://www.mesite.com/geekmart.php?do=ipn )
Click SaveReturn to the profile page and in the right column:

Click Website payment preferences
Set Auto return to yes
Return URL: Your standard web site or geekmart page
Turn on Payment Data Transfer and save.
Go back to the website payment preferences page and copy your Identity token. You need to enter this token into your GeekMart PayPal token setting.In GeekMart->settings:

Copy the token mentioned above into the token box.
change your PayPal URL to https://www.sandbox.paypal.com/us/cgi-bin/webscr (notice the https).Now all your transactions will be through the sandbox. Remember that you must be logged in to go through the sandbox.

Test out PayPal money transfers, credit card payments, etc...

[B]nJoy

yoyo
08-31-2005, 01:19 PM
When you have a business account set up, select the account and click Launch Sandbox.I think you mean "Developer" instead of "Business" account. This can be confusing to people, since a business account on PayPal requires giving them your social security number, etc.. I have used the sandbox, and they do not require you to have a business account, so I just wanted to clarify this.

The Geek
09-03-2005, 10:02 AM
I think you need a business account to use IPN for real. You dont need it for sandbox testing, but I think youll need it when you go live (not 100% sure on that though)

webDressing
09-20-2006, 02:42 AM
How would you adapt this to work with MoneyBookers? PayPal does not protect virtual transactions.

The Geek
09-20-2006, 08:24 AM
A new paymemt handler would have to be created for it. Ill revisit it when I reopen devlopment on it