PayPal Configuration for Website Payments Standard - Testing Sandbox
1. Login to Developer Central
https://developer.paypal.com
If you don't have an Developer Central account, follow PayPal instructions to register a developer account and create a sandbox (test) merchant account.
2. Launch your merchant sandbox
Login as your Developer Central account (e.g. paypaldev@example.com) and create two new "sandbox" accounts. "Create Account:" -> "Preconfigured"
- Create a "seller" - this is your website. E.g. paypal_1207343391_biz@example.com
- Create a "buyer" - this is your test donor/customer. E.g. paypal_1208220862_per@example.com
Configure CiviCRM with the "seller". Use the "buyer" to test the site. If you "reset" the seller account, be sure to repeat these steps.
3. Profile >> Instant Payment Notification Preferences
From your Developer central account (e.g. paypaldev@example.com ) at https://developer.paypal.com
- Test accounts -> Select the "seller" account (e.g. paypal_1207343391_biz@example.com) -> Click "Enter Sandbox Test Site" -> Login
- You should now be at https://www.sandbox.paypal.com/...
- Click Profile -> Instant Payment Notification -> Edit
- Enable Instant Payments Notification (checkbox checked)
- Enter your CMS site home page as the Notification URL. This is a placeholder. CiviContribute will pass the exact IPN 'listener' URL to PayPal automatically during each transaction.
4. Profile >> Website Payment Preferences
- Set Auto Return to On
- Enter your CMS site home page as the Return URL. This is a placeholder. CiviContribute will pass the exact return URL to PayPal automatically during each transaction.
- Set "Payment Data Transfer" to "Off"
CiviCRM Configuration for PayPal Website Payments Standard
Enable CiviContribute
- Log into CiviCRM as an administrator.
- Select Administer CiviCRM >> Global Settings >> Enable Components
- Ensure that CiviContribute is enabled.
Add a Payment Processor
- Select Administer CiviCRM >> Global Settings >> Payment Processors
- Click » New Payment Processor
- Select PayPal - Website Payments Standard for Processor Type.
- Enter the Merchant Account Email Address linked to your PayPal Sandbox merchant account (e.g. paypal_1207343391_biz@example.com) in the Processor Details for TEST Payments section.
- If you'd like to process live payments on the site, you can generally accept the default values for Site and Button URLs.
Note: If you are still developing the site, and would like to test the work-flow on the site (and accept no live payments), copy the "Test Payments" values to the "Live Payments" section.
Note: If you see an API URL field for Paypal_Standard, you can ignore it.
Assign this Processor to your Contribution or Event Registration Page(s)
You must assign your new Payment Processor to your Contribution Page or Event Registration before you can test-drive them.
- For Contribution Pages - go to Manage Contribution Pages » Configure » Title and Settings and select your Website Standard processor, then click Save.
- For Event Registration - go to Manage Events » Configure » Event Fees and select your Website Standard processor, then click Save.
Enabling Recurring Contributions
If you are using PayPal Website Payments Standard - you can give users the option to make a recurring contribution on any of your Contribution Pages.
- Administer CiviCRM » Manage Contribution Pages
- Click Configure for the page where you want to enable recurring contributions
- Click Contribution Amounts
- Check the Enable recurring payments box.
Trouble-shooting
Contributions remain in PENDING status
In order for contributions to be marked as COMPLETED, PayPal's Instant Payment Notification (IPN) most post back to CiviCRM an acknowledgement that the contribution was completed. In order for this to happen, your CiviCRM site must be accessible on the public internet (i.e. not running on localhost or behind a firewall). Interactions with PayPal IPN are logged to a file called CiviCRM.log located in your configured Temporary Files Directory (<drupal_root>/files/civicrm/upload/CiviCRM.log by default on Drupal installations). Check this file for errors if your contribution statuses are not being set to COMPLETED.
Unexpected errors from PayPal
Occassionally there are technical / availability problems with the PayPal Sandbox servers. You can check Sandbox status here.
Updated by Eileen McNaughton
Feb 21, 2008 04:54
I just set up a paypal developer account and you need to set up your main account and then set up a test account within that. Make sure you set up the test account manually - the pre-configured profile option doesn't seem to allow you to set profile options and you may need to click on the discreet (bottom of the accounts page I found it on) sandbox link. (I found the process slow & buggy but got there)
Getting a credit card number for testing was a bit trickier than it should have been - the instructions say:
Generating a Credit Card Number to Test PayPal Account Optional
To obtain a test credit card number for testing PayPal Account Optional:
1. Select a buyer's test account and click Enter Sandbox Test Site.
2. Navigate to My Account > Profile.
3. Under the Financial Information header, click the Credit Cards link.
Make a note of the credit card number for your use in later testing.
but when I used the one from my buyer account it said I couldn't as it was associated with a paypal account. I got one by clicking on profile / add credit or debit card in my main business account and copying it. I didn't commit that screen. The expiry date was invalid so I made one up.
I would note that this worked once (but I got a different error and then stopped working) so I gave up and did very small transactions on the live site for testing).
Sigh - I believe this is the cause of the account not working:
http://www.pdncommunity.com/pdn/board/message?board.id=sandbox&message.id=4339
Another thing I had to hunt for - why you sometimes see a page ready to take credit card details and sometimes you just see the paypal payment with a link to open up up the full page - it's a client cookies thing:"The payment page changes according to the cookies on the computer. So, if you have a PayPal login cookie, you will only see one line that says "If you do not currently have a PayPal account, Click Here" If customers click on that 'Click Here' button, they can enter their credit card information without opening a PayPal account.If you clear your cookies, and PayPal account optional is enabled, you should see the split screen you are referring to."
I got a bunch of 3004 errors - these were temporary errors with the developer site not a config problem
Also, the profile settings that you make on your developer account obviously need to be made on your live account too.
Paypal sandbox is one of the worst services on the internet IMHO