-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added proxy support #332
base: master
Are you sure you want to change the base?
added proxy support #332
Conversation
src/Request.php
Outdated
@@ -46,11 +54,10 @@ public function request($method, $url, $data = array()) | |||
|
|||
$hooks->register('curl.before_send', array($this, 'setCurlSslOpts')); | |||
|
|||
$options = array( | |||
$options = array_merge(self::$options,array( |
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.
Rename $options to remove confusion.
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.
changed $options
to $opt
* Headers to be sent with every http request to the API | ||
* @var array | ||
*/ | ||
protected static $options = array( |
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.
Check this if static is required or not. Also test if values are getting overriden.
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.
@ndhaka007 static keyword is required because when i removed static, I get this error
Warning: Undefined variable $options in /Applications/MAMP/htdocs/razorpay-php/src/Request.php on line 57
Fatal error: Uncaught TypeError: array_merge(): Argument #1 must be of type array, null given in /Applications/MAMP/htdocs/razorpay-php/src/Request.php:59
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.
@ndhaka007 also the timeout values are getting override
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.
Approved with comments
issue : #79
code snippet