Environment.php 828 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. declare(strict_types=1);
  7. namespace Magento\AuthorizenetAcceptjs\Model\Adminhtml\Source;
  8. /**
  9. * Authorize.net Environment Dropdown source
  10. */
  11. class Environment implements \Magento\Framework\Data\OptionSourceInterface
  12. {
  13. const ENVIRONMENT_PRODUCTION = 'production';
  14. const ENVIRONMENT_SANDBOX = 'sandbox';
  15. /**
  16. * Possible environment types
  17. *
  18. * @return array
  19. */
  20. public function toOptionArray(): array
  21. {
  22. return [
  23. [
  24. 'value' => self::ENVIRONMENT_SANDBOX,
  25. 'label' => 'Sandbox',
  26. ],
  27. [
  28. 'value' => self::ENVIRONMENT_PRODUCTION,
  29. 'label' => 'Production'
  30. ]
  31. ];
  32. }
  33. }