Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG_de-DE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 7.1.11
* Update: Unzer PHP SDK 4.0.1
* Entfernung von individuellem Plugin-php Requirement in composer.json

# 7.1.10
* PayPal Express funktioniert im Checkout unter Shopware 6.7 wieder korrekt
* Klarna-Zahlungen schlagen unter Shopware 6.7 nicht mehr mit dem Fehler „Zahlungsmethode nicht gefunden“ fehl
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG_en-GB.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 7.1.11
* Update: Unzer PHP SDK 4.0.1
* Removed individual php requirement in composer.json

# 7.1.10
* PayPal Express now works correctly at checkout in Shopware 6.7
* Klarna payments no longer fail with a “payment method not found” error in Shopware 6.7
Expand Down
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "unzerdev/shopware6",
"description": "Unzer payment integration for Shopware 6",
"version": "7.1.10",
"version": "7.1.11",
"type": "shopware-platform-plugin",
"license": "Apache-2.0",
"minimum-stability": "dev",
Expand All @@ -20,8 +20,7 @@
}
},
"require": {
"php": ">=8.2 || <=8.4",
"unzerdev/php-sdk": "~3.13.0",
"unzerdev/php-sdk": "~4.0.0",
"shopware/core": "~6.7.0",
"shopware/administration": "*",
"shopware/storefront": "*"
Expand Down
34 changes: 16 additions & 18 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ public function hydrateObject(
}
}

$billingAddress = $this->prepareAddress($billingAddress);
$shippingAddress = $this->prepareAddress($shippingAddress);

if (empty($billingAddress->getCompany()) || !\in_array($paymentMethodId, self::B2B_CUSTOMERS_ALLOWED, true)) {
$unzerCustomer = CustomerFactory::createCustomer(
$billingAddress->getFirstName(),
Expand Down Expand Up @@ -150,6 +153,8 @@ public function hydrateExistingCustomer(
throw new \RuntimeException(\sprintf('Could not determine the address for customer with number %s', $customer->getCustomerNumber()));
}

$billingAddress = $this->prepareAddress($billingAddress);

return $this->updateAdditionalDataToCustomer($unzerCustomer, $customer, $billingAddress, $orderTransaction);
}

Expand Down Expand Up @@ -315,4 +320,23 @@ private function updateShippingAddress(UnzerCustomer $unzerCustomer, OrderAddres

$unzerCustomer->setShippingAddress($unzerShippingAddress);
}
}

protected function prepareAddress(OrderAddressEntity|CustomerAddressEntity|null $address):OrderAddressEntity|CustomerAddressEntity|null{
if($address === null){
return null;
}

$address = clone $address;

$address->setFirstName(trim($address->getFirstName()));
$address->setLastName(trim($address->getLastName()));
$address->setStreet(trim($address->getStreet()));
$address->setZipcode(trim($address->getZipcode()));
$address->setCity(trim($address->getCity()));
if(!empty($address->getCompany())){
$address->setCompany(trim($address->getCompany()));
}

return $address;
}
}
5 changes: 4 additions & 1 deletion vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
echo $err;
}
}
throw new RuntimeException($err);
trigger_error(
$err,
E_USER_ERROR
);
}

require_once __DIR__ . '/composer/autoload_real.php';
Expand Down
45 changes: 4 additions & 41 deletions vendor/composer/InstalledVersions.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,12 @@
*/
class InstalledVersions
{
/**
* @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to
* @internal
*/
private static $selfDir = null;

/**
* @var mixed[]|null
* @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
*/
private static $installed;

/**
* @var bool
*/
private static $installedIsLocalDir;

/**
* @var bool|null
*/
Expand Down Expand Up @@ -320,24 +309,6 @@ public static function reload($data)
{
self::$installed = $data;
self::$installedByVendor = array();

// when using reload, we disable the duplicate protection to ensure that self::$installed data is
// always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not,
// so we have to assume it does not, and that may result in duplicate data being returned when listing
// all installed packages for example
self::$installedIsLocalDir = false;
}

/**
* @return string
*/
private static function getSelfDir()
{
if (self::$selfDir === null) {
self::$selfDir = strtr(__DIR__, '\\', '/');
}

return self::$selfDir;
}

/**
Expand All @@ -351,27 +322,19 @@ private static function getInstalled()
}

$installed = array();
$copiedLocalDir = false;

if (self::$canGetVendors) {
$selfDir = self::getSelfDir();
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
$vendorDir = strtr($vendorDir, '\\', '/');
if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) {
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require $vendorDir.'/composer/installed.php';
self::$installedByVendor[$vendorDir] = $required;
$installed[] = $required;
if (self::$installed === null && $vendorDir.'/composer' === $selfDir) {
self::$installed = $required;
self::$installedIsLocalDir = true;
$installed[] = self::$installedByVendor[$vendorDir] = $required;
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
self::$installed = $installed[count($installed) - 1];
}
}
if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) {
$copiedLocalDir = true;
}
}
}

Expand All @@ -387,7 +350,7 @@ private static function getInstalled()
}
}

if (self::$installed !== array() && !$copiedLocalDir) {
if (self::$installed !== array()) {
$installed[] = self::$installed;
}

Expand Down
2 changes: 0 additions & 2 deletions vendor/composer/LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Copyright (c) Nils Adermann, Jordi Boggiano

Permission is hereby granted, free of charge, to any person obtaining a copy
Expand All @@ -18,4 +17,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

18 changes: 9 additions & 9 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,31 @@
"packages": [
{
"name": "unzerdev/php-sdk",
"version": "3.13.1",
"version_normalized": "3.13.1.0",
"version": "4.0.1",
"version_normalized": "4.0.1.0",
"source": {
"type": "git",
"url": "https://github.com/unzerdev/php-sdk.git",
"reference": "0a26d70b33185d52e49b06cb500a6e01bb6f1087"
"reference": "a9344b823fbf5374cd49e07ab6352d385578299e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/unzerdev/php-sdk/zipball/0a26d70b33185d52e49b06cb500a6e01bb6f1087",
"reference": "0a26d70b33185d52e49b06cb500a6e01bb6f1087",
"url": "https://api.github.com/repos/unzerdev/php-sdk/zipball/a9344b823fbf5374cd49e07ab6352d385578299e",
"reference": "a9344b823fbf5374cd49e07ab6352d385578299e",
"shasum": ""
},
"require": {
"ext-json": "*",
"php": "~7.4.0|~8.0.0|~8.1.0|~8.2.0|~8.3.0|~8.4.0"
"php": "~8.1.0|~8.2.0|~8.3.0|~8.4.0|~8.5.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.0",
"phpunit/phpunit": ">6.5 <10.0"
"phpunit/phpunit": "^9.6"
},
"suggest": {
"ext-curl": "*"
},
"time": "2025-09-23T14:21:50+00:00",
"time": "2026-05-15T13:48:06+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
Expand All @@ -42,7 +42,7 @@
"description": "This is the php sdk to connect to the Unzer rest API.",
"support": {
"email": "support@unzer.com",
"source": "https://github.com/unzerdev/php-sdk/tree/3.13.1"
"source": "https://github.com/unzerdev/php-sdk/tree/4.0.1"
},
"install-path": "../unzerdev/php-sdk"
}
Expand Down
14 changes: 7 additions & 7 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php return array(
'root' => array(
'name' => 'unzerdev/shopware6',
'pretty_version' => '7.0.0',
'version' => '7.0.0.0',
'pretty_version' => '7.1.11',
'version' => '7.1.11.0',
'reference' => null,
'type' => 'shopware-platform-plugin',
'install_path' => __DIR__ . '/../../',
Expand All @@ -17,17 +17,17 @@
),
),
'unzerdev/php-sdk' => array(
'pretty_version' => '3.13.1',
'version' => '3.13.1.0',
'reference' => '0a26d70b33185d52e49b06cb500a6e01bb6f1087',
'pretty_version' => '4.0.1',
'version' => '4.0.1.0',
'reference' => 'a9344b823fbf5374cd49e07ab6352d385578299e',
'type' => 'library',
'install_path' => __DIR__ . '/../unzerdev/php-sdk',
'aliases' => array(),
'dev_requirement' => false,
),
'unzerdev/shopware6' => array(
'pretty_version' => '7.0.0',
'version' => '7.0.0.0',
'pretty_version' => '7.1.11',
'version' => '7.1.11.0',
'reference' => null,
'type' => 'shopware-platform-plugin',
'install_path' => __DIR__ . '/../../',
Expand Down
9 changes: 5 additions & 4 deletions vendor/composer/platform_check.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

$issues = array();

if (!(PHP_VERSION_ID >= 70400)) {
$issues[] = 'Your Composer dependencies require a PHP version ">= 7.4.0". You are running ' . PHP_VERSION . '.';
if (!(PHP_VERSION_ID >= 80100)) {
$issues[] = 'Your Composer dependencies require a PHP version ">= 8.1.0". You are running ' . PHP_VERSION . '.';
}

if ($issues) {
Expand All @@ -19,7 +19,8 @@
echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
}
}
throw new \RuntimeException(
'Composer detected issues in your platform: ' . implode(' ', $issues)
trigger_error(
'Composer detected issues in your platform: ' . implode(' ', $issues),
E_USER_ERROR
);
}
Loading
Loading