Skip to content

Conversation

devduttabain
Copy link

Adding Guzzle verify option into the constructor. In some local environment people get 'cURL error 60: SSL certificate problem'. that can be avoided with this option.

$guzzleVerify = config('laravel-msg91.guzzle_verify', true);
$this->guzzle = new GuzzleClient(["base_uri" => $base_uri, "verify" => $guzzleVerify]);

And to the config file...

	/* Guzzle Verify, if false there'll be no ssl checking (optional) */
	'guzzle_verify' => env('MSG91_GUZZLE_VERIFY', true),

Adding Guzzle verify option into the constructor. In some local environment people get 'cURL error 60: SSL certificate problem'. that can be avoided with this option.

```
$guzzleVerify = config('laravel-msg91.guzzle_verify', true);
$this->guzzle = new GuzzleClient(["base_uri" => $base_uri, "verify" => $guzzleVerify]);
```

And to the config file...
```
	/* Guzzle Verify, if false there'll be no ssl checking (optional) */
	'guzzle_verify' => env('MSG91_GUZZLE_VERIFY', true),
```
$this->guzzle = new GuzzleClient(["base_uri" => $base_uri ]);

//reading verify option from config, and passing that to the guzzle options
$guzzleVerify = config('laravel-msg91.guzzle_verify', true);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reading verify option from config, and passing that to the guzzle options

@@ -19,4 +19,7 @@
/* Credit limit, if true message will be limted to 1 credit (optional) */
'limit_credit' => env('MSG91_LIMIT_CREDIT', false),

/* Guzzle Verify, if false there'll be no ssl checking (optional) */
'guzzle_verify' => env('MSG91_GUZZLE_VERIFY', true),
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding guzzle verify option in config file

@robincsamuel
Copy link
Owner

robincsamuel commented Sep 19, 2020

Looks good. I'm trying to see if there is a better terminology, or maybe we can allow passing any guzzle config as an array? The config options keep growing, and it's bothering me a bit :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants