Monthly Archives: January 2012

How to Prepare a Paypal Sandbox for Payment Testings

How to Setup a Test Sandbox Paypal Account to Test Digital Access Pass (DAP)

Sandbox in Paypal works like this:
You open up a Developer account with a REAL email from which you must
respond to verify the email send to you by Paypal for verification.
WITHIN this account and being LOGGED IN you can set up PRECONFIGURED ACCOUNTS
with emails and passwords autocreated by pp to be used as Merchant or Buyer accounts.

So, follow the steps below:

STEP1:

Register a Developer Account with developer.paypal.com
You should use a valid email during registration because you will need to verify the email.

developer account login name:       taid@scanmyexpenses.com
Password to login : q2d4
That is the DEVELOPER ACCOUNT and you need to stay Logged In this account for all steps below, INCLUDING the TEST phase.

STEP2:

WITHIN this account, being logged in, I use the PRECONFIGURED link to setup:

1. SELLER ACCOUNT with email:
Paypal will AUTOGENERATE both the email and the password. Example is:

taid_1327187341_biz@scanmyexpenses.com
PASS: 327187245

*your only chance to deposit test money into this account is on creating the account (deposit function does not work) so make sure you put on some money into the account at this stage

**the taid_132… email is AUTOGENERATED by Paypal. You CANNOT enter anything different in the email field, I attempted to change the suggested email to something and got an error!

2. BUYER ACCOUNT with email:
Paypal will AUTOGENERATE both the email and the password. Example is:

taid_1327187545_per@scanmyexpenses.com
PASS: 327187516

*your only chance to deposit test money into this account is on creating the account (deposit function does not work) so make sure you put on some money into the account at this stage

**the taid_132… email is AUTOGENERATED by Paypal. You CANNOT enter anything different in the email field, I attempted to change the suggested email to something and got an error!

The above emails are ONLY accessible once you are logged in as taid@scanmyexpenses.com (DEVELOPER) by using the TEST EMAILS menu selection on the left menu.

STEP 3:

WITHIN the DEVELOPER ACCOUNT (i.e. being logged in as taid@scanmyexpenses.com)
you can now LOGIN as TEST SELLER ACCOUNT using the taid_132718… and 327187245

You need to do some specific SETUP to integrate with DAP.

It looks like we need TWO THINGS for DAP integration:

(A) we need to activate the Instant Payment Notification System (IPN) in Paypal
and
(B) we need to get the identity token and put it into DAP config

 

 

STEP 4  -  SETTING UP INSTANT PAYMENT NOTIFICATION (IPN)

 

 

 

 

Within the logged in developer account we go to Test Accounts, select the Business (Seller) test account and enter the sandbox test site.

Once inside the test business account, you go to My Account  >  Profile

Inside Profile you go to Selling Preferences >> Instant Payment Notification Preferences

There you must enter the Notification URL which DAP defines as http://mysite/dap/dap-paypal.php
and then you Enable the Receive IPN messages button.

This concludes the setting up of IPN

IMPORTANT NOTES FROM DAP DISCUSSION
When you have MULTIPLE sites with DAP under one company name (like EMENAS having 30minsoccerbet and videotutorials etc) then WHAT URL should you use as you are only allowed ONE Notification URL???

Veena answers:
The global setting just needs to be set to enable IPN. It does not matter what it actually points to. It just needs to point to a valid php script on any one of the sites. You can even point it to a script called dummy.php and create a dummy.php script with just php start and end tag.

The button level IPN is what matters. As long as you use paypal hosted button or dap generated button for paypal, the global ipn is not used. In both cases, button level ipn is set.

The global ipn is used ONLY if you sell using a button that does not set button level IPN.

 

STEP 5:   GETTING THE PAYPAL IDENTITY TOKEN

While still logged in the Test Business account, still in Profile >> Selling Preferences,
we now go to Website Payment Preferences, which opens up quite a lot of selections.

 

That’s the first thing you see.
You must set AUTO RETURN TO ON first. Obvious.
What is not so obvious is what you put in the Return URL: …

From the description, we understand that the Return URL is the Thank You! page on our site.
But under DAP the Thank You! page is NOT just any static page but a SPECIFIC php that is handled by DAP!
So what is this page???????

I look into the DAP docs…
I have decided to use DAP-Generated Paypal Buy Buttons.
I go to the documentation for DAP – Generated Paypal Buy Buttons and read that I must use as Return URL the http://30minsoccerbetandwin.com/dap/dap-thankyou.php

Again, discussing the use of dap with multiple sites, users ask how to handle multiple sites with one single return URL.
Veena answers:
When you hit the buy button, DAP dynamically figures out the ‘return’ URL for that site (based on the site the button is on) and sends it to Paypal.

Paypal requires that the global auto-return be set in the Paypal Profile -> Website Payment Preferences (to allow Paypal to return users back to your site upon purchase).

So you need to set it but you can point the auto-return to any URL. Does not matter. DAP sends the return URL at button level to paypal.

Then I set:
Payment Data Transfer:     ON
Encrypted Website Payments:     OFF  (must look into this later)
Paypal Account Optional:     OFF
Contact Telephone Number:     OFF
Express Checkout Settings:     No
Then hit SAVE
This concludes the Identity Token Settings

After SAVE you enter the Website Preferences once again and see the Identity Token like this:

Identity Token is: -P6xcruTPEKp0-r5P_y4h5_lwFF4hCzz9B1CEy-FgnoMai8cjByUiAW1Nmi

 

STEP 6:   TRANSFERRING THE DATA TO DAP

Once finished with the Sandbox setup and have all data at hand (Return URL, Token, test accounts etc) we need to put everything into DAP and configure it so it will work with this test sandbox account.

I will go through the whole DAP site setup step by step again, begining from creating a product, then creating a DAP generated buy button for this product and then configuring DAP to use the Paypal sandbox connection for testing based on the settings above.

All these steps will be documented in another file called “Setting Up DAP for testing”