vendor/boldr/mollie-payment-method/src/Payment/MolliePaymentOption.php line 20

Open in your IDE?
  1. <?php
  2. namespace Boldr\Shop\MolliePaymentMethodBundle\Payment;
  3. use Boldr\Shop\ShopBundle\Payment\PaymentOptionInterface;
  4. class MolliePaymentOption implements PaymentOptionInterface
  5. {
  6. private string $method;
  7. private ?string $description;
  8. private ?array $issuers;
  9. private ?string $selectedIssuer = null;
  10. private $image;
  11. public function __construct(string $method, ?string $description = null, ?array $issuers, $image)
  12. {
  13. $this->method = $method;
  14. $this->description = $description;
  15. $this->issuers = $issuers;
  16. $this->image = $image;
  17. }
  18. public function getMethod(): string { return $this->method; }
  19. public function getDescription(): ?string { return $this->description; }
  20. public function getIssuers(): ?array { return $this->issuers; }
  21. public function getImage() { return $this->image; }
  22. public function getSelectedIssuer(): ?string { return $this->selectedIssuer; }
  23. public function setSelectedIssuer(?string $selectedIssuer): void { $this->selectedIssuer = $selectedIssuer; }
  24. public function isEqual(PaymentOptionInterface $paymentOption): bool
  25. {
  26. return $paymentOption instanceof self && $paymentOption->getMethod() == $this->method;
  27. }
  28. }