Skip to content

Commit

Permalink
Merge pull request #64 from shopware/ntr/prepare-plugin-release-65
Browse files Browse the repository at this point in the history
NTR - Prepare plugin release
  • Loading branch information
cyl3x authored Jan 17, 2025
2 parents 8f71009 + a5d7284 commit 15746e0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "swag/paypal",
"description": "PayPal integration for Shopware 6",
"version": "8.6.4",
"version": "8.6.5",
"type": "shopware-platform-plugin",
"license": "MIT",
"authors": [
Expand Down
13 changes: 12 additions & 1 deletion src/Util/Lifecycle/Method/IdealMethodData.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

use Shopware\Core\Framework\Log\Package;
use Swag\PayPal\RestApi\V1\Api\MerchantIntegrations;
use Swag\PayPal\RestApi\V1\Api\MerchantIntegrations\Capability;
use Swag\PayPal\Util\Availability\AvailabilityContext;

/**
Expand Down Expand Up @@ -62,6 +63,16 @@ public function getMediaFileName(): ?string

public function validateCapability(MerchantIntegrations $merchantIntegrations): string
{
return self::CAPABILITY_ACTIVE;
$capability = $merchantIntegrations->getSpecificCapability('IDEAL');

if ($capability === null) {
return self::CAPABILITY_INACTIVE;
}

if ($capability->getStatus() === Capability::STATUS_ACTIVE) {
return self::CAPABILITY_ACTIVE;
}

return self::CAPABILITY_INELIGIBLE;
}
}

0 comments on commit 15746e0

Please sign in to comment.