Skip to content

Commit 9c12d7f

Browse files
committed
[CC-2016] Identify customer version based on ID.
1 parent 9ec42ac commit 9c12d7f

File tree

3 files changed

+19
-38
lines changed

3 files changed

+19
-38
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
namespace UnzerSDK\Apis;
4+
5+
use UnzerSDK\Apis\Constants\AuthorizationMethods;
6+
7+
8+
/**
9+
* Config for Payment API (PAPI) with bearer authentication.
10+
*/
11+
class PaymentApiConfigBearerAuth extends PaymentApiConfig
12+
{
13+
public static function getAuthorizationMethod(): string
14+
{
15+
return AuthorizationMethods::BEARER;
16+
}
17+
}

src/Apis/PaymentApiJwtConfig.php

Lines changed: 0 additions & 36 deletions
This file was deleted.

src/Resources/V2/Customer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace UnzerSDK\Resources\V2;
44

5-
use UnzerSDK\Apis\PaymentApiJwtConfig;
5+
use UnzerSDK\Apis\PaymentApiConfigBearerAuth;
66
use UnzerSDK\Resources\Customer as CustomerV1;
77

88
class Customer extends CustomerV1
@@ -14,7 +14,7 @@ public function getApiVersion(): string
1414

1515
public function getApiConfig(): string
1616
{
17-
return PaymentApiJwtConfig::class;
17+
return PaymentApiConfigBearerAuth::class;
1818
}
1919

2020

0 commit comments

Comments
 (0)