This repository has been archived by the owner on Jul 20, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 484
Update PHP to allow caller to set curl options #140
Open
tzs
wants to merge
2
commits into
paypal:master
Choose a base branch
from
tzs:tzs-patch-3
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Many production environments restrict outgoing network access on their servers that deal with payments, only allowing such access through proxies that vet the destinations before allowing access. This patch provides an option for the caller of verifyIPN() to provide the curl object for verifyIPN() to use instead of allocating its own curl object. This allows the caller to set any proxy options, or other options, that may be required in order to allow the connection back to Paypal to work.
overint
reviewed
Jul 25, 2018
php/PaypalIPN.php
Outdated
@@ -17,6 +19,11 @@ class PaypalIPN | |||
/** Response from PayPal indicating validation failed */ | |||
const INVALID = 'INVALID'; | |||
|
|||
public function __construct($curl_handler = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docblock on the function please
php/PaypalIPN.php
Outdated
@@ -6,6 +6,8 @@ class PaypalIPN | |||
private $use_sandbox = false; | |||
/** @var bool Indicates if the local certificates are used. */ | |||
private $use_local_certs = true; | |||
/** @var curl handler */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is missing a type.
phpDocumentor comments added. The description for __construct seems awkward, but I could not think of anything better. |
smilesrg
reviewed
Feb 24, 2020
* handle that you supply, as opposed to creating a new cURL session | ||
* handle like the default constructor does. | ||
* | ||
* @param resource $curl_handler (optional) cURL session handle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
* @param resource $curl_handler (optional) cURL session handle | |
* @param resource|null $curl_handler (optional) cURL session handle |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Many production environments restrict outgoing network access on their servers that deal with payments, only allowing such access through proxies that vet the destinations before allowing access. This patch provides an option for the caller of verifyIPN() to provide the curl object for verifyIPN() to use instead of allocating its own curl object. This allows the caller to set any proxy options, or other options, that may be required in order to allow the connection back to Paypal to work.