InfoInterface.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Payment\Model;
  7. /**
  8. * Interface InfoInterface
  9. * @api
  10. * @since 100.0.2
  11. */
  12. interface InfoInterface
  13. {
  14. /**
  15. * Encrypt data
  16. *
  17. * @param string $data
  18. * @return string
  19. */
  20. public function encrypt($data);
  21. /**
  22. * Decrypt data
  23. *
  24. * @param string $data
  25. * @return string
  26. */
  27. public function decrypt($data);
  28. /**
  29. * Set Additional information about payment into Payment model
  30. *
  31. * @param string $key
  32. * @param string|null $value
  33. * @return mixed
  34. */
  35. public function setAdditionalInformation($key, $value = null);
  36. /**
  37. * Check whether there is additional information by specified key
  38. *
  39. * @param mixed|null $key
  40. * @return bool
  41. */
  42. public function hasAdditionalInformation($key = null);
  43. /**
  44. * Unsetter for entire additional_information value or one of its element by key
  45. *
  46. * @param string|null $key
  47. * @return $this
  48. */
  49. public function unsAdditionalInformation($key = null);
  50. /**
  51. * Getter for entire additional_information value or one of its element by key
  52. *
  53. * @param string|null $key
  54. * @return mixed
  55. */
  56. public function getAdditionalInformation($key = null);
  57. /**
  58. * Retrieve payment method model object
  59. *
  60. * @return \Magento\Payment\Model\MethodInterface
  61. * @throws \Magento\Framework\Exception\LocalizedException
  62. */
  63. public function getMethodInstance();
  64. }