diff --git a/README.md b/README.md index aeab2e1..d25b530 100644 --- a/README.md +++ b/README.md @@ -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.6/docs/en/documentation.html) +* [Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.7/docs/en/documentation.html) ## Support @@ -33,4 +33,4 @@ ____________________________________________________________________________ ## License -Please see the [license file](https://github.com/pfpayments/woocommerce/blob/3.0.6/LICENSE) for more information. \ No newline at end of file +Please see the [license file](https://github.com/pfpayments/woocommerce/blob/3.0.7/LICENSE) for more information. \ No newline at end of file diff --git a/changelog.txt b/changelog.txt index 06201c2..1f15ec7 100644 --- a/changelog.txt +++ b/changelog.txt @@ -770,3 +770,10 @@ Tested against: - [Tested Against] Woocommerce 8.9.1 - [Tested Against] PHP SDK 4.2.0 += 3.0.7 - Jun 14 2024 = +- [Feature] Upgraded PHP-SDK to 4.2.1 +- [Tested Against] PHP 8.2 +- [Tested Against] Wordpress 6.5.3 +- [Tested Against] Woocommerce 8.9.1 +- [Tested Against] PHP SDK 4.2.0 + diff --git a/docs/en/documentation.html b/docs/en/documentation.html index 5754f40..5346bfd 100644 --- a/docs/en/documentation.html +++ b/docs/en/documentation.html @@ -23,7 +23,7 @@

Documentation

  • - + Source
  • diff --git a/includes/admin/class-wc-postfinancecheckout-admin-settings-page.php b/includes/admin/class-wc-postfinancecheckout-admin-settings-page.php index ad717e5..62a9e76 100644 --- a/includes/admin/class-wc-postfinancecheckout-admin-settings-page.php +++ b/includes/admin/class-wc-postfinancecheckout-admin-settings-page.php @@ -187,7 +187,7 @@ public function get_settings() { $settings = array( array( 'links' => array( - 'https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.6/docs/en/documentation.html' => __( 'Documentation', 'woo-postfinancecheckout' ), + 'https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.7/docs/en/documentation.html' => __( 'Documentation', 'woo-postfinancecheckout' ), 'https://checkout.postfinance.ch/en-ch/user/signup' => __( 'Sign Up', 'woo-postfinancecheckout' ), ), 'type' => 'postfinancecheckout_links', diff --git a/includes/class-wc-postfinancecheckout-migration.php b/includes/class-wc-postfinancecheckout-migration.php index 3c14be1..82ee293 100644 --- a/includes/class-wc-postfinancecheckout-migration.php +++ b/includes/class-wc-postfinancecheckout-migration.php @@ -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' => '' . esc_html__( 'Documentation', 'woo-postfinancecheckout' ) . '', + 'docs' => '' . esc_html__( 'Documentation', 'woo-postfinancecheckout' ) . '', ); return array_merge( $links, $row_meta ); diff --git a/postfinancecheckout-sdk/composer.json b/postfinancecheckout-sdk/composer.json index aaf5a1e..835bee8 100644 --- a/postfinancecheckout-sdk/composer.json +++ b/postfinancecheckout-sdk/composer.json @@ -1,6 +1,6 @@ { "name": "postfinancecheckout/sdk", - "version": "4.2.0", + "version": "4.2.2", "description": "PostFinance Checkout SDK for PHP", "keywords": [ "postfinancecheckout", diff --git a/postfinancecheckout-sdk/lib/ApiClient.php b/postfinancecheckout-sdk/lib/ApiClient.php index c3cb203..c96d3b3 100644 --- a/postfinancecheckout-sdk/lib/ApiClient.php +++ b/postfinancecheckout-sdk/lib/ApiClient.php @@ -48,7 +48,7 @@ final class ApiClient { * @var array */ private $defaultHeaders = [ - 'x-meta-sdk-version' => "4.2.0", + 'x-meta-sdk-version' => "4.2.2", 'x-meta-sdk-language' => 'php', 'x-meta-sdk-provider' => "PostFinance Checkout", ]; @@ -58,7 +58,7 @@ final class ApiClient { * * @var string */ - private $userAgent = 'PHP-Client/4.2.0/php'; + private $userAgent = 'PHP-Client/4.2.2/php'; /** * The path to the certificate authority file. diff --git a/postfinancecheckout-sdk/lib/Configuration.php b/postfinancecheckout-sdk/lib/Configuration.php index ac15231..e1c07fc 100644 --- a/postfinancecheckout-sdk/lib/Configuration.php +++ b/postfinancecheckout-sdk/lib/Configuration.php @@ -80,7 +80,7 @@ class Configuration * * @var string */ - protected $userAgent = 'PostFinanceCheckout\Sdk/4.2.0/php'; + protected $userAgent = 'PostFinanceCheckout\Sdk/4.2.2/php'; /** * Debug switch (default set to false) @@ -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.2.0' . PHP_EOL; - $report .= ' SDK Package Version: 4.2.0' . PHP_EOL; + $report .= ' OpenAPI Spec Version: 4.2.2' . PHP_EOL; + $report .= ' SDK Package Version: 4.2.2' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/postfinancecheckout-sdk/lib/Http/CurlHttpClient.php b/postfinancecheckout-sdk/lib/Http/CurlHttpClient.php index 3abf828..dc8aba7 100644 --- a/postfinancecheckout-sdk/lib/Http/CurlHttpClient.php +++ b/postfinancecheckout-sdk/lib/Http/CurlHttpClient.php @@ -40,8 +40,6 @@ public function isSupported() { public function send(ApiClient $apiClient, HttpRequest $request) { $curl = curl_init(); - $tempCAFile = sys_get_temp_dir() . DIRECTORY_SEPARATOR . "PostFinance Checkout-ca-bundle.crt"; - // set timeout, if needed if ($request->getTimeOut() !== 0) { curl_setopt($curl, CURLOPT_TIMEOUT, $request->getTimeOut()); @@ -61,11 +59,6 @@ public function send(ApiClient $apiClient, HttpRequest $request) { } else { curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true); curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2); - if (file_exists($tempCAFile)) { - // use the temporal CA Bundle if it was set, which indicates a previous error. - $apiClient->setCertificateAuthority($tempCAFile); - curl_setopt($curl, CURLOPT_CAINFO, $apiClient->getCertificateAuthority()); - } } if ($request->getMethod() === HttpRequest::POST) { @@ -109,21 +102,8 @@ public function send(ApiClient $apiClient, HttpRequest $request) { // Make the request $response = curl_exec($curl); - if ($response) { - $response = $this->handleResponse($apiClient, $request, $curl, $response, $request->getUrl()); - } else { - // if there was an error, try again with the CA bundle provided by this SDK. - if (!file_exists($tempCAFile)) { - $caContent = file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . ".." . DIRECTORY_SEPARATOR . "ca-bundle.crt"); - file_put_contents($tempCAFile, $caContent); - - // Try again the request, this time with the CA bundle provided by this SDK. - $apiClient->setCertificateAuthority($tempCAFile); - curl_setopt($curl, CURLOPT_CAINFO, $apiClient->getCertificateAuthority()); - $response = curl_exec($curl); - $response = $this->handleResponse($apiClient, $request, $curl, $response, $request->getUrl()); - } - } + + $response = $this->handleResponse($apiClient, $request, $curl, $response, $request->getUrl()); curl_close($curl); fclose($debugFilePointer); diff --git a/postfinancecheckout-sdk/lib/Model/AnalyticsQuery.php b/postfinancecheckout-sdk/lib/Model/AnalyticsQuery.php index deb101f..2ce9d02 100644 --- a/postfinancecheckout-sdk/lib/Model/AnalyticsQuery.php +++ b/postfinancecheckout-sdk/lib/Model/AnalyticsQuery.php @@ -27,7 +27,7 @@ * AnalyticsQuery model * * @category Class - * @description Represents a query to be submitted for execution in Analytics. + * @description * @package PostFinanceCheckout\Sdk * @author wallee AG * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2 @@ -259,7 +259,7 @@ public function getAccountId() /** * Sets account_id * - * @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. + * @param int $account_id The ID of the account in which the query is to be executed. * * @return $this */ @@ -284,7 +284,7 @@ public function getExternalId() /** * Sets external_id * - * @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. + * @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. * * @return $this */ @@ -309,7 +309,7 @@ public function getMaxCacheAge() /** * Sets max_cache_age * - * @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). + * @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. * * @return $this */ @@ -334,7 +334,7 @@ public function getQueryString() /** * Sets query_string * - * @param string $query_string The SQL statement which is being submitted for execution. Must be a valid PrestoDB/Athena SQL statement. + * @param string $query_string The PrestoDB/Athena SQL statement to be executed. * * @return $this */ @@ -366,7 +366,7 @@ public function getScannedDataLimit() /** * Sets scanned_data_limit * - * @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. + * @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. * * @return $this */ @@ -391,7 +391,7 @@ public function getSpaceIds() /** * Sets space_ids * - * @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. + * @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. * * @return $this */ diff --git a/postfinancecheckout-sdk/lib/Model/AnalyticsQueryExecution.php b/postfinancecheckout-sdk/lib/Model/AnalyticsQueryExecution.php index fb1029c..c5b82fd 100644 --- a/postfinancecheckout-sdk/lib/Model/AnalyticsQueryExecution.php +++ b/postfinancecheckout-sdk/lib/Model/AnalyticsQueryExecution.php @@ -290,7 +290,7 @@ public function getAccount() /** * Sets account * - * @param int $account The account in which the query has been executed. + * @param int $account The account in which the query is executed. * * @return $this */ @@ -315,7 +315,7 @@ public function getErrorMessage() /** * Sets error_message * - * @param string $error_message The error message if and only if the query has failed, otherwise null. + * @param string $error_message The error message that describes the reason for the failure of the query execution. * * @return $this */ @@ -340,7 +340,7 @@ public function getExternalId() /** * Sets external_id * - * @param string $external_id The External ID of the query if one had been specified; otherwise null. + * @param string $external_id The external ID of the query if one was specified, otherwise null. * * @return $this */ @@ -365,7 +365,7 @@ public function getFailureReason() /** * Sets failure_reason * - * @param \PostFinanceCheckout\Sdk\Model\FailureReason $failure_reason The reason of the failure if and only if the query has failed, otherwise null. + * @param \PostFinanceCheckout\Sdk\Model\FailureReason $failure_reason The reason for the failure of query execution. * * @return $this */ @@ -415,7 +415,7 @@ public function getProcessingEndTime() /** * Sets processing_end_time * - * @param \DateTime $processing_end_time The time at which processing of the query has finished (either successfully or by failure or by cancelation). Will be null if the query execution has not finished yet. + * @param \DateTime $processing_end_time The date and time when the processing of the query was completed. Null if the query execution has not yet been completed. * * @return $this */ @@ -440,7 +440,7 @@ public function getProcessingStartTime() /** * Sets processing_start_time * - * @param \DateTime $processing_start_time The time at which processing of the query has started (never null). + * @param \DateTime $processing_start_time The date and time when the processing of the query was started. * * @return $this */ @@ -490,7 +490,7 @@ public function getScannedDataInGb() /** * Sets scanned_data_in_gb * - * @param float $scanned_data_in_gb The amount of data scanned while processing the query (in GB). (Note that this amount may increase over time while the query is still being processed and not finished yet.) + * @param float $scanned_data_in_gb The amount of data that was scanned when processing the query (in GB). * * @return $this */ @@ -515,7 +515,7 @@ public function getScannedDataLimit() /** * Sets scanned_data_limit * - * @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. + * @param float $scanned_data_limit The maximal amount of data that this query is allowed to scan (in GB). If this limit is reached, the query will be canceled. * * @return $this */ @@ -540,7 +540,7 @@ public function getSpaces() /** * Sets spaces * - * @param int[] $spaces The spaces in which the query has been executed. May be empty if all spaces of the specified account have been queried. + * @param int[] $spaces The spaces in which the query is executed. May be empty if all spaces of the specified account have been queried. * * @return $this */ diff --git a/postfinancecheckout-sdk/lib/Model/AnalyticsQueryResultBatch.php b/postfinancecheckout-sdk/lib/Model/AnalyticsQueryResultBatch.php index 5cec7e9..e1c01ef 100644 --- a/postfinancecheckout-sdk/lib/Model/AnalyticsQueryResultBatch.php +++ b/postfinancecheckout-sdk/lib/Model/AnalyticsQueryResultBatch.php @@ -234,7 +234,7 @@ public function getColumns() /** * Sets columns * - * @param \PostFinanceCheckout\Sdk\Model\AnalyticsSchemaColumn[] $columns The schemas of the columns returned by the query (in order). Will be null if the results of the query are not (yet) available. + * @param \PostFinanceCheckout\Sdk\Model\AnalyticsSchemaColumn[] $columns The schemas of the columns returned by the query (in order). * * @return $this */ @@ -259,7 +259,7 @@ public function getNextToken() /** * Sets next_token * - * @param string $next_token The token to be provided to fetch the next batch of results. May be null if no more result batches are available. + * @param string $next_token The token to fetch the next batch of results. Null if no more results are available. * * @return $this */ @@ -284,7 +284,7 @@ public function getQueryExecution() /** * Sets query_execution * - * @param \PostFinanceCheckout\Sdk\Model\AnalyticsQueryExecution $query_execution The query execution which produced the result. + * @param \PostFinanceCheckout\Sdk\Model\AnalyticsQueryExecution $query_execution The query execution that produced the result. * * @return $this */ @@ -309,7 +309,7 @@ public function getRows() /** * Sets rows * - * @param string[][] $rows The rows of the result set contained in this batch where each row is a list of column values (in order of the columns specified in the query). Will be null if the results of the query are not (yet) available. + * @param string[][] $rows The resulting rows contained in this batch where each row is a list of column values. * * @return $this */ diff --git a/postfinancecheckout-sdk/lib/Model/AnalyticsSchemaColumn.php b/postfinancecheckout-sdk/lib/Model/AnalyticsSchemaColumn.php index e08b13e..ddcd69c 100644 --- a/postfinancecheckout-sdk/lib/Model/AnalyticsSchemaColumn.php +++ b/postfinancecheckout-sdk/lib/Model/AnalyticsSchemaColumn.php @@ -312,7 +312,7 @@ public function getDescription() /** * Sets description * - * @param map[string,string] $description A human readable description of the property contained in this column or null if this is a synthetic column which is the result of some SQL expression. + * @param map[string,string] $description The localized description of the property contained in this column or null if this is a synthetic column which is the result of some SQL expression. * * @return $this */ @@ -362,7 +362,7 @@ public function getReferencedTable() /** * Sets referenced_table * - * @param string $referenced_table The name of the referenced table if this column represents a foreign-key relation to the IDs of another table, otherwise null. + * @param string $referenced_table The name of the referenced table if this column represents a foreign-key relation to another table, otherwise null. * * @return $this */ @@ -387,7 +387,7 @@ public function getScale() /** * Sets scale * - * @param int $scale The scale (maximal number number of digits in the fractional part) in case of a decimal data type, otherwise 0. + * @param int $scale The scale (maximal number of digits in the fractional part) in case of a decimal data type, otherwise 0. * * @return $this */ @@ -412,7 +412,7 @@ public function getTableName() /** * Sets table_name * - * @param string $table_name The name of the table which defines this column. + * @param string $table_name The name of the table that the column belongs to. * * @return $this */ diff --git a/postfinancecheckout-sdk/lib/Model/AnalyticsSchemaTable.php b/postfinancecheckout-sdk/lib/Model/AnalyticsSchemaTable.php index eb0c9ad..e02ad9c 100644 --- a/postfinancecheckout-sdk/lib/Model/AnalyticsSchemaTable.php +++ b/postfinancecheckout-sdk/lib/Model/AnalyticsSchemaTable.php @@ -227,7 +227,7 @@ public function getColumns() /** * Sets columns * - * @param \PostFinanceCheckout\Sdk\Model\AnalyticsSchemaColumn[] $columns The schemas of all columns of this table. + * @param \PostFinanceCheckout\Sdk\Model\AnalyticsSchemaColumn[] $columns The schemas of all columns of the table. * * @return $this */ @@ -252,7 +252,7 @@ public function getDescription() /** * Sets description * - * @param map[string,string] $description A human readable description of the entity type contained in this table. + * @param map[string,string] $description The localized description of the table. * * @return $this */ @@ -277,7 +277,7 @@ public function getTableName() /** * Sets table_name * - * @param string $table_name The name of this table. + * @param string $table_name The name of the table. * * @return $this */ diff --git a/postfinancecheckout-sdk/lib/Model/DocumentTemplate.php b/postfinancecheckout-sdk/lib/Model/DocumentTemplate.php index 6625cfc..76a55f4 100644 --- a/postfinancecheckout-sdk/lib/Model/DocumentTemplate.php +++ b/postfinancecheckout-sdk/lib/Model/DocumentTemplate.php @@ -287,7 +287,7 @@ public function getDefaultTemplate() /** * Sets default_template * - * @param bool $default_template The default document template is used whenever no specific template is specified for a particular template type. + * @param bool $default_template Whether this is the default document template which is used whenever no specific template is specified for the same template type. * * @return $this */ @@ -312,7 +312,7 @@ public function getDeliveryEnabled() /** * Sets delivery_enabled * - * @param bool $delivery_enabled + * @param bool $delivery_enabled Whether documents of this template should be delivered. * * @return $this */ @@ -387,7 +387,7 @@ public function getName() /** * Sets name * - * @param string $name + * @param string $name The name used to identify the document template. * * @return $this */ @@ -441,7 +441,7 @@ public function getSpaceId() /** * Sets space_id * - * @param int $space_id + * @param int $space_id The ID of the space this object belongs to. * * @return $this */ @@ -491,7 +491,7 @@ public function getTemplateResource() /** * Sets template_resource * - * @param \PostFinanceCheckout\Sdk\Model\ModelResourcePath $template_resource + * @param \PostFinanceCheckout\Sdk\Model\ModelResourcePath $template_resource The resource path to a custom template to be used to generate PDF documents. * * @return $this */ @@ -516,7 +516,7 @@ public function getType() /** * Sets type * - * @param int $type + * @param int $type The document template's type. * * @return $this */ diff --git a/postfinancecheckout-sdk/lib/Model/DocumentTemplateType.php b/postfinancecheckout-sdk/lib/Model/DocumentTemplateType.php index 004c53d..b35d28e 100644 --- a/postfinancecheckout-sdk/lib/Model/DocumentTemplateType.php +++ b/postfinancecheckout-sdk/lib/Model/DocumentTemplateType.php @@ -241,7 +241,7 @@ public function getDescription() /** * Sets description * - * @param map[string,string] $description + * @param map[string,string] $description The localized description of the document template type. * * @return $this */ @@ -266,7 +266,7 @@ public function getFeature() /** * Sets feature * - * @param int $feature + * @param int $feature The feature that this document template type belongs to. * * @return $this */ @@ -291,7 +291,7 @@ public function getGroup() /** * Sets group * - * @param \PostFinanceCheckout\Sdk\Model\DocumentTemplateTypeGroup $group + * @param \PostFinanceCheckout\Sdk\Model\DocumentTemplateTypeGroup $group The group that this document template type belongs to. * * @return $this */ @@ -341,7 +341,7 @@ public function getTitle() /** * Sets title * - * @param map[string,string] $title + * @param map[string,string] $title The localized title of the document template type. * * @return $this */ diff --git a/postfinancecheckout-sdk/lib/Model/DocumentTemplateTypeGroup.php b/postfinancecheckout-sdk/lib/Model/DocumentTemplateTypeGroup.php index c83439d..3c7e62c 100644 --- a/postfinancecheckout-sdk/lib/Model/DocumentTemplateTypeGroup.php +++ b/postfinancecheckout-sdk/lib/Model/DocumentTemplateTypeGroup.php @@ -245,7 +245,7 @@ public function getTitle() /** * Sets title * - * @param map[string,string] $title + * @param map[string,string] $title The localized title of the group. * * @return $this */ diff --git a/postfinancecheckout-sdk/lib/Model/InvoiceReimbursement.php b/postfinancecheckout-sdk/lib/Model/InvoiceReimbursement.php index 5d78119..ee92304 100644 --- a/postfinancecheckout-sdk/lib/Model/InvoiceReimbursement.php +++ b/postfinancecheckout-sdk/lib/Model/InvoiceReimbursement.php @@ -65,6 +65,7 @@ class InvoiceReimbursement implements ModelInterface, ArrayAccess 'recipient_family_name' => 'string', 'recipient_given_name' => 'string', 'recipient_iban' => 'string', + 'recipient_organization_name' => 'string', 'recipient_postcode' => 'string', 'recipient_street' => 'string', 'sender_iban' => 'string', @@ -94,6 +95,7 @@ class InvoiceReimbursement implements ModelInterface, ArrayAccess 'recipient_family_name' => null, 'recipient_given_name' => null, 'recipient_iban' => null, + 'recipient_organization_name' => null, 'recipient_postcode' => null, 'recipient_street' => null, 'sender_iban' => null, @@ -124,6 +126,7 @@ class InvoiceReimbursement implements ModelInterface, ArrayAccess 'recipient_family_name' => 'recipientFamilyName', 'recipient_given_name' => 'recipientGivenName', 'recipient_iban' => 'recipientIban', + 'recipient_organization_name' => 'recipientOrganizationName', 'recipient_postcode' => 'recipientPostcode', 'recipient_street' => 'recipientStreet', 'sender_iban' => 'senderIban', @@ -153,6 +156,7 @@ class InvoiceReimbursement implements ModelInterface, ArrayAccess 'recipient_family_name' => 'setRecipientFamilyName', 'recipient_given_name' => 'setRecipientGivenName', 'recipient_iban' => 'setRecipientIban', + 'recipient_organization_name' => 'setRecipientOrganizationName', 'recipient_postcode' => 'setRecipientPostcode', 'recipient_street' => 'setRecipientStreet', 'sender_iban' => 'setSenderIban', @@ -182,6 +186,7 @@ class InvoiceReimbursement implements ModelInterface, ArrayAccess 'recipient_family_name' => 'getRecipientFamilyName', 'recipient_given_name' => 'getRecipientGivenName', 'recipient_iban' => 'getRecipientIban', + 'recipient_organization_name' => 'getRecipientOrganizationName', 'recipient_postcode' => 'getRecipientPostcode', 'recipient_street' => 'getRecipientStreet', 'sender_iban' => 'getSenderIban', @@ -239,6 +244,8 @@ public function __construct(array $data = null) $this->container['recipient_iban'] = isset($data['recipient_iban']) ? $data['recipient_iban'] : null; + $this->container['recipient_organization_name'] = isset($data['recipient_organization_name']) ? $data['recipient_organization_name'] : null; + $this->container['recipient_postcode'] = isset($data['recipient_postcode']) ? $data['recipient_postcode'] : null; $this->container['recipient_street'] = isset($data['recipient_street']) ? $data['recipient_street'] : null; @@ -740,6 +747,31 @@ public function setRecipientIban($recipient_iban) } + /** + * Gets recipient_organization_name + * + * @return string + */ + public function getRecipientOrganizationName() + { + return $this->container['recipient_organization_name']; + } + + /** + * Sets recipient_organization_name + * + * @param string $recipient_organization_name + * + * @return $this + */ + public function setRecipientOrganizationName($recipient_organization_name) + { + $this->container['recipient_organization_name'] = $recipient_organization_name; + + return $this; + } + + /** * Gets recipient_postcode * diff --git a/postfinancecheckout-sdk/lib/Model/PaymentLinkCreate.php b/postfinancecheckout-sdk/lib/Model/PaymentLinkCreate.php index 6854b64..76a6a48 100644 --- a/postfinancecheckout-sdk/lib/Model/PaymentLinkCreate.php +++ b/postfinancecheckout-sdk/lib/Model/PaymentLinkCreate.php @@ -135,6 +135,9 @@ public function listInvalidProperties() if ($this->container['external_id'] === null) { $invalidProperties[] = "'external_id' can't be null"; } + if ($this->container['protection_mode'] === null) { + $invalidProperties[] = "'protection_mode' can't be null"; + } return $invalidProperties; } diff --git a/postfinancecheckout-sdk/lib/Model/StaticValue.php b/postfinancecheckout-sdk/lib/Model/StaticValue.php index 4945c96..3edfa9c 100644 --- a/postfinancecheckout-sdk/lib/Model/StaticValue.php +++ b/postfinancecheckout-sdk/lib/Model/StaticValue.php @@ -259,7 +259,7 @@ public function getFeatures() /** * Sets features * - * @param int[] $features + * @param int[] $features The features that this static value belongs to. * * @return $this */ diff --git a/postfinancecheckout-sdk/lib/Model/UserAccountRole.php b/postfinancecheckout-sdk/lib/Model/UserAccountRole.php index c5c2d55..322dc28 100644 --- a/postfinancecheckout-sdk/lib/Model/UserAccountRole.php +++ b/postfinancecheckout-sdk/lib/Model/UserAccountRole.php @@ -248,7 +248,7 @@ public function getAccount() /** * Sets account * - * @param int $account + * @param int $account The account in which the role is assigned to the user. * * @return $this */ @@ -273,7 +273,7 @@ public function getAppliesOnSubAccount() /** * Sets applies_on_sub_account * - * @param bool $applies_on_sub_account + * @param bool $applies_on_sub_account Whether the role is assigned to the user in subaccounts only. * * @return $this */ @@ -323,7 +323,7 @@ public function getRole() /** * Sets role * - * @param int $role + * @param int $role The role that is assigned to the user. * * @return $this */ @@ -348,7 +348,7 @@ public function getUser() /** * Sets user * - * @param int $user + * @param int $user The user whose role this defines. * * @return $this */ diff --git a/postfinancecheckout-sdk/lib/Model/UserSpaceRole.php b/postfinancecheckout-sdk/lib/Model/UserSpaceRole.php index 234280c..f527210 100644 --- a/postfinancecheckout-sdk/lib/Model/UserSpaceRole.php +++ b/postfinancecheckout-sdk/lib/Model/UserSpaceRole.php @@ -266,7 +266,7 @@ public function getRole() /** * Sets role * - * @param int $role + * @param int $role The role that is assigned to the user. * * @return $this */ @@ -291,7 +291,7 @@ public function getSpace() /** * Sets space * - * @param int $space + * @param int $space The space in which the role is assigned to the user. * * @return $this */ @@ -316,7 +316,7 @@ public function getUser() /** * Sets user * - * @param int $user + * @param int $user The user whose role this defines. * * @return $this */ diff --git a/postfinancecheckout-sdk/lib/Model/WebAppConfirmationResponse.php b/postfinancecheckout-sdk/lib/Model/WebAppConfirmationResponse.php index e63f72b..b200307 100644 --- a/postfinancecheckout-sdk/lib/Model/WebAppConfirmationResponse.php +++ b/postfinancecheckout-sdk/lib/Model/WebAppConfirmationResponse.php @@ -27,7 +27,7 @@ * WebAppConfirmationResponse model * * @category Class - * @description The confirmation response provides the details about the installation of the web app. + * @description The confirmation response provides details about the installation of the web app. * @package PostFinanceCheckout\Sdk * @author wallee AG * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2 @@ -241,7 +241,7 @@ public function getAccessToken() /** * Sets access_token * - * @param string $access_token The access code grants permissions to the web service API according to the OAuth standard. + * @param string $access_token The access code granting permissions to the web service API according to the OAuth standard. * * @return $this */ @@ -266,7 +266,7 @@ public function getScope() /** * Sets scope * - * @param string $scope The scope contains the permissions granted to the web app within the space. + * @param string $scope The list of the permissions granted to the web app within the space. * * @return $this */ @@ -291,7 +291,7 @@ public function getSpace() /** * Sets space * - * @param \PostFinanceCheckout\Sdk\Model\Space $space This is the space into which the web app is installed into. + * @param \PostFinanceCheckout\Sdk\Model\Space $space The space that the web app was installed in. * * @return $this */ @@ -316,7 +316,7 @@ public function getState() /** * Sets state * - * @param string $state The state contains the state parameter content provided when initiating the app installation. + * @param string $state The state parameter that was provided in the authorization request. * * @return $this */ @@ -341,7 +341,7 @@ public function getTokenType() /** * Sets token_type * - * @param string $token_type The token type indicates the type of the access token. The type determines the authentication mechanism to use for accessing the web service API. + * @param string $token_type The type of the access token that determines the authentication mechanism to use for accessing the web service API. * * @return $this */ diff --git a/postfinancecheckout-sdk/test/ApiClientTest.php b/postfinancecheckout-sdk/test/ApiClientTest.php index c5a3e43..6346fcb 100644 --- a/postfinancecheckout-sdk/test/ApiClientTest.php +++ b/postfinancecheckout-sdk/test/ApiClientTest.php @@ -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.2.0"); + $this->assertEquals($headers['x-meta-sdk-version'], "4.2.2"); $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()); diff --git a/readme.txt b/readme.txt index 7ffbafb..9ec5f68 100644 --- a/readme.txt +++ b/readme.txt @@ -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.6 +Stable tag: 3.0.7 License: Apache 2 License URI: http://www.apache.org/licenses/LICENSE-2.0 @@ -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.6/docs/en/documentation.html). +Additional documentation for this plugin is available [here](https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.7/docs/en/documentation.html). == Support == @@ -58,8 +58,8 @@ Support queries can be issued on the [PostFinance Checkout support site](https:/ == Changelog == -= 3.0.6 - May 30 2024 = -- [Feature] Upgraded PHP-SDK to 4.2.0 += 3.0.7 - Jun 14 2024 = +- [Feature] Upgraded PHP-SDK to 4.2.1 - [Tested Against] PHP 8.2 - [Tested Against] Wordpress 6.5.3 - [Tested Against] Woocommerce 8.9.1 diff --git a/woocommerce-postfinancecheckout.php b/woocommerce-postfinancecheckout.php index f236a0b..e2a8179 100644 --- a/woocommerce-postfinancecheckout.php +++ b/woocommerce-postfinancecheckout.php @@ -4,7 +4,7 @@ * Plugin URI: https://wordpress.org/plugins/woo-postfinancecheckout * Description: Process WooCommerce payments with PostFinance Checkout. * License: Apache2 - * Version: 3.0.6 + * Version: 3.0.7 * 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 @@ -46,7 +46,7 @@ final class WooCommerce_PostFinanceCheckout { * * @var string */ - private $version = '3.0.6'; + private $version = '3.0.7'; /** * The single instance of the class.