Skip to content

Commit d9851b3

Browse files
Release 3.0.7
1 parent 8049c0e commit d9851b3

26 files changed

+114
-92
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This repository contains the PostFinance Checkout plugin that enables WooCommerc
1616

1717
## Documentation
1818

19-
* [Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.6/docs/en/documentation.html)
19+
* [Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.7/docs/en/documentation.html)
2020

2121
## Support
2222

@@ -33,4 +33,4 @@ ____________________________________________________________________________
3333

3434
## License
3535

36-
Please see the [license file](https://github.com/pfpayments/woocommerce/blob/3.0.6/LICENSE) for more information.
36+
Please see the [license file](https://github.com/pfpayments/woocommerce/blob/3.0.7/LICENSE) for more information.

changelog.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -770,3 +770,10 @@ Tested against:
770770
- [Tested Against] Woocommerce 8.9.1
771771
- [Tested Against] PHP SDK 4.2.0
772772

773+
= 3.0.7 - Jun 14 2024 =
774+
- [Feature] Upgraded PHP-SDK to 4.2.1
775+
- [Tested Against] PHP 8.2
776+
- [Tested Against] Wordpress 6.5.3
777+
- [Tested Against] Woocommerce 8.9.1
778+
- [Tested Against] PHP SDK 4.2.0
779+

docs/en/documentation.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ <h2>Documentation</h2> </div>
2323
</a>
2424
</li>
2525
<li>
26-
<a href="https://github.com/pfpayments/woocommerce/releases/tag/3.0.6/">
26+
<a href="https://github.com/pfpayments/woocommerce/releases/tag/3.0.7/">
2727
Source
2828
</a>
2929
</li>

includes/admin/class-wc-postfinancecheckout-admin-settings-page.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public function get_settings() {
187187
$settings = array(
188188
array(
189189
'links' => array(
190-
'https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.6/docs/en/documentation.html' => __( 'Documentation', 'woo-postfinancecheckout' ),
190+
'https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.7/docs/en/documentation.html' => __( 'Documentation', 'woo-postfinancecheckout' ),
191191
'https://checkout.postfinance.ch/en-ch/user/signup' => __( 'Sign Up', 'woo-postfinancecheckout' ),
192192
),
193193
'type' => 'postfinancecheckout_links',

includes/class-wc-postfinancecheckout-migration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ public static function check_version() {
249249
public static function plugin_row_meta( $links, $file ) {
250250
if ( WC_POSTFINANCECHECKOUT_PLUGIN_BASENAME === $file ) {
251251
$row_meta = array(
252-
'docs' => '<a href="https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.6/docs/en/documentation.html" aria-label="' . esc_attr__( 'View Documentation', 'woo-postfinancecheckout' ) . '">' . esc_html__( 'Documentation', 'woo-postfinancecheckout' ) . '</a>',
252+
'docs' => '<a href="https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.7/docs/en/documentation.html" aria-label="' . esc_attr__( 'View Documentation', 'woo-postfinancecheckout' ) . '">' . esc_html__( 'Documentation', 'woo-postfinancecheckout' ) . '</a>',
253253
);
254254

255255
return array_merge( $links, $row_meta );

postfinancecheckout-sdk/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "postfinancecheckout/sdk",
3-
"version": "4.2.0",
3+
"version": "4.2.2",
44
"description": "PostFinance Checkout SDK for PHP",
55
"keywords": [
66
"postfinancecheckout",

postfinancecheckout-sdk/lib/ApiClient.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ final class ApiClient {
4848
* @var array
4949
*/
5050
private $defaultHeaders = [
51-
'x-meta-sdk-version' => "4.2.0",
51+
'x-meta-sdk-version' => "4.2.2",
5252
'x-meta-sdk-language' => 'php',
5353
'x-meta-sdk-provider' => "PostFinance Checkout",
5454
];
@@ -58,7 +58,7 @@ final class ApiClient {
5858
*
5959
* @var string
6060
*/
61-
private $userAgent = 'PHP-Client/4.2.0/php';
61+
private $userAgent = 'PHP-Client/4.2.2/php';
6262

6363
/**
6464
* The path to the certificate authority file.

postfinancecheckout-sdk/lib/Configuration.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class Configuration
8080
*
8181
* @var string
8282
*/
83-
protected $userAgent = 'PostFinanceCheckout\Sdk/4.2.0/php';
83+
protected $userAgent = 'PostFinanceCheckout\Sdk/4.2.2/php';
8484

8585
/**
8686
* Debug switch (default set to false)
@@ -388,8 +388,8 @@ public static function toDebugReport()
388388
$report = 'PHP SDK (PostFinanceCheckout\Sdk) Debug Report:' . PHP_EOL;
389389
$report .= ' OS: ' . php_uname() . PHP_EOL;
390390
$report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL;
391-
$report .= ' OpenAPI Spec Version: 4.2.0' . PHP_EOL;
392-
$report .= ' SDK Package Version: 4.2.0' . PHP_EOL;
391+
$report .= ' OpenAPI Spec Version: 4.2.2' . PHP_EOL;
392+
$report .= ' SDK Package Version: 4.2.2' . PHP_EOL;
393393
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;
394394

395395
return $report;

postfinancecheckout-sdk/lib/Http/CurlHttpClient.php

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ public function isSupported() {
4040
public function send(ApiClient $apiClient, HttpRequest $request) {
4141
$curl = curl_init();
4242

43-
$tempCAFile = sys_get_temp_dir() . DIRECTORY_SEPARATOR . "PostFinance Checkout-ca-bundle.crt";
44-
4543
// set timeout, if needed
4644
if ($request->getTimeOut() !== 0) {
4745
curl_setopt($curl, CURLOPT_TIMEOUT, $request->getTimeOut());
@@ -61,11 +59,6 @@ public function send(ApiClient $apiClient, HttpRequest $request) {
6159
} else {
6260
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
6361
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2);
64-
if (file_exists($tempCAFile)) {
65-
// use the temporal CA Bundle if it was set, which indicates a previous error.
66-
$apiClient->setCertificateAuthority($tempCAFile);
67-
curl_setopt($curl, CURLOPT_CAINFO, $apiClient->getCertificateAuthority());
68-
}
6962
}
7063

7164
if ($request->getMethod() === HttpRequest::POST) {
@@ -109,21 +102,8 @@ public function send(ApiClient $apiClient, HttpRequest $request) {
109102

110103
// Make the request
111104
$response = curl_exec($curl);
112-
if ($response) {
113-
$response = $this->handleResponse($apiClient, $request, $curl, $response, $request->getUrl());
114-
} else {
115-
// if there was an error, try again with the CA bundle provided by this SDK.
116-
if (!file_exists($tempCAFile)) {
117-
$caContent = file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . ".." . DIRECTORY_SEPARATOR . "ca-bundle.crt");
118-
file_put_contents($tempCAFile, $caContent);
119-
120-
// Try again the request, this time with the CA bundle provided by this SDK.
121-
$apiClient->setCertificateAuthority($tempCAFile);
122-
curl_setopt($curl, CURLOPT_CAINFO, $apiClient->getCertificateAuthority());
123-
$response = curl_exec($curl);
124-
$response = $this->handleResponse($apiClient, $request, $curl, $response, $request->getUrl());
125-
}
126-
}
105+
106+
$response = $this->handleResponse($apiClient, $request, $curl, $response, $request->getUrl());
127107

128108
curl_close($curl);
129109
fclose($debugFilePointer);

postfinancecheckout-sdk/lib/Model/AnalyticsQuery.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* AnalyticsQuery model
2828
*
2929
* @category Class
30-
* @description Represents a query to be submitted for execution in Analytics.
30+
* @description
3131
* @package PostFinanceCheckout\Sdk
3232
* @author wallee AG
3333
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
@@ -259,7 +259,7 @@ public function getAccountId()
259259
/**
260260
* Sets account_id
261261
*
262-
* @param int $account_id The mandatory ID of an account in which the query shall be executed. Must be a valid account ID greater than 0.
262+
* @param int $account_id The ID of the account in which the query is to be executed.
263263
*
264264
* @return $this
265265
*/
@@ -284,7 +284,7 @@ public function getExternalId()
284284
/**
285285
* Sets external_id
286286
*
287-
* @param string $external_id A client generated nonce which uniquely identifies the query to be executed. Subsequent submissions with the same external ID will not re-execute the query but instead return the existing execution with that ID. Either the External ID or a Maximal Cache Age greater than 0 must be specified. If both are specified the External ID will have precedence and the Maximal Cache Age will be ignored.
287+
* @param string $external_id A client-generated nonce which uniquely identifies some action to be executed. Subsequent requests with the same external ID do not execute the action again, but return the original result.
288288
*
289289
* @return $this
290290
*/
@@ -309,7 +309,7 @@ public function getMaxCacheAge()
309309
/**
310310
* Sets max_cache_age
311311
*
312-
* @param int $max_cache_age The maximal age in minutes of cached query executions to return. If an equivalent query execution with the same Query String, Account ID and Spaces parameters not older than the specified age is already available that execution will be returned instead of a newly started execution. Set to 0 or null (and set a unique, previously unused External ID) to force a new query execution irrespective of previous executions. Either the External ID or a Cache Duration greater than 0 must be specified. If both are specified, the External ID will be preferred (and the Maximal Cache Age ignored).
312+
* @param int $max_cache_age The maximum age (in minutes) of queries already executed that are to be taken into account. If an equivalent query is already available and not older than the specified age, its result will be returned instead of re-executing it. To force a new execution, specify a new, unique external ID and no maximum cache age.
313313
*
314314
* @return $this
315315
*/
@@ -334,7 +334,7 @@ public function getQueryString()
334334
/**
335335
* Sets query_string
336336
*
337-
* @param string $query_string The SQL statement which is being submitted for execution. Must be a valid PrestoDB/Athena SQL statement.
337+
* @param string $query_string The PrestoDB/Athena SQL statement to be executed.
338338
*
339339
* @return $this
340340
*/
@@ -366,7 +366,7 @@ public function getScannedDataLimit()
366366
/**
367367
* Sets scanned_data_limit
368368
*
369-
* @param float $scanned_data_limit The maximal amount of scanned data that this query is allowed to scan. After this limit is reached query will be canceled by the system.
369+
* @param float $scanned_data_limit The maximum amount of data that the query is allowed to scan. After the limit is reached, the query will be canceled.
370370
*
371371
* @return $this
372372
*/
@@ -391,7 +391,7 @@ public function getSpaceIds()
391391
/**
392392
* Sets space_ids
393393
*
394-
* @param int[] $space_ids The IDs of the spaces in which the query shall be executed. At most 5 space IDs may be specified. All specified spaces must be owned by the account specified by the accountId property. The spaces property may be missing or empty to query all spaces of the specified account.
394+
* @param int[] $space_ids The IDs of the spaces belonging to the specified account in which the query is to be executed. Do not provide any value to query all spaces in the specified account.
395395
*
396396
* @return $this
397397
*/

0 commit comments

Comments
 (0)