File tree 1 file changed +44
-0
lines changed
1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ # PHP-PayPal-IPN
2
+ PHP Class for verifying PayPal Instant Payment Notification (IPN) messages.
3
+ Use the ` PaypalIPN ` class in your project to handle the encoding of POST data, post back to PayPal, and parsing of the response from PayPal.
4
+
5
+ Example Use Case
6
+ ---------
7
+
8
+ use PaypalIPN;
9
+
10
+ $ipn = new PayPalIPN();
11
+ $ipn->useSandbox();
12
+ $verified = $ipn->verifyIPN();
13
+ if ($verified){
14
+ //process IPN
15
+ }
16
+
17
+ Features
18
+ --------
19
+
20
+ * Switch between live and sandbox by using the ` useSandbox ` function.
21
+ * Verifies an HTTP "200" response status code from the PayPal server.
22
+ * Throws various exceptions to differentiate between common errors in code or
23
+ server configuration versus invalid IPN responses.
24
+
25
+
26
+ Getting Started
27
+ ---------------
28
+
29
+ This code is intended for web developers. You should understand how the IPN
30
+ process works conceptually and you should understand when and why you would be
31
+ using IPN. Reading the [ PayPal Instant Payment Notification Guide] [ 1 ] is a good
32
+ place to start.
33
+
34
+ You should also have a [ PayPal Sandbox Account] [ 2 ] with a test buyer account and
35
+ a test seller account. When logged into your sandbox account there is an IPN
36
+ simulator under the 'Test Tools' menu which you can used to test your IPN
37
+ listener.
38
+
39
+ [ 1 ] : https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNIntro/
40
+ [ 2 ] : https://developer.paypal.com
41
+
42
+ Once you have your sandbox account setup, you simply create a PHP script that
43
+ will be your IPN listener. In that script, use the ` PaypalIPN ` class as shown
44
+ above in the example use case.
You can’t perform that action at this time.
0 commit comments