Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Commit

Permalink
Release 1.2.8
Browse files Browse the repository at this point in the history
  • Loading branch information
edgaraswallee committed Aug 10, 2022
1 parent 20014cf commit 3b354db
Show file tree
Hide file tree
Showing 18 changed files with 24 additions and 236 deletions.
3 changes: 1 addition & 2 deletions Block/Method/Info.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,7 @@ public function getTransactionState()
*/
public function formatAmount($amount)
{
//NULL was changed to 0 because PHP8.1 does not allow NULL as parameter
return $this->priceCurrency->format($amount, 0, 0, 0, $this->getTransaction()
return $this->priceCurrency->format($amount, null, null, null, $this->getTransaction()
->getCurrency());
}

Expand Down
4 changes: 0 additions & 4 deletions Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,6 @@ public function fixLength($string, $maxLength)
*/
public function removeLinebreaks($string)
{
if($string == NULL) //PHP8.1 does not support NULL on preg_replace
{
$string='';
}
return \preg_replace("/\r|\n/", ' ', $string);
}

Expand Down
12 changes: 4 additions & 8 deletions Model/Payment/Method/Adapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,15 +200,11 @@ public function isAvailable(CartInterface $quote = null)
if ($quote != null && $this->apiClient->checkApiClientData()) {
$spaceId = $this->scopeConfig->getValue('postfinancecheckout_payment/general/space_id',
ScopeInterface::SCOPE_STORE, $quote->getStoreId());
$paymentMethodConfiguration = $this->getPaymentMethodConfiguration();

if (! empty($spaceId)) {
if (! empty($spaceId)) {
try {
if (!$this->transactionService->isPaymentMethodAvailable(
$quote,
$paymentMethodConfiguration->getConfigurationId(),
$paymentMethodConfiguration->getSpaceId())
) {
if (! $this->transactionService->isPaymentMethodAvailable($quote,
$this->getPaymentMethodConfiguration()
->getConfigurationId())) {
return false;
}
} catch (\Exception $e) {
Expand Down
7 changes: 2 additions & 5 deletions Model/Service/Quote/TransactionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,16 +210,13 @@ public function getPossiblePaymentMethods(Quote $quote)
*
* @param Quote $quote
* @param int $paymentMethodConfigurationId
* @param int $paymentMethodConfigurationSpaceId
* @return boolean
*/
public function isPaymentMethodAvailable(Quote $quote, $paymentMethodConfigurationId, $paymentMethodConfigurationSpaceId)
public function isPaymentMethodAvailable(Quote $quote, $paymentMethodConfigurationId)
{
$possiblePaymentMethods = $this->getPossiblePaymentMethods($quote);
foreach ($possiblePaymentMethods as $possiblePaymentMethod) {
if ($possiblePaymentMethod->getId() == $paymentMethodConfigurationId
&& $possiblePaymentMethod->getSpaceId() == $paymentMethodConfigurationSpaceId
) {
if ($possiblePaymentMethod->getId() == $paymentMethodConfigurationId) {
return true;
}
}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This repository contains the Magento 2.2 extension that enables to process payme

## Documentation

* [Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/1.2.7/docs/en/documentation.html)
* [Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/1.2.8/docs/en/documentation.html)

## Support

Expand All @@ -28,4 +28,4 @@ We do provide special integrations for the following one step checkouts:

## License

Please see the [license file](https://github.com/pfpayments/magento-2.2/blob/1.2.7/LICENSE) for more information.
Please see the [license file](https://github.com/pfpayments/magento-2.2/blob/1.2.8/LICENSE) for more information.
70 changes: 0 additions & 70 deletions Setup/Patch/Data/AddData.php

This file was deleted.

8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
}
],
"type" : "magento2-module",
"version" : "1.2.7",
"version" : "1.2.8",
"require" : {
"php": "7.0.2|7.0.4|~7.0.6|~7.1.0|~7.2.0|~8.0|~8.1",
"php": "7.0.2|7.0.4|~7.0.6|~7.1.0|~7.2.0",
"magento/framework" : "^101.0.2",
"postfinancecheckout/sdk": "3.0.1"
"postfinancecheckout/sdk": "2.1.6"
},
"autoload" : {
"files" : [
Expand All @@ -32,4 +32,4 @@
"PostFinanceCheckout\\Payment\\": ""
}
}
}
}
2 changes: 1 addition & 1 deletion docs/en/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h2>Documentation</h2> </div>
</a>
</li>
<li>
<a href="https://github.com/pfpayments/magento-2.2/releases/tag/1.2.7/">
<a href="https://github.com/pfpayments/magento-2.2/releases/tag/1.2.8/">
Source
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<resource>PostFinanceCheckout_Payment::config</resource>
<group id="information" translate="label comment" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Information</label>
<comment><![CDATA[If you need help setting up the PostFinance Checkout extension, check out the <a href="https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/1.2.7/docs/en/documentation.html" target="_blank">documentation</a>.]]></comment>
<comment><![CDATA[If you need help setting up the PostFinance Checkout extension, check out the <a href="https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/1.2.8/docs/en/documentation.html" target="_blank">documentation</a>.]]></comment>
<field id="version" translate="label" type="label" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Module Version</label>
</field>
Expand Down
4 changes: 2 additions & 2 deletions etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<default>
<postfinancecheckout_payment>
<information>
<version>1.2.7</version>
<sdk_version>3.0.1</sdk_version>
<version>1.2.8</version>
<sdk_version>2.1.6</sdk_version>
</information>
<general>
<base_gateway_url>https://checkout.postfinance.ch/</base_gateway_url>
Expand Down
130 changes: 0 additions & 130 deletions etc/db_schema.xml

This file was deleted.

2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="PostFinanceCheckout_Payment" setup_version="1.2.7">
<module name="PostFinanceCheckout_Payment" setup_version="1.2.8">
<sequence>
<module name="Magento_Sales"/>
<module name="Magento_Payment"/>
Expand Down
2 changes: 1 addition & 1 deletion i18n/de_DE.csv
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"Gift Wrap","Geschenkverpackung"
"Hold Delivery","Lieferung halten"
"ID required","ID erforderlich"
"If you need help setting up the PostFinance Checkout extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/1.2.7/docs/en/documentation.html"" target=""_blank"">documentation</a>.","Falls Sie Hilfe benötigen beim Einrichten der PostFinance Checkout-Erweiterung, sehen Sie sich die <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/1.2.7/docs/en/documentation.html"" target=""_blank"">Dokumentation</a> an."
"If you need help setting up the PostFinance Checkout extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/1.2.8/docs/en/documentation.html"" target=""_blank"">documentation</a>.","Falls Sie Hilfe benötigen beim Einrichten der PostFinance Checkout-Erweiterung, sehen Sie sich die <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/1.2.8/docs/en/documentation.html"" target=""_blank"">Dokumentation</a> an."
"Inactive","Inaktiv"
"Information","Informationen"
"Invoice","Rechnung"
Expand Down
2 changes: 1 addition & 1 deletion i18n/en_US.csv
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"Gift Wrap","Gift Wrap"
"Hold Delivery","Hold Delivery"
"ID required","ID required"
"If you need help setting up the PostFinance Checkout extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/1.2.7/docs/en/documentation.html"" target=""_blank"">documentation</a>.","If you need help setting up the PostFinance Checkout extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/1.2.7/docs/en/documentation.html"" target=""_blank"">documentation</a>."
"If you need help setting up the PostFinance Checkout extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/1.2.8/docs/en/documentation.html"" target=""_blank"">documentation</a>.","If you need help setting up the PostFinance Checkout extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/1.2.8/docs/en/documentation.html"" target=""_blank"">documentation</a>."
"Inactive","Inactive"
"Information","Information"
"Invoice","Invoice"
Expand Down
Loading

0 comments on commit 3b354db

Please sign in to comment.