Skip to content

Commit

Permalink
Refactor changelog and backend help texts
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasendereco authored and iljamobilemojo committed Aug 20, 2024
1 parent e8eeb6d commit 5de7a15
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 20 deletions.
16 changes: 8 additions & 8 deletions Resources/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -539,18 +539,18 @@

<element type="text" scope="shop">
<name>whitelistPaymentMethod</name>
<label lang="de">Die Bestandskundenprüfung wird zusätzlich für diese Zahlungsarten aktiviert.</label>
<label lang="en">The existing customer check is additionally activated for these payment methods.</label>
<description lang="de">Die Namen der Zahlungsmethoden müssen klein geschrieben und mit "," getrennt eingeben werden. (z.B. "paypal,paypalexpress,cashondelivery").</description>
<description lang="en">The payment method names must be entered in lower case and separated by ",". (e.g. "paypal,paypalexpress,cashondelivery").</description>
<label lang="de">Die Bestandskundenprüfung soll für Bestellungen aus diesen Quellen erweitert werden:</label>
<label lang="en">The existing customer check should be extended to orders from these sources:</label>
<description lang="de">Standardmäßig sind folgende Zahlungsarten hinterlegt: 'prepayment', 'cash', 'invoice', 'debit', 'sepa' (geprüft wird das Feld "Name"). Es werden nicht alle Zahlungarten untersützt.</description>
<description lang="en">The following payment methods are additionally checked by default: 'prepayment', 'cash', 'invoice', 'debit', 'sepa' (the "Name" field is checked). Not all payment methods are supported.</description>
</element>

<element type="text" scope="shop">
<name>alternativePayPalPaymentNames</name>
<label lang="de">Die PayPal Express Checkout Prüfung wird zusätzlich für diese Zahlungsarten aktiviert.</label>
<label lang="en">The paypal express checkout check is additionally activated for these payment methods.</label>
<description lang="de">Die Namen der Zahlungsmethoden müssen klein geschrieben und mit "," getrennt eingeben werden. (z.B. "paypal,paypalexpress,cashondelivery").</description>
<description lang="en">The payment method names must be entered in lower case and separated by ",". (e.g. "paypal,paypalexpress,cashondelivery").</description>
<label lang="de">Folgende “Sofortzahlungsarten” sollen zusätzlich zu PayPal Express geprüft werden:</label>
<label lang="en">The following “instant payment methods” should be checked in addition to PayPal Express:</label>
<description lang="de">Standardmäßig sind folgende Zahlungsarten hinterlegt: 'swagpaymentpaypalunified' (geprüft wird das Feld "Name"). Es werden nicht alle Zahlungarten untersützt.</description>
<description lang="en">The following payment methods are additionally checked by default: 'swagpaymentpaypalunified' (the "Name" field is checked). Not all payment methods are supported.</description>
</element>

<element type="boolean" scope="shop">
Expand Down
6 changes: 3 additions & 3 deletions Subscriber/Frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ private function getPayPalExpressCheckoutPaymentWhitelist()
*
* @return bool True if the current payment method is in the whitelist, false otherwise
*/
private function isCurrentPaymentMethodInWhitelist($currentPaymentMethod, array $whitelist): bool
private function isCurrentPaymentMethodInWhitelist($currentPaymentMethod, array $whitelist)
{
$normalizedPaymentName = $this->normalizePaymentMethodName($currentPaymentMethod);
$normalizedWhitelist = $this->normalizePaymentMethodNames($whitelist);
Expand All @@ -729,7 +729,7 @@ private function isCurrentPaymentMethodInWhitelist($currentPaymentMethod, array
*
* @return array Normalized payment method names
*/
private function normalizePaymentMethodNames(array $paymentMethodNames): array
private function normalizePaymentMethodNames(array $paymentMethodNames)
{
return array_map([$this, 'normalizePaymentMethodName'], $paymentMethodNames);
}
Expand All @@ -743,7 +743,7 @@ private function normalizePaymentMethodNames(array $paymentMethodNames): array
*
* @return string Normalized payment method name
*/
private function normalizePaymentMethodName(string $paymentMethodName): string
private function normalizePaymentMethodName(string $paymentMethodName)
{
return mb_strtolower(
trim(
Expand Down
Empty file modified build-shopware5-client.sh
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}
],
"require": {

"php": "^7.4 || ^8.0"
},
"require-dev": {
"squizlabs/php_codesniffer": "3.7.2",
Expand Down
Empty file modified fetch-shops.sh
100644 → 100755
Empty file.
30 changes: 23 additions & 7 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,36 @@
<changes lang="de">
<![CDATA[
<ul>
<li>Im Backend konfigurierbare Whitelist für Zahlungsmethoden hinzugefügt.</li>
<li>Im Backend konfigurierbare Whitelist für Zahlungsmethoden im PayPal Express Checkout hinzugefügt.</li>
<li>Legacycode für das Prüfen eines existierenden Nutzers entfernt.</li>
<li><b>Neue Features</b>
<ul>
<li>Im Backend wurde die Option hinzugefügt, weitere Quellen für Bestellungen zu hinterlegen, die von der Bestandskundenprüfung validiert werden sollen.</li>
<li>Im Backend wurde die Option hinzugefügt weitere Sofortzahlungsarten zu hinterlegen, die von der Adressprüfung validiert werden sollen.</li>
</ul>
</li>
<li><b>Verbesserungen</b>
<ul>
<li>Legacycode für das Prüfen eines existierenden Nutzers entfernt.</li>
</ul>
</li>
</ul>
]]>
</changes>
<changes lang="en">
<![CDATA[
<ul>
<li>In backend configurable whitelist for payment methods added.</li>
<li>In backend configurable whitelist for payment methods in PayPal Express Checkout added.</li>
<li>Legacy code for checking an existing user removed.</li>
<li><b>New features</b>
<ul>
<li>The option to store additional sources for orders that should be validated by the existing customer check has been added to the backend.</li>
<li>The option to store additional instant payment methods that should be validated by the address check has been added to the backend.</li>
</ul>
</li>
<li><b>Improvements</b>
<ul>
<li>Legacy code for checking an existing user has been removed.</li>
</ul>
</li>
</ul>
]]>
]]>
</changes>
</changelog>

Expand Down
2 changes: 1 addition & 1 deletion test_php_versions.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# Define PHP versions to test against
versions=("7.4" "8.0" "8.1" "8.2" "8.3")
versions=("5.6" "7.4" "8.0" "8.1" "8.2" "8.3")

# Find all PHP files in the current directory and subdirectories, excluding vendor, node_modules and shops folders
php_files=$(find . -type f -name "*.php" ! -path "./vendor/*" ! -path "./node_modules/*" ! -path "./shops/*" )
Expand Down

0 comments on commit 5de7a15

Please sign in to comment.