Skip to content

Commit 3af8799

Browse files
committed
PHPdoc coverage.
1 parent c914394 commit 3af8799

File tree

1 file changed

+23
-12
lines changed

1 file changed

+23
-12
lines changed

src/PaypalIPN.php

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,24 @@
33
class PaypalIPN
44
{
55

6+
/**
7+
* @var bool $use_sandbox Indicates if the sandbox endpoint is used.
8+
*/
69
private $use_sandbox = false;
7-
private $use_local_certs = true;
8-
9-
/*
10-
* PayPal IPN postback endpoints
10+
/**
11+
* @var bool $use_local_certs Indicates if the local certificates are used.
1112
*/
13+
private $use_local_certs = true;
1214

15+
/** Production Postback URL */
1316
const VERIFY_URI = 'https://ipnpb.paypal.com/cgi-bin/webscr';
17+
/** Sandbox Postback URL */
1418
const SANDBOX_VERIFY_URI = 'https://ipnpb.sandbox.paypal.com/cgi-bin/webscr';
1519

16-
/*
17-
* Possible responses from PayPal after the request is issued.
18-
*/
1920

21+
/** Response from PayPal indicating validation was successful */
2022
const VALID = 'VERIFIED';
23+
/** Response from PayPal indicating validation failed */
2124
const INVALID = 'INVALID';
2225

2326

@@ -31,26 +34,34 @@ public function useSandbox()
3134
$this->use_sandbox = true;
3235
}
3336

37+
/**
38+
* Sets curl to use php curl's built in certs (may be required in some
39+
* environments).
40+
* @return void
41+
*/
42+
public function usePHPCerts()
43+
{
44+
$this->use_local_certs = false;
45+
}
46+
3447

3548
/**
3649
* Determine endpoint to post the verification data to.
3750
* @return string
3851
*/
3952
public function getPaypalUri()
4053
{
41-
if ($this->use_sandbox)
42-
{
54+
if ($this->use_sandbox) {
4355
return self::SANDBOX_VERIFY_URI;
44-
} else
45-
{
56+
} else {
4657
return self::VERIFY_URI;
4758
}
4859
}
4960

5061

5162
/**
5263
* Verification Function
53-
* Sends the incoming post data back to paypal using the cURL library.
64+
* Sends the incoming post data back to PayPal using the cURL library.
5465
*
5566
* @return bool
5667
* @throws Exception

0 commit comments

Comments
 (0)