@@ -89,9 +89,9 @@ public function write(string $key, $value): void
8989}
9090
9191// Sandbox URLs *******************************************************************************************************
92- const CsasSandboxUrl = 'https://webapi.developers.erstegroup.com/api/csas ' ;
93- const CsasOAuthUrl = CsasSandboxUrl .'/sandbox/v1/sandbox-idp ' ;
94- const CsasAccountsUrl = CsasSandboxUrl .'/public/sandbox/v3/accounts ' ;
92+ const CSasSandboxUrl = 'https://webapi.developers.erstegroup.com/api/csas ' ;
93+ const CSasOAuthUrl = CSasSandboxUrl .'/sandbox/v1/sandbox-idp ' ;
94+ const CSasAccountsUrl = CSasSandboxUrl .'/public/sandbox/v3/accounts ' ;
9595
9696// Utilities **********************************************************************************************************
9797
@@ -292,7 +292,7 @@ function loadAccessToken(): ?string
292292 'refresh_token ' => $ refreshToken ,
293293 ];
294294
295- $ response = sendRequest ('POST ' , CsasOAuthUrl .'/token ' , $ data );
295+ $ response = sendRequest ('POST ' , CSasOAuthUrl .'/token ' , $ data );
296296
297297 if (!\array_key_exists ('access_token ' , $ response )) {
298298 throw new ResponseException ('Missing access token in response from bank ' , 404 , $ response );
@@ -328,7 +328,7 @@ function redirectToAuth(): void
328328{
329329 writeLabel ('Redirect to authorization ' );
330330
331- $ url = CsasOAuthUrl .'/auth? ' .http_build_query ([
331+ $ url = CSasOAuthUrl .'/auth? ' .http_build_query ([
332332 'client_id ' => Ease \Shared::cfg ('CLIENT_ID ' ),
333333 'response_type ' => 'code ' ,
334334 'redirect_uri ' => Ease \Shared::cfg ('REDIRECT_URI ' ),
@@ -364,7 +364,7 @@ function handleRedirectFromBank(): void
364364 'redirect_uri ' => Ease \Shared::cfg ('REDIRECT_URI ' ),
365365 ];
366366
367- $ response = sendRequest ('POST ' , CsasOAuthUrl .'/token ' , $ data );
367+ $ response = sendRequest ('POST ' , CSasOAuthUrl .'/token ' , $ data );
368368
369369 if (!\array_key_exists ('refresh_token ' , $ response )) {
370370 throw new ResponseException ('Missing refresh token in response from bank ' , 404 , $ response );
@@ -395,7 +395,7 @@ function listAccounts(): void
395395 'order ' => 'asc ' ,
396396 ];
397397 $ headers = createAuthHeaders ();
398- $ response = sendRequest ('GET ' , CsasAccountsUrl .'/my/accounts ' , $ data , $ headers );
398+ $ response = sendRequest ('GET ' , CSasAccountsUrl .'/my/accounts ' , $ data , $ headers );
399399
400400 class Account
401401 {
@@ -452,7 +452,7 @@ function accountDetail(): void
452452 // Balance
453453 writeLabel ('Balance ' );
454454 $ headers = createAuthHeaders ();
455- $ response = sendRequest ('GET ' , CsasAccountsUrl ."/my/accounts/ {$ accountId }/balance " , null , $ headers );
455+ $ response = sendRequest ('GET ' , CSasAccountsUrl ."/my/accounts/ {$ accountId }/balance " , null , $ headers );
456456
457457 $ balance = array_pop ($ response ['balances ' ]) ?? null ;
458458
@@ -479,7 +479,7 @@ function accountDetail(): void
479479 'sort ' => 'bookingdate ' ,
480480 'order ' => 'desc ' ,
481481 ];
482- $ response = sendRequest ('GET ' , CsasAccountsUrl ."/my/accounts/ {$ accountId }/transactions " , $ data , $ headers );
482+ $ response = sendRequest ('GET ' , CSasAccountsUrl ."/my/accounts/ {$ accountId }/transactions " , $ data , $ headers );
483483
484484 class Transaction
485485 {
0 commit comments