File tree 2 files changed +1
-16
lines changed
2 files changed +1
-16
lines changed Original file line number Diff line number Diff line change 41
41
| @see https://imdhemy.com/laravel-iap-docs/docs/credentials/google-play
42
42
|
43
43
*/
44
- 'google_application_credentials ' => base_path (env ('GOOGLE_APPLICATION_CREDENTIALS ' )),
44
+ 'google_application_credentials ' => base_path (( string ) env ('GOOGLE_APPLICATION_CREDENTIALS ' )),
45
45
46
46
/*
47
47
|--------------------------------------------------------------------------
Original file line number Diff line number Diff line change 25
25
use Imdhemy \Purchases \Subscription ;
26
26
use Lcobucci \JWT \Decoder ;
27
27
use Lcobucci \JWT \Encoding \JoseEncoder ;
28
- use RuntimeException ;
29
28
30
29
/**
31
30
* Laravel Iap service provider.
@@ -113,20 +112,6 @@ public function register(): void
113
112
private function registerConfig (): void
114
113
{
115
114
$ this ->mergeConfigFrom (self ::CONFIG_PATH , self ::CONFIG_KEY );
116
-
117
- // Check if it should set GOOGLE_APPLICATION_CREDENTIALS to the configured path
118
- $ currentGoogleCredPath = getenv ('GOOGLE_APPLICATION_CREDENTIALS ' );
119
- if (is_string ($ currentGoogleCredPath ) && file_exists ($ currentGoogleCredPath )) {
120
- return ;
121
- }
122
-
123
- $ googleCredentials = (string )config (self ::CONFIG_KEY .'.google_application_credentials ' );
124
- if (! empty ($ googleCredentials ) && ! is_dir ($ googleCredentials )) {
125
- if (! file_exists ($ googleCredentials )) {
126
- throw new RuntimeException ("Google Application Credentials file not found at $ googleCredentials " );
127
- }
128
- putenv ('GOOGLE_APPLICATION_CREDENTIALS= ' .$ googleCredentials );
129
- }
130
115
}
131
116
132
117
/**
You can’t perform that action at this time.
0 commit comments