File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,11 @@ Setting up PayPal environment with credentials with sandbox cerdentails.
16
16
*/
17
17
public static PayPalEnvironment environment ( )
18
18
{
19
- return new SandboxEnvironment ( "PAYPAL-CLIENT-ID" , "PAYPAL-CLIENT-SECRET" ) ;
19
+ return new SandboxEnvironment (
20
+ System . Environment . GetEnvironmentVariable ( "PAYPAL_CLIENT_ID" ) != null ?
21
+ System . Environment . GetEnvironmentVariable ( "PAYPAL_CLIENT_ID" ) : "<<PAYPAL-CLIENT-ID>>" ,
22
+ System . Environment . GetEnvironmentVariable ( "PAYPAL_CLIENT_SECRET" ) != null ?
23
+ System . Environment . GetEnvironmentVariable ( "PAYPAL_CLIENT_SECRET" ) : "<<PAYPAL-CLIENT-SECRET>>" ) ;
20
24
}
21
25
22
26
/**
Original file line number Diff line number Diff line change @@ -11,7 +11,11 @@ public class TestHarness
11
11
12
12
public static PayPalEnvironment environment ( )
13
13
{
14
- return new SandboxEnvironment ( "<<PAYPAL-CLIENT-ID>>" , "<<PAYPAL-CLIENT-SECRET>>" ) ;
14
+ return new SandboxEnvironment (
15
+ System . Environment . GetEnvironmentVariable ( "PAYPAL_CLIENT_ID" ) != null ?
16
+ System . Environment . GetEnvironmentVariable ( "PAYPAL_CLIENT_ID" ) : "<<PAYPAL-CLIENT-ID>>" ,
17
+ System . Environment . GetEnvironmentVariable ( "PAYPAL_CLIENT_SECRET" ) != null ?
18
+ System . Environment . GetEnvironmentVariable ( "PAYPAL_CLIENT_SECRET" ) : "<<PAYPAL-CLIENT-SECRET>>" ) ;
15
19
}
16
20
17
21
public static HttpClient client ( )
You can’t perform that action at this time.
0 commit comments