Skip to content

Commit

Permalink
Added SVG logo to the gateway
Browse files Browse the repository at this point in the history
  • Loading branch information
fulopattila122 committed Apr 24, 2024
1 parent 0614456 commit e453b82
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ vendor/
composer.lock
phpunit.xml
/.phpunit.result.cache
/.phpunit.cache/test-results
7 changes: 7 additions & 0 deletions src/MolliePaymentGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ class MolliePaymentGateway implements PaymentGateway

public const DEFAULT_ID = 'mollie';

private static ?string $svg = null;

private ?RequestFactory $requestFactory = null;

private ?ResponseFactory $responseFactory = null;
Expand All @@ -30,6 +32,11 @@ public static function getName(): string
return 'Mollie';
}

public static function svgIcon(): string
{
return self::$svg ??= file_get_contents(__DIR__ . '/../../resources/logo.svg');
}

public function createPaymentRequest(Payment $payment, Address $shippingAddress = null, array $options = []): PaymentRequest
{
return $this->requestFactory()->create(
Expand Down
1 change: 1 addition & 0 deletions src/resources/logo.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e453b82

Please sign in to comment.