Skip to content

Commit

Permalink
Release 3.0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrowanwallee committed Aug 15, 2024
1 parent aad045a commit 2e51e2f
Show file tree
Hide file tree
Showing 20 changed files with 48 additions and 31 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/woo-publish.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Release Plugin
on:
on:
push:
tags:
- '*'
Expand All @@ -18,7 +18,10 @@ jobs:
WHITELABEL: ${{ vars.WHITELABEL_NAME }}
FAQ_ENTRIES: ${{ vars.FAQ_ENTRIES }}
FEATURES: ${{ vars.FEATURES }}
# sleep 90 is required, because gradle release command takes around 65s, we should start upload zip file after it finishes
# zip file is attached when pipeline is finished
run: |
sleep 90
echo $GITHUB_WORKSPACE
echo $WORDPRESS_ORG_SLUG
ls -ltrh
Expand Down Expand Up @@ -58,6 +61,8 @@ jobs:

- name: WordPress Plugin Deploy
id: deploy
# does not deploy if it's testing repo
if: ${{ vars.WORDPRESS_ORG_SLUG != 'woo-WhiteLabelGithubOwnerName' }}
uses: 10up/action-wordpress-plugin-deploy@stable
with:
generate-zip: true
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This repository contains the PostFinance Checkout plugin that enables WooCommerc

## Documentation

* [Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.9/docs/en/documentation.html)
* [Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.10/docs/en/documentation.html)

## Support

Expand All @@ -33,4 +33,4 @@ ____________________________________________________________________________

## License

Please see the [license file](https://github.com/pfpayments/woocommerce/blob/3.0.9/LICENSE) for more information.
Please see the [license file](https://github.com/pfpayments/woocommerce/blob/3.0.10/LICENSE) for more information.
7 changes: 7 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -790,3 +790,10 @@ Tested against:
- [Tested Against] Woocommerce 9.1.2
- [Tested Against] PHP SDK 4.4.0

= 3.0.10 - Aug 14 2024 =
- [Bugfix] Fixed syntax issues with older php versions (7.4)
- [Tested Against] PHP 8.0 and PHP 7.4
- [Tested Against] Wordpress 6.6
- [Tested Against] Woocommerce 9.1.4
- [Tested Against] PHP SDK 4.5.0

2 changes: 1 addition & 1 deletion docs/en/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h2>Documentation</h2> </div>
</a>
</li>
<li>
<a href="https://github.com/pfpayments/woocommerce/releases/tag/3.0.9/">
<a href="https://github.com/pfpayments/woocommerce/releases/tag/3.0.10/">
Source
</a>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public function get_settings() {
$settings = array(
array(
'links' => array(
'https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.9/docs/en/documentation.html' => __( 'Documentation', 'woo-postfinancecheckout' ),
'https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.10/docs/en/documentation.html' => __( 'Documentation', 'woo-postfinancecheckout' ),
'https://checkout.postfinance.ch/en-ch/user/signup' => __( 'Sign Up', 'woo-postfinancecheckout' ),
),
'type' => 'postfinancecheckout_links',
Expand Down
2 changes: 1 addition & 1 deletion includes/class-wc-postfinancecheckout-migration.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ public static function check_version() {
public static function plugin_row_meta( $links, $file ) {
if ( WC_POSTFINANCECHECKOUT_PLUGIN_BASENAME === $file ) {
$row_meta = array(
'docs' => '<a href="https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.9/docs/en/documentation.html" aria-label="' . esc_attr__( 'View Documentation', 'woo-postfinancecheckout' ) . '">' . esc_html__( 'Documentation', 'woo-postfinancecheckout' ) . '</a>',
'docs' => '<a href="https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.10/docs/en/documentation.html" aria-label="' . esc_attr__( 'View Documentation', 'woo-postfinancecheckout' ) . '">' . esc_html__( 'Documentation', 'woo-postfinancecheckout' ) . '</a>',
);

return array_merge( $links, $row_meta );
Expand Down
2 changes: 1 addition & 1 deletion postfinancecheckout-sdk/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "postfinancecheckout/sdk",
"version": "4.4.0",
"version": "4.5.0",
"description": "PostFinance Checkout SDK for PHP",
"keywords": [
"postfinancecheckout",
Expand Down
4 changes: 2 additions & 2 deletions postfinancecheckout-sdk/lib/ApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ final class ApiClient {
* @var array
*/
private $defaultHeaders = [
'x-meta-sdk-version' => "4.4.0",
'x-meta-sdk-version' => "4.5.0",
'x-meta-sdk-language' => 'php',
'x-meta-sdk-provider' => "PostFinance Checkout",
];
Expand All @@ -58,7 +58,7 @@ final class ApiClient {
*
* @var string
*/
private $userAgent = 'PHP-Client/4.4.0/php';
private $userAgent = 'PHP-Client/4.5.0/php';

/**
* The path to the certificate authority file.
Expand Down
6 changes: 3 additions & 3 deletions postfinancecheckout-sdk/lib/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class Configuration
*
* @var string
*/
protected $userAgent = 'PostFinanceCheckout\Sdk/4.4.0/php';
protected $userAgent = 'PostFinanceCheckout\Sdk/4.5.0/php';

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

return $report;
Expand Down
7 changes: 6 additions & 1 deletion postfinancecheckout-sdk/lib/Http/CurlHttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,12 @@ public function send(ApiClient $apiClient, HttpRequest $request): HttpResponse {
* @return HttpResponse
* @throws ConnectionException
*/
private function handleResponse(ApiClient $apiClient, HttpRequest $request, \CurlHandle $curl, string|bool $curlResponse, string $url): HttpResponse {
private function handleResponse(ApiClient $apiClient, HttpRequest $request, $curl, $curlResponse, string $url): HttpResponse {
// Remove this check once PHP 7.4 is not supported anymore and this can be set in the arguments:
if (!is_string($curlResponse) && !is_bool($curlResponse)) {
throw new ConnectionException($url, $request->getLogToken(), "API call response was not bool or string.");
}

$httpHeaderSize = curl_getinfo($curl, CURLINFO_HEADER_SIZE);

// Handle the case where $curlResponse is false (indicating an error)
Expand Down
2 changes: 1 addition & 1 deletion postfinancecheckout-sdk/lib/Service/ChargeFlowService.php
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ public function fetchChargeFlowPaymentPageUrlWithHttpInfo($space_id, $id) {
}
// header params
$headerParams = [];
$headerAccept = $this->apiClient->selectHeaderAccept(['text/plain;charset=utf-8', 'application/json']);
$headerAccept = $this->apiClient->selectHeaderAccept(['application/json', 'text/plain;charset=utf-8']);
if (!is_null($headerAccept)) {
$headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept;
}
Expand Down
2 changes: 1 addition & 1 deletion postfinancecheckout-sdk/lib/Service/HumanUserService.php
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ public function exportWithHttpInfo($request) {
}
// header params
$headerParams = [];
$headerAccept = $this->apiClient->selectHeaderAccept(['text/csv', 'application/json;charset=utf-8']);
$headerAccept = $this->apiClient->selectHeaderAccept(['application/json;charset=utf-8', 'text/csv']);
if (!is_null($headerAccept)) {
$headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function javascriptUrlWithHttpInfo($space_id, $id) {
}
// header params
$headerParams = [];
$headerAccept = $this->apiClient->selectHeaderAccept(['text/plain;charset=utf-8', 'application/json']);
$headerAccept = $this->apiClient->selectHeaderAccept(['application/json', 'text/plain;charset=utf-8']);
if (!is_null($headerAccept)) {
$headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function javascriptUrlWithHttpInfo($space_id, $id) {
}
// header params
$headerParams = [];
$headerAccept = $this->apiClient->selectHeaderAccept(['text/plain;charset=utf-8', 'application/json']);
$headerAccept = $this->apiClient->selectHeaderAccept(['application/json', 'text/plain;charset=utf-8']);
if (!is_null($headerAccept)) {
$headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public function paymentFormUrlWithHttpInfo($credentials) {
}
// header params
$headerParams = [];
$headerAccept = $this->apiClient->selectHeaderAccept(['text/plain;charset=utf-8', 'application/json']);
$headerAccept = $this->apiClient->selectHeaderAccept(['application/json', 'text/plain;charset=utf-8']);
if (!is_null($headerAccept)) {
$headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function paymentPageUrlWithHttpInfo($space_id, $id) {
}
// header params
$headerParams = [];
$headerAccept = $this->apiClient->selectHeaderAccept(['text/plain;charset=utf-8', 'application/json']);
$headerAccept = $this->apiClient->selectHeaderAccept(['application/json', 'text/plain;charset=utf-8']);
if (!is_null($headerAccept)) {
$headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept;
}
Expand Down
2 changes: 1 addition & 1 deletion postfinancecheckout-sdk/lib/Service/TransactionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ public function exportWithHttpInfo($space_id, $request) {
}
// header params
$headerParams = [];
$headerAccept = $this->apiClient->selectHeaderAccept(['text/csv', 'application/json;charset=utf-8']);
$headerAccept = $this->apiClient->selectHeaderAccept(['application/json;charset=utf-8', 'text/csv']);
if (!is_null($headerAccept)) {
$headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept;
}
Expand Down
2 changes: 1 addition & 1 deletion postfinancecheckout-sdk/test/ApiClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public function testSdkHeaders()
$this->assertGreaterThanOrEqual(4, count($headers));

// Check SDK default header values.
$this->assertEquals($headers['x-meta-sdk-version'], "4.4.0");
$this->assertEquals($headers['x-meta-sdk-version'], "4.5.0");
$this->assertEquals($headers['x-meta-sdk-language'], 'php');
$this->assertEquals($headers['x-meta-sdk-provider'], "PostFinance Checkout");
$this->assertEquals($headers['x-meta-sdk-language-version'], phpversion());
Expand Down
14 changes: 7 additions & 7 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: postfinancecheckout AG
Tags: woocommerce PostFinance Checkout, woocommerce, PostFinance Checkout, payment, e-commerce, webshop, psp, invoice, packing slips, pdf, customer invoice, processing
Requires at least: 4.7
Tested up to: 6.5
Stable tag: 3.0.9
Stable tag: 3.0.10
License: Apache 2
License URI: http://www.apache.org/licenses/LICENSE-2.0

Expand All @@ -23,7 +23,7 @@ To use this extension, a PostFinance Checkout account is required. Sign up on [P

== Documentation ==

Additional documentation for this plugin is available [here](https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.9/docs/en/documentation.html).
Additional documentation for this plugin is available [here](https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.10/docs/en/documentation.html).

== Support ==

Expand Down Expand Up @@ -58,9 +58,9 @@ Support queries can be issued on the [PostFinance Checkout support site](https:/
== Changelog ==


= 3.0.9 - Jul 22 2024 =
- [Bugfix] If payment fails, go back to checkout page.
- [Tested Against] PHP 8.0
= 3.0.10 - Aug 14 2024 =
- [Bugfix] Fixed syntax issues with older php versions (7.4)
- [Tested Against] PHP 8.0 and PHP 7.4
- [Tested Against] Wordpress 6.6
- [Tested Against] Woocommerce 9.1.2
- [Tested Against] PHP SDK 4.4.0
- [Tested Against] Woocommerce 9.1.4
- [Tested Against] PHP SDK 4.5.0
6 changes: 3 additions & 3 deletions woocommerce-postfinancecheckout.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Plugin URI: https://wordpress.org/plugins/woo-postfinancecheckout
* Description: Process WooCommerce payments with PostFinance Checkout.
* License: Apache2
* Version: 3.0.9
* Version: 3.0.10
* License URI: http://www.apache.org/licenses/LICENSE-2.0
* Author: postfinancecheckout AG
* Author URI: https://postfinance.ch/en/business/products/e-commerce/postfinance-checkout-all-in-one.html
Expand Down Expand Up @@ -39,14 +39,14 @@ final class WooCommerce_PostFinanceCheckout {
const CK_INTEGRATION = 'wc_postfinancecheckout_integration';
const CK_ORDER_REFERENCE = 'wc_postfinancecheckout_order_reference';
const CK_ENFORCE_CONSISTENCY = 'wc_postfinancecheckout_enforce_consistency';
const WC_MAXIMUM_VERSION = '9.1.2';
const WC_MAXIMUM_VERSION = '9.1.4';

/**
* WooCommerce PostFinanceCheckout version.
*
* @var string
*/
private $version = '3.0.9';
private $version = '3.0.10';

/**
* The single instance of the class.
Expand Down

0 comments on commit 2e51e2f

Please sign in to comment.