Difference between revisions of "PayPal"

From Organic Design wiki
(PayPal Sandbox: the whole polava of setting up IPN testing with paypal sandbox site)
Line 22: Line 22:
  
 
== PayPal Sandbox ==
 
== PayPal Sandbox ==
The paypal sandbox allows all operations done within the paypal site to be performed within a test environment. To test paypal code working in other sites and applications. It's useful to have a wildcard email domain so you can use any number of email addresses for different accounts etc. First, sign up as a developer at https://developer.paypal.com with one "master" email address.
+
The paypal sandbox allows all operations done within the paypal site to be performed within a test environment. It's useful to have a wildcard email domain so you can use any number of email addresses for different test accounts etc.
  
Next set up a test account at https://www.sandbox.paypal.com (the session will be logged in as the master account, and the test account gets created under that). You need to confirm the email address to make the test account verified, but note that the confirmation email must be checked from within the paypal developer site, it is not sent directly to the email address. Next add and confirm a bank account and a credit card for the test account (the site will supply the account numbers for these).
+
To set up a paypal sandbox environment suitable to test the MediaWiki PayPal extension, you must first sign up as a developer at https://developer.paypal.com using the email address that your paypal forms are set to (use a different password, or change the form's to another address completely if you like, but ensure that your forms match the paypal developer login).
 +
 
 +
Next set up '''two''' test accounts at https://www.sandbox.paypal.com (the session will be logged in as the master account, and the test account gets created under that). One of the test accounts will act as buyer and the other as seller. You'll need an email address for each (they can be imaginary, but I recommend they be real if you have a wild card email domain to create unlimited addresses under). Both accounts need to have their email addresses confirmed and must have a bank account added and confirmed before test transactions can be done, so you need to log in to each and go through those processes. Note that the emails which get sent during this process are not physically sent outside the sandbox environment - you must retrieve them from the developer site's "test emails" section.
 +
 
 +
Finally you need to tell the PayPal MediaWiki extension to use the test buyer account. To do this, set the ''$wgPayPalTest'' global variable to the email address of the seller test account in your ''LocalSettings.php'' file, but don't change anything in your form definitions - these must stay set to the email of the master account (which I personally prefer to keep the same as the real business email so the forms don't need to change when switching from testing to real).

Revision as of 00:54, 8 December 2007

MediaWiki Extension

MW:Extension:PayPal is an extension for creating PayPal donation forms using a <paypal> tag. PokerCoder requested adding IPN support to the extension through this RentACoder job and has accepted User:Nad's bid to complete the work.

IPN

Instant Payment Notification, included with Website Payment products, Express Checkout, and Standard Checkout, is available to PayPal Premier and Business members. Instant Payment Notification allows you to integrate your PayPal payments with your website's back-end operations, so that you get immediate notification and authentication of any PayPal payments and disputes you may receive.

When a customer makes a payment to you, PayPal will post a notification to your server at a URL you specify. Included in this notification will be all of your customer's payment information (e.g. customer name, amount) as well as a piece of encrypted code. When your server receives a notification, it will then post the information, including the encrypted code, back to a secure PayPal URL. PayPal will authenticate the transaction by checking the encrypted string. This post-back of the IPN data to PayPal prevents "spoofing," so you can be sure that the IPN came from PayPal. Upon verification, PayPal will send confirmation of its validity back to your server.

PDT

PayPal Sandbox

The paypal sandbox allows all operations done within the paypal site to be performed within a test environment. It's useful to have a wildcard email domain so you can use any number of email addresses for different test accounts etc.

To set up a paypal sandbox environment suitable to test the MediaWiki PayPal extension, you must first sign up as a developer at https://developer.paypal.com using the email address that your paypal forms are set to (use a different password, or change the form's to another address completely if you like, but ensure that your forms match the paypal developer login).

Next set up two test accounts at https://www.sandbox.paypal.com (the session will be logged in as the master account, and the test account gets created under that). One of the test accounts will act as buyer and the other as seller. You'll need an email address for each (they can be imaginary, but I recommend they be real if you have a wild card email domain to create unlimited addresses under). Both accounts need to have their email addresses confirmed and must have a bank account added and confirmed before test transactions can be done, so you need to log in to each and go through those processes. Note that the emails which get sent during this process are not physically sent outside the sandbox environment - you must retrieve them from the developer site's "test emails" section.

Finally you need to tell the PayPal MediaWiki extension to use the test buyer account. To do this, set the $wgPayPalTest global variable to the email address of the seller test account in your LocalSettings.php file, but don't change anything in your form definitions - these must stay set to the email of the master account (which I personally prefer to keep the same as the real business email so the forms don't need to change when switching from testing to real).