From c59fcc0742267451d0f748ac758cd6da488d6265 Mon Sep 17 00:00:00 2001 From: "m.vela" Date: Tue, 5 Nov 2019 14:58:13 +0100 Subject: [PATCH] feat(core): release v2.0.2 --- README.md | 4 ++++ Troubleshooting.md | 24 +++++++++++++++++++ composer.json | 2 +- .../Paymentlink/Service/RequestBuilder.php | 6 ++--- src/DataType/Date.php | 4 ---- src/Infrastructure/ApiConnection.php | 3 --- .../Test/ObjectWithArrayWithObjects.php | 4 ---- ...ArrayWithObjectsFromDifferentNamespace.php | 4 ---- ...rrayWithObjectsFromDifferentNamespaces.php | 4 ---- .../Reflection/Test/ObjectWithTypedArray.php | 4 ---- tests/Test/Unit/Application/Response/Fake.php | 5 ++-- .../Unit/Infrastructure/ApiConnectionTest.php | 12 ---------- 12 files changed, 35 insertions(+), 41 deletions(-) create mode 100644 Troubleshooting.md diff --git a/README.md b/README.md index 7d220fb..5dc64e5 100644 --- a/README.md +++ b/README.md @@ -217,6 +217,10 @@ to bottom: | Response | Example: PaymentResponse +-------------------+ +### Troubleshooting + +See Troubleshooting.md + ### Contributing If you have an issue or a feature request, feel free to create an issue. diff --git a/Troubleshooting.md b/Troubleshooting.md new file mode 100644 index 0000000..71fbaba --- /dev/null +++ b/Troubleshooting.md @@ -0,0 +1,24 @@ +# Troubleshooting + +## Connectivity + +### Error: wrong signature type + +Full error message: `error:1414D172:SSL routines:tls12_check_peer_sigalg:wrong signature type` + +This error is thrown when there is a connectivity issue with Payvision Payment servers. +Due to compatibility reasons the servers currently only support OpenSSL security level 1. + +Some newer systems (like Debian Buster) increased their default security level to level 2, which makes it impossible to connect. +See: https://wiki.debian.org/ContinuousIntegration/TriagingTips/openssl-1.1.1 + +As a temporary workaround, the security level on a Debian Buster system can be lowered by updating a line in the `/etc/ssl/openssl.cnf` file. +Change the line + + CipherString = DEFAULT@SECLEVEL=2 + +to + + CipherString = DEFAULT@SECLEVEL=1 + +Revert the change once the Payvision servers are OpenSSL level 2 compatible. diff --git a/composer.json b/composer.json index bc5a768..81537fe 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "payvision/payvision-sdk-php", "description": "Payvision PHP SDK", "type": "library", - "version": "2.0.1", + "version": "2.0.2", "license": "MIT", "require": { "php": "^7.0.13|^7.1", diff --git a/src/Application/Paymentlink/Service/RequestBuilder.php b/src/Application/Paymentlink/Service/RequestBuilder.php index 6d041cc..fcdbb07 100644 --- a/src/Application/Paymentlink/Service/RequestBuilder.php +++ b/src/Application/Paymentlink/Service/RequestBuilder.php @@ -28,7 +28,7 @@ public static function newLink( { $jsonBody = Builder::toArray($input); return new ApiRequest( - 'paymentlink/links', + 'paymentlinks', 'POST', self::getParameters($jsonBody), $jsonBody['header'] ?? [], @@ -53,7 +53,7 @@ public static function getLinkStatus( ): ApiRequest { return new ApiRequest( - \str_replace('{id}', $id, 'paymentlink/links/{id}'), + \str_replace('{id}', $id, 'paymentlinks/{id}'), 'GET', [], [], @@ -80,7 +80,7 @@ public static function cancelLink( { $jsonBody = Builder::toArray($input); return new ApiRequest( - \str_replace('{id}', $id, 'paymentlink/links/{id}/cancel'), + \str_replace('{id}', $id, 'paymentlinks/{id}/cancel'), 'POST', self::getParameters($jsonBody), $jsonBody['header'] ?? [], diff --git a/src/DataType/Date.php b/src/DataType/Date.php index 57a72f3..ec15408 100644 --- a/src/DataType/Date.php +++ b/src/DataType/Date.php @@ -1,8 +1,4 @@ $request->getPathParams(), - 'curl' => [ - \CURLOPT_SSL_CIPHER_LIST => 'DEFAULT@SECLEVEL=1', - ], ]; if ($jsonRequest !== null) { diff --git a/tests/Test/Unit/Application/Reflection/Test/ObjectWithArrayWithObjects.php b/tests/Test/Unit/Application/Reflection/Test/ObjectWithArrayWithObjects.php index 33772ec..b9d973c 100644 --- a/tests/Test/Unit/Application/Reflection/Test/ObjectWithArrayWithObjects.php +++ b/tests/Test/Unit/Application/Reflection/Test/ObjectWithArrayWithObjects.php @@ -1,8 +1,4 @@ [ 'id' => '67890', ], - 'curl' => [ - \CURLOPT_SSL_CIPHER_LIST => 'DEFAULT@SECLEVEL=1', - ], ] ); $this->mockedResponse->method('getStatusCode')->willReturn(200); @@ -160,9 +157,6 @@ public function testGetRequest() 'query' => [ 'id' => '67890', ], - 'curl' => [ - \CURLOPT_SSL_CIPHER_LIST => 'DEFAULT@SECLEVEL=1', - ], ] ); $this->mockedResponse->method('getStatusCode')->willReturn(200); @@ -292,9 +286,6 @@ public function testTolerantReader() 'query' => [ 'id' => '67890', ], - 'curl' => [ - \CURLOPT_SSL_CIPHER_LIST => 'DEFAULT@SECLEVEL=1', - ], ] ); $this->mockedResponse->method('getStatusCode')->willReturn(200); @@ -353,9 +344,6 @@ public function testExceptionOnMissingRequiredField() 'query' => [ 'id' => '67890', ], - 'curl' => [ - \CURLOPT_SSL_CIPHER_LIST => 'DEFAULT@SECLEVEL=1', - ], ] ); $this->mockedResponse->method('getStatusCode')->willReturn(200);