Skip to content

Commit 97e5cc3

Browse files
committed
Release 1.3.19
1 parent f6bcc26 commit 97e5cc3

File tree

17 files changed

+109
-38
lines changed

17 files changed

+109
-38
lines changed

Model/Config/Source/GdprMode.php

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
/**
3+
* PostFinance Checkout Magento 2
4+
*
5+
* This Magento 2 extension enables to process payments with PostFinance Checkout (https://postfinance.ch/en/business/products/e-commerce/postfinance-checkout-all-in-one.html/).
6+
*
7+
* @package PostFinanceCheckout_Payment
8+
* @author wallee AG (http://www.wallee.com/)
9+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Software License (ASL 2.0)
10+
*/
11+
namespace PostFinanceCheckout\Payment\Model\Config\Source;
12+
13+
/**
14+
* Provides the integration methods as array options.
15+
*/
16+
class GdprMode implements \Magento\Framework\Option\ArrayInterface
17+
{
18+
19+
const ENABLED = 'enabled';
20+
const DISABLED = 'disabled';
21+
22+
public function toOptionArray()
23+
{
24+
return [
25+
[
26+
'value' => self::ENABLED,
27+
'label' => \__('Enabled')
28+
],
29+
[
30+
'value' => self::DISABLED,
31+
'label' => \__('Disabled')
32+
]
33+
];
34+
}
35+
}

Model/Service/Quote/TransactionService.php

+21
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,17 @@ private function convertQuoteBillingAddress(Quote $quote)
373373
}
374374

375375
$address = $this->convertAddress($quote->getBillingAddress());
376+
377+
$gdprEnabled = $this->scopeConfig->getValue('postfinancecheckout_payment/gdpr/gdpr_enabled',
378+
ScopeInterface::SCOPE_STORE, $quote->getStoreId());
379+
380+
if ($gdprEnabled == 'enabled') {
381+
// removing GDPR sensitive information
382+
$address->setDateOfBirth('');
383+
$address->setFamilyName('');
384+
$address->setGivenName('');
385+
$address->setStreet('');
386+
}
376387
$address->setDateOfBirth($this->getDateOfBirth($quote->getCustomerDob(), $quote->getCustomerId()));
377388
$address->setEmailAddress($this->getCustomerEmailAddress($quote->getCustomerEmail(), $quote->getCustomerId()));
378389
$address->setGender($this->getGender($quote->getCustomerGender(), $quote->getCustomerId()));
@@ -393,6 +404,16 @@ private function convertQuoteShippingAddress(Quote $quote)
393404
}
394405

395406
$address = $this->convertAddress($quote->getShippingAddress());
407+
$gdprEnabled = $this->scopeConfig->getValue('postfinancecheckout_payment/gdpr/gdpr_enabled',
408+
ScopeInterface::SCOPE_STORE, $quote->getStoreId());
409+
410+
if ($gdprEnabled == 'enabled') {
411+
// removing GDPR sensitive information
412+
$address->setDateOfBirth('');
413+
$address->setFamilyName('');
414+
$address->setGivenName('');
415+
$address->setStreet('');
416+
}
396417
$address->setEmailAddress($this->getCustomerEmailAddress($quote->getCustomerEmail(), $quote->getCustomerId()));
397418
return $address;
398419
}

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This repository contains the Magento 2 extension that enables to process payment
1212

1313
## Documentation
1414

15-
* [Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/1.3.18/docs/en/documentation.html)
15+
* [Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/1.3.19/docs/en/documentation.html)
1616

1717

1818
## Support
@@ -30,4 +30,4 @@ We do provide special integrations for the following one step checkouts:
3030

3131
## License
3232

33-
Please see the [license file](https://github.com/pfpayments/magento-2/blob/1.3.18/LICENSE) for more information.
33+
Please see the [license file](https://github.com/pfpayments/magento-2/blob/1.3.19/LICENSE) for more information.

Setup/Patch/Data/AddSetupData.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public static function getDependencies(){
5757
*/
5858

5959
public static function getVersion(){
60-
return '1.3.20';
60+
return '1.3.30';
6161
}
6262

6363
/**

Setup/Patch/Data/UpdateStatusStateData.php

+11-14
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
use \Magento\Framework\Setup\Patch\PatchVersionInterface;
55
use \Magento\Framework\Module\Setup\Migration;
66
use \Magento\Framework\Setup\ModuleDataSetupInterface;
7+
use Magento\Framework\App\ResourceConnection;
8+
79

810

911
/**
@@ -13,30 +15,25 @@
1315

1416
class UpdateStatusStateData implements DataPatchInterface, PatchVersionInterface
1517
{
16-
private $status;
17-
1818
/**
19-
*
20-
* @param \PostFinanceCheckout\Payment\Model\Author $status
21-
*/
19+
* @var \Magento\Framework\Setup\ModuleDataSetupInterface
20+
*/
21+
protected $moduleDataSetup;
2222

2323
public function __construct(
24-
\Magento\Sales\Model\Order\Status $status
24+
ModuleDataSetupInterface $moduleDataSetup
2525
) {
26-
$this->status = $status;
26+
$this->moduleDataSetup = $moduleDataSetup;
2727
}
2828

2929
/**
3030
* @details: This updates the status to the correct status
3131
* @return:none
3232
*/
3333
public function apply(){
34-
$object_Manager = \Magento\Framework\App\ObjectManager::getInstance();
35-
$get_resource = $object_Manager->get('Magento\Framework\App\ResourceConnection');
36-
$connection = $get_resource->getConnection(); // get connection
37-
38-
$update_sql = "UPDATE sales_order_status_state SET is_default = 1 WHERE status = 'processing_postfinancecheckout'";
39-
$connection->query($update_sql);
34+
$tableName = $this->moduleDataSetup->getTable('sales_order_status_state');
35+
$updateSql = "UPDATE " . $tableName . " SET is_default = 1 WHERE status = 'processing_postfinancecheckout'";
36+
$this->moduleDataSetup->getConnection()->query($updateSql);
4037
}
4138

4239
/**
@@ -53,7 +50,7 @@ public static function getDependencies(){
5350
*/
5451

5552
public static function getVersion(){
56-
return '1.3.20';
53+
return '1.3.30';
5754
}
5855

5956
/**

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"type" : "magento2-module",
19-
"version" : "1.3.18",
19+
"version" : "1.3.19",
2020
"require" : {
2121
"php" : "~7.1.3||~7.2.0||~7.3.0||~7.4.0||~8.0||~8.1",
2222
"magento/framework" : "^102.0.0||^103.0.0",

docs/en/documentation.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ <h2>Documentation</h2> </div>
2222
</a>
2323
</li>
2424
<li>
25-
<a href="https://github.com/pfpayments/magento-2/releases/tag/1.3.18/">
25+
<a href="https://github.com/pfpayments/magento-2/releases/tag/1.3.19/">
2626
Source
2727
</a>
2828
</li>

etc/adminhtml/system.xml

+10-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<resource>PostFinanceCheckout_Payment::config</resource>
1919
<group id="information" translate="label comment" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
2020
<label>Information</label>
21-
<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/1.3.18/docs/en/documentation.html" target="_blank">documentation</a>.]]></comment>
21+
<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/1.3.19/docs/en/documentation.html" target="_blank">documentation</a>.]]></comment>
2222
<field id="version" translate="label" type="label" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
2323
<label>Module Version</label>
2424
</field>
@@ -66,6 +66,15 @@
6666
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
6767
</field>
6868
</group>
69+
70+
<group id="gdpr" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
71+
<label>GDPR Settings</label>
72+
<field id="gdpr_enabled" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
73+
<label>GDPR Mode</label>
74+
<comment>Enabled: this can impact certain payment methods and slow down the payment process</comment>
75+
<source_model>PostFinanceCheckout\Payment\Model\Config\Source\GdprMode</source_model>
76+
</field>
77+
</group>
6978
<group id="document" translate="label" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
7079
<label>Document</label>
7180
<field id="customer_download_invoice" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">

etc/config.xml

+4-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<default>
1515
<postfinancecheckout_payment>
1616
<information>
17-
<version>1.3.18</version>
17+
<version>1.3.19</version>
1818
<sdk_version>3.1.2</sdk_version>
1919
</information>
2020
<general>
@@ -28,6 +28,9 @@
2828
<email>
2929
<order>1</order>
3030
</email>
31+
<gdpr>
32+
<gdpr_enabled>disabled</gdpr_enabled>
33+
</gdpr>
3134
<document>
3235
<customer_download_invoice>1</customer_download_invoice>
3336
<customer_download_packing_slip>1</customer_download_packing_slip>

etc/module.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212
-->
1313
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
14-
<module name="PostFinanceCheckout_Payment" setup_version="1.3.18">
14+
<module name="PostFinanceCheckout_Payment" setup_version="1.3.19">
1515
<sequence>
1616
<module name="Magento_Sales"/>
1717
<module name="Magento_Payment"/>

i18n/de_DE.csv

+3-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"Gift Wrap","Geschenkverpackung"
5151
"Hold Delivery","Lieferung halten"
5252
"ID required","ID erforderlich"
53-
"If you need help setting up the PostFinance Checkout extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/1.3.18/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/1.3.18/docs/en/documentation.html"" target=""_blank"">Dokumentation</a> an."
53+
"If you need help setting up the PostFinance Checkout extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/1.3.19/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/1.3.19/docs/en/documentation.html"" target=""_blank"">Dokumentation</a> an."
5454
"Inactive","Inaktiv"
5555
"Information","Informationen"
5656
"Invoice","Rechnung"
@@ -134,4 +134,5 @@
134134
"PostFinance Checkout SDK Version","PostFinance Checkout SDK-Version"
135135
"Failing authorization in store failed: %1.","Das Fehlschlagen der authorisation ist fehlgeschlagen: %1."
136136
"The capture of the invoice failed in the store: %1.","Die Verbuchung konnte im Store nicht verarbeitet werden: %1."
137-
"The associated authorization transaction for the payment could not be found.","Die verknüpfte authorisations-Transaktion konnte für die Zahlung nicht gefunden werden.."
137+
"The associated authorization transaction for the payment could not be found.","Die verknüpfte authorisations-Transaktion konnte für die Zahlung nicht gefunden werden.."
138+
"Enabled: this can impact certain payment methods and slow down the payment process","Aktiviert: Dies kann sich auf bestimmte Zahlungsarten auswirken und den Zahlungsvorgang verlangsamen."

i18n/en_US.csv

+3-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"Gift Wrap","Gift Wrap"
5151
"Hold Delivery","Hold Delivery"
5252
"ID required","ID required"
53-
"If you need help setting up the PostFinance Checkout extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/1.3.18/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/1.3.18/docs/en/documentation.html"" target=""_blank"">documentation</a>."
53+
"If you need help setting up the PostFinance Checkout extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/1.3.19/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/1.3.19/docs/en/documentation.html"" target=""_blank"">documentation</a>."
5454
"Inactive","Inactive"
5555
"Information","Information"
5656
"Invoice","Invoice"
@@ -134,4 +134,5 @@
134134
"PostFinance Checkout SDK Version","PostFinance Checkout SDK Version"
135135
"Failing authorization in store failed: %1.","Failing authorization in store failed: %1."
136136
"The capture of the invoice failed in the store: %1.","The capture of the invoice failed in the store: %1."
137-
"The associated authorization transaction for the payment could not be found.","The associated authorization transaction for the payment could not be found."
137+
"The associated authorization transaction for the payment could not be found.","The associated authorization transaction for the payment could not be found."
138+
"Enabled: this can impact certain payment methods and slow down the payment process", "Enabled: this can impact certain payment methods and slow down the payment process"

i18n/fr_CH.csv

+3-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"Gift Wrap","Papier cadeau"
5151
"Hold Delivery","Suspendre la livraison"
5252
"ID required","Pièce d'identité requise"
53-
"If you need help setting up the wallee extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/1.3.18/docs/en/documentation.html"" target=""_blank"">documentation</a>.","Si vous avez besoin d'aide pour configurer l'extension wallee, consultez la <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/1.3.18/docs/en/documentation.html"" target=""_blank"">documentation</a> an."
53+
"If you need help setting up the wallee extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/1.3.19/docs/en/documentation.html"" target=""_blank"">documentation</a>.","Si vous avez besoin d'aide pour configurer l'extension wallee, consultez la <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/1.3.19/docs/en/documentation.html"" target=""_blank"">documentation</a> an."
5454
"Inactive","Inactif"
5555
"Information","Information"
5656
"Invoice","Facture"
@@ -135,4 +135,5 @@
135135
"wallee SDK Version","wallee SDK-Version"
136136
"Failing authorization in store failed: %1.","Échec de l'autorisation en magasin : %1."
137137
"The capture of the invoice failed in the store: %1.","La capture de la facture a échoué dans la boutique : %1."
138-
"The associated authorization transaction for the payment could not be found.","La transaction d'autorisation associée au paiement est introuvable."
138+
"The associated authorization transaction for the payment could not be found.","La transaction d'autorisation associée au paiement est introuvable."
139+
"Enabled: this can impact certain payment methods and slow down the payment process","Activé : cela peut avoir un impact sur certaines méthodes de paiement et ralentir le processus de paiement."

i18n/fr_FR.csv

+3-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"Gift Wrap","Papier cadeau"
5151
"Hold Delivery","Suspendre la livraison"
5252
"ID required","Pièce d'identité requise"
53-
"If you need help setting up the wallee extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/1.3.18/docs/en/documentation.html"" target=""_blank"">documentation</a>.","Si vous avez besoin d'aide pour configurer l'extension wallee, consultez la <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/1.3.18/docs/en/documentation.html"" target=""_blank"">documentation</a> an."
53+
"If you need help setting up the wallee extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/1.3.19/docs/en/documentation.html"" target=""_blank"">documentation</a>.","Si vous avez besoin d'aide pour configurer l'extension wallee, consultez la <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/1.3.19/docs/en/documentation.html"" target=""_blank"">documentation</a> an."
5454
"Inactive","Inactif"
5555
"Information","Information"
5656
"Invoice","Facture"
@@ -135,4 +135,5 @@
135135
"wallee SDK Version","wallee SDK-Version"
136136
"Failing authorization in store failed: %1.","Échec de l'autorisation en magasin : %1."
137137
"The capture of the invoice failed in the store: %1.","La capture de la facture a échoué dans la boutique : %1."
138-
"The associated authorization transaction for the payment could not be found.","La transaction d'autorisation associée au paiement est introuvable."
138+
"The associated authorization transaction for the payment could not be found.","La transaction d'autorisation associée au paiement est introuvable."
139+
"Enabled: this can impact certain payment methods and slow down the payment process","Activé : cela peut avoir un impact sur certaines méthodes de paiement et ralentir le processus de paiement."

i18n/it_CH.csv

+3-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"Gift Wrap","Confezione regalo"
5151
"Hold Delivery","Sospendi la consegna"
5252
"ID required","ID richiesto"
53-
"If you need help setting up the wallee extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/1.3.18/docs/en/documentation.html"" target=""_blank"">documentation</a>.","Se hai bisogno di aiuto per configurare l'estensione wallee, consulta la <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/1.3.18/docs/en/documentation.html"" target=""_blank"">documentazione</a> an."
53+
"If you need help setting up the wallee extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/1.3.19/docs/en/documentation.html"" target=""_blank"">documentation</a>.","Se hai bisogno di aiuto per configurare l'estensione wallee, consulta la <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/1.3.19/docs/en/documentation.html"" target=""_blank"">documentazione</a> an."
5454
"Inactive","Inattivo"
5555
"Information","Informazione"
5656
"Invoice","Fattura"
@@ -135,4 +135,5 @@
135135
"wallee SDK Version","wallee SDK-Version"
136136
"Failing authorization in store failed: %1.","L'autorizzazione in negozio non è riuscita: %1."
137137
"The capture of the invoice failed in the store: %1.","L'acquisizione della fattura nel negozio non è riuscita: %1."
138-
"The associated authorization transaction for the payment could not be found.","Impossibile trovare la transazione di autorizzazione associata per il pagamento."
138+
"The associated authorization transaction for the payment could not be found.","Impossibile trovare la transazione di autorizzazione associata per il pagamento."
139+
"Enabled: this can impact certain payment methods and slow down the payment process","Abilitato: può influire su alcuni metodi di pagamento e rallentare il processo di pagamento."

0 commit comments

Comments
 (0)