This repository was archived by the owner on Jul 20, 2020. It is now read-only.
Update PHP to allow caller to set curl options#140
Open
tzs wants to merge 2 commits intopaypal:masterfrom
Open
Update PHP to allow caller to set curl options#140tzs wants to merge 2 commits intopaypal:masterfrom
tzs wants to merge 2 commits intopaypal:masterfrom
Conversation
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
| /** Response from PayPal indicating validation failed */ | ||
| const INVALID = 'INVALID'; | ||
|
|
||
| public function __construct($curl_handler = null) |
Contributor
There was a problem hiding this comment.
docblock on the function please
php/PaypalIPN.php
Outdated
| private $use_sandbox = false; | ||
| /** @var bool Indicates if the local certificates are used. */ | ||
| private $use_local_certs = true; | ||
| /** @var curl handler */ |
Author
|
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.
Suggested change
| * @param resource $curl_handler (optional) cURL session handle | |
| * @param resource|null $curl_handler (optional) cURL session handle |
This file contains hidden or 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
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.