Skip to content

Commit

Permalink
Release 4.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
wallee-deployment-user committed Dec 7, 2023
1 parent 05181e6 commit 4dfad73
Show file tree
Hide file tree
Showing 569 changed files with 787 additions and 576 deletions.
2 changes: 1 addition & 1 deletion autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/**
* Autoload function.
*
* @author customweb GmbH
* @author wallee AG
* After registering this autoload function with SPL, the following line
* would cause the function to attempt to load the \Wallee\Sdk\Baz\Qux class
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wallee/sdk",
"version": "4.0.1",
"version": "4.0.2",
"description": "wallee SDK for PHP",
"keywords": [
"wallee",
Expand All @@ -14,7 +14,8 @@
"authors": [
{
"name": "wallee AG",
"homepage": "https://wallee.com"
"email": "info@wallee.com",
"homepage": "https://www.wallee.com"
}
],
"require": {
Expand Down
6 changes: 3 additions & 3 deletions lib/ApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*
* @category Class
* @package Wallee\Sdk
* @author customweb GmbH
* @author wallee AG
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
*/
final class ApiClient {
Expand All @@ -48,7 +48,7 @@ final class ApiClient {
* @var array
*/
private $defaultHeaders = [
'x-meta-sdk-version' => "4.0.1",
'x-meta-sdk-version' => "4.0.2",
'x-meta-sdk-language' => 'php',
'x-meta-sdk-provider' => "wallee",
];
Expand All @@ -58,7 +58,7 @@ final class ApiClient {
*
* @var string
*/
private $userAgent = 'PHP-Client/4.0.1/php';
private $userAgent = 'PHP-Client/4.0.2/php';

/**
* The path to the certificate authority file.
Expand Down
2 changes: 1 addition & 1 deletion lib/ApiException.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*
* @category Class
* @package Wallee\Sdk
* @author customweb GmbH
* @author wallee AG
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
*/
class ApiException extends Exception
Expand Down
2 changes: 1 addition & 1 deletion lib/ApiResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* @category Class
* @package Wallee\Sdk
* @author customweb GmbH
* @author wallee AG
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
*/
class ApiResponse {
Expand Down
8 changes: 4 additions & 4 deletions lib/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*
* @category Class
* @package Wallee\Sdk
* @author customweb GmbH
* @author wallee AG
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
*/
class Configuration
Expand Down Expand Up @@ -80,7 +80,7 @@ class Configuration
*
* @var string
*/
protected $userAgent = 'Wallee\Sdk/4.0.1/php';
protected $userAgent = 'Wallee\Sdk/4.0.2/php';

/**
* Debug switch (default set to false)
Expand Down Expand Up @@ -388,8 +388,8 @@ public static function toDebugReport()
$report = 'PHP SDK (Wallee\Sdk) Debug Report:' . PHP_EOL;
$report .= ' OS: ' . php_uname() . PHP_EOL;
$report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL;
$report .= ' OpenAPI Spec Version: 4.0.1' . PHP_EOL;
$report .= ' SDK Package Version: 4.0.1' . PHP_EOL;
$report .= ' OpenAPI Spec Version: 4.0.2' . PHP_EOL;
$report .= ' SDK Package Version: 4.0.2' . PHP_EOL;
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;

return $report;
Expand Down
77 changes: 77 additions & 0 deletions lib/EncryptionUtil.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?php
/**
* wallee SDK
*
* This library allows to interact with the wallee payment service.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/


namespace Wallee\Sdk;

use \Exception;

/**
* EncryptionUtil Class Doc Comment
*
* @category Class
* @package Wallee\Sdk
* @author wallee AG
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
*/
class EncryptionUtil
{
/**
* Verify content with signature
*
* @param string $contentToVerify Content to verify (required)
* @param string $contentSignature Content signature (required)
* @param string $encodedPublicKey Base64 encoded public key (required)
* @param string $signatureAlgorithm Signature algorithm (required)
* @throws RuntimeException
* @return bool
*/
public static function isContentValid($contentToVerify, $contentSignature, $encodedPublicKey, $signatureAlgorithm) {
switch ($signatureAlgorithm) {
case "SHA256withECDSA":
$publicKey = self::getPublicKey($encodedPublicKey);
$openSSLAlgorithm = OPENSSL_ALGO_SHA256;
break;
default:
throw new Exception("Unknown webhook signature encryption algorithm: " . $signatureAlgorithm);
}

$verification = openssl_verify($contentToVerify, base64_decode($contentSignature), $publicKey, $openSSLAlgorithm);

if (PHP_VERSION_ID < 80000) {
openssl_free_key($publicKey);
}

return $verification == 1;
}

private static function getPublicKey($encodedPublicKey) {
$pem = "-----BEGIN PUBLIC KEY-----\n" . chunk_split($encodedPublicKey, 64, "\n") . "-----END PUBLIC KEY-----";

// Create the public key resource
$publicKey = openssl_pkey_get_public($pem);

if (!$publicKey) {
throw new Exception("Failed to create public key from base64 string");
}

return $publicKey;
}

}
4 changes: 2 additions & 2 deletions lib/HeaderSelector.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
*
* @category Class
* @package Wallee\Sdk
* @author customweb GmbH
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
* @author wallee AG
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
*/
class HeaderSelector
{
Expand Down
2 changes: 1 addition & 1 deletion lib/Http/ConnectionException.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*
* @category Class
* @package Wallee\Sdk\Http
* @author customweb GmbH
* @author wallee AG
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
*/
final class ConnectionException extends Exception {
Expand Down
2 changes: 1 addition & 1 deletion lib/Http/CurlHttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*
* @category Class
* @package Wallee\Sdk\Http
* @author customweb GmbH
* @author wallee AG
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
*/
final class CurlHttpClient implements IHttpClient {
Expand Down
2 changes: 1 addition & 1 deletion lib/Http/HttpClientFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* @category Class
* @package Wallee\Sdk\Http
* @author customweb GmbH
* @author wallee AG
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
*/
final class HttpClientFactory {
Expand Down
2 changes: 1 addition & 1 deletion lib/Http/HttpRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*
* @category Class
* @package Wallee\Sdk\Http
* @author customweb GmbH
* @author wallee AG
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
*/
final class HttpRequest {
Expand Down
2 changes: 1 addition & 1 deletion lib/Http/HttpResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* @category Class
* @package Wallee\Sdk\Http
* @author customweb GmbH
* @author wallee AG
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
*/
final class HttpResponse {
Expand Down
2 changes: 1 addition & 1 deletion lib/Http/IHttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*
* @category Interface
* @package Wallee\Sdk\Http
* @author customweb GmbH
* @author wallee AG
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
*/
interface IHttpClient {
Expand Down
2 changes: 1 addition & 1 deletion lib/Http/SocketHttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*
* @category Class
* @package Wallee\Sdk\Http
* @author customweb GmbH
* @author wallee AG
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
*/
final class SocketHttpClient implements IHttpClient {
Expand Down
2 changes: 1 addition & 1 deletion lib/Model/AbstractAccountUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*
* @category Class
* @package Wallee\Sdk
* @author customweb GmbH
* @author wallee AG
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
*/
class AbstractAccountUpdate implements ModelInterface, ArrayAccess
Expand Down
2 changes: 1 addition & 1 deletion lib/Model/AbstractApplicationUserUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*
* @category Class
* @package Wallee\Sdk
* @author customweb GmbH
* @author wallee AG
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
*/
class AbstractApplicationUserUpdate implements ModelInterface, ArrayAccess
Expand Down
2 changes: 1 addition & 1 deletion lib/Model/AbstractCustomerActive.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*
* @category Class
* @package Wallee\Sdk
* @author customweb GmbH
* @author wallee AG
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
*/
class AbstractCustomerActive implements ModelInterface, ArrayAccess
Expand Down
2 changes: 1 addition & 1 deletion lib/Model/AbstractCustomerAddressActive.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*
* @category Class
* @package Wallee\Sdk
* @author customweb GmbH
* @author wallee AG
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
*/
class AbstractCustomerAddressActive implements ModelInterface, ArrayAccess
Expand Down
2 changes: 1 addition & 1 deletion lib/Model/AbstractCustomerCommentActive.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*
* @category Class
* @package Wallee\Sdk
* @author customweb GmbH
* @author wallee AG
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
*/
class AbstractCustomerCommentActive implements ModelInterface, ArrayAccess
Expand Down
2 changes: 1 addition & 1 deletion lib/Model/AbstractDebtCollectionCaseUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*
* @category Class
* @package Wallee\Sdk
* @author customweb GmbH
* @author wallee AG
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
*/
class AbstractDebtCollectionCaseUpdate implements ModelInterface, ArrayAccess
Expand Down
2 changes: 1 addition & 1 deletion lib/Model/AbstractHumanUserUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*
* @category Class
* @package Wallee\Sdk
* @author customweb GmbH
* @author wallee AG
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
*/
class AbstractHumanUserUpdate implements ModelInterface, ArrayAccess
Expand Down
2 changes: 1 addition & 1 deletion lib/Model/AbstractPaymentLinkUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*
* @category Class
* @package Wallee\Sdk
* @author customweb GmbH
* @author wallee AG
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
*/
class AbstractPaymentLinkUpdate implements ModelInterface, ArrayAccess
Expand Down
2 changes: 1 addition & 1 deletion lib/Model/AbstractRefundCommentActive.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*
* @category Class
* @package Wallee\Sdk
* @author customweb GmbH
* @author wallee AG
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
*/
class AbstractRefundCommentActive implements ModelInterface, ArrayAccess
Expand Down
2 changes: 1 addition & 1 deletion lib/Model/AbstractShopifySubscriptionProductUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*
* @category Class
* @package Wallee\Sdk
* @author customweb GmbH
* @author wallee AG
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
*/
class AbstractShopifySubscriptionProductUpdate implements ModelInterface, ArrayAccess
Expand Down
2 changes: 1 addition & 1 deletion lib/Model/AbstractSpaceUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*
* @category Class
* @package Wallee\Sdk
* @author customweb GmbH
* @author wallee AG
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
*/
class AbstractSpaceUpdate implements ModelInterface, ArrayAccess
Expand Down
2 changes: 1 addition & 1 deletion lib/Model/AbstractSubscriberUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*
* @category Class
* @package Wallee\Sdk
* @author customweb GmbH
* @author wallee AG
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
*/
class AbstractSubscriberUpdate implements ModelInterface, ArrayAccess
Expand Down
2 changes: 1 addition & 1 deletion lib/Model/AbstractSubscriptionAffiliateUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*
* @category Class
* @package Wallee\Sdk
* @author customweb GmbH
* @author wallee AG
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
*/
class AbstractSubscriptionAffiliateUpdate implements ModelInterface, ArrayAccess
Expand Down
2 changes: 1 addition & 1 deletion lib/Model/AbstractSubscriptionMetricUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*
* @category Class
* @package Wallee\Sdk
* @author customweb GmbH
* @author wallee AG
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
*/
class AbstractSubscriptionMetricUpdate implements ModelInterface, ArrayAccess
Expand Down
2 changes: 1 addition & 1 deletion lib/Model/AbstractSubscriptionProductActive.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*
* @category Class
* @package Wallee\Sdk
* @author customweb GmbH
* @author wallee AG
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
*/
class AbstractSubscriptionProductActive implements ModelInterface, ArrayAccess
Expand Down
2 changes: 1 addition & 1 deletion lib/Model/AbstractTokenUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*
* @category Class
* @package Wallee\Sdk
* @author customweb GmbH
* @author wallee AG
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
*/
class AbstractTokenUpdate implements ModelInterface, ArrayAccess
Expand Down
Loading

0 comments on commit 4dfad73

Please sign in to comment.