SettingsTpay

Created by PhpStorm.

Defined (1)

The class is defined in the following location(s).

/includes/settingsTpay.php  
  1. class SettingsTpay 
  2. const VISIBILITY_VISIBLE = 'visibility: visible'; 
  3.  
  4. const VISIBILITY_HIDDEN = 'visibility: hidden'; 
  5.  
  6. const TITLE = 'title'; 
  7.  
  8. const TYPE = 'type'; 
  9.  
  10. const DEFAULT_SETTING = 'default'; 
  11.  
  12. const DESCRIPTION = 'description'; 
  13.  
  14. const WOOCOMMERCE = 'woocommerce'; 
  15.  
  16. const SELECT = 'select'; 
  17.  
  18. const OPTIONS = 'options'; 
  19.  
  20. const DESC_TIP = 'desc_tip'; 
  21.  
  22. public function getSettings($charge, $list, $tiles) 
  23. $ukryjD = static::VISIBILITY_VISIBLE; 
  24. $ukryjK = static::VISIBILITY_VISIBLE; 
  25. $ukryjS = static::VISIBILITY_VISIBLE; 
  26.  
  27. if ($charge == '0') { 
  28. $ukryjD = static::VISIBILITY_HIDDEN; 
  29. if ($list == '1') { 
  30. $ukryjK = static::VISIBILITY_HIDDEN; 
  31. if ($tiles == '1') { 
  32. $ukryjS = static::VISIBILITY_HIDDEN; 
  33.  
  34. return array( 
  35. 'enabled' => array( 
  36. static::TITLE => __('W**cz/Wy**cz', static::WOOCOMMERCE),  
  37. static::TYPE => 'checkbox',  
  38. 'label' => __('W**cz metod* p*atno*ci przez tpay.com.', static::WOOCOMMERCE),  
  39. static::DEFAULT_SETTING => 'yes',  
  40. static::DESCRIPTION => sprintf(__(' <a href="%s" TARGET="_blank">Zarejestruj konto w systemie 
  41. tpay.com</a>.', static::WOOCOMMERCE), 'https://secure.tpay.com/panel/rejestracja.html'),  
  42. ),  
  43.  
  44. static::TITLE => array( 
  45. static::TITLE => __('Nazwa', static::WOOCOMMERCE),  
  46. static::TYPE => 'text',  
  47. static::DEFAULT_SETTING => __('tpay.com', static::WOOCOMMERCE),  
  48. static::DESC_TIP => true,  
  49. ),  
  50. static::DESCRIPTION => array( 
  51. static::TITLE => __('Opis', static::WOOCOMMERCE),  
  52. static::TYPE => 'textarea',  
  53. static::DESCRIPTION => __('Ustawia opis bramki, ktry widzi u*ytkownik przy tworzeniu zamwienia.' 
  54. , static::WOOCOMMERCE),  
  55. static::DEFAULT_SETTING => __('System p*atno*ci tpay.com to bezpieczny i szybki sposb p*atno*ci,  
  56. ktry zosta* wybrany przez Odbiorc* p*atno*ci w celu przyj*cia od Ciebie zap*aty.' 
  57. , static::WOOCOMMERCE) 
  58. ),  
  59. 'opis' => array( 
  60. static::TITLE => __('Tytu* transakcji', static::WOOCOMMERCE),  
  61. static::TYPE => 'text',  
  62. static::DESCRIPTION => __('Ustawia opis transakcji, do ktrego zostanie autoamtycznie 
  63. dodane "Zamwienie nr (ID)".' 
  64. , static::WOOCOMMERCE),  
  65. static::DEFAULT_SETTING => __('' 
  66. , static::WOOCOMMERCE) 
  67. ),  
  68. 'seller_id' => array( 
  69. static::TITLE => __('ID sprzedawcy', static::WOOCOMMERCE),  
  70. static::TYPE => 'text',  
  71. static::DESCRIPTION => __('Twoje ID sprzedawcy w systemie tpay.com. 
  72. Liczba co najmniej czterocyfrowa (mo*e by* pi*ciocyfowa), np. 12345', static::WOOCOMMERCE),  
  73. static::DEFAULT_SETTING => __('0', static::WOOCOMMERCE),  
  74. static::DESC_TIP => true,  
  75. ),  
  76. 'security_code' => array( 
  77. static::TITLE => __('Kod bezpiecze*stwa', static::WOOCOMMERCE),  
  78. static::TYPE => 'text',  
  79. static::DESCRIPTION => __('Kod bezpiecze*stwa Twojego konta na tpay.com.', static::WOOCOMMERCE),  
  80. static::DEFAULT_SETTING => __('0', static::WOOCOMMERCE),  
  81. static::DESC_TIP => true,  
  82. ),  
  83. 'blik_on' => array( 
  84. static::TITLE => __('W**cz p*atno*ci blikiem na stronie sklepu <br/> (transakcje od 1z*) 
  85. <br/> <a href="https://secure.transferuj.pl/integration/instruction/64">Instrukcja</a>', static::WOOCOMMERCE),  
  86. static::TYPE => static::SELECT,  
  87. static::DEFAULT_SETTING => '0',  
  88. static::OPTIONS => array( 
  89. '0' => __('NIE', static::WOOCOMMERCE),  
  90. '1' => __('TAK', static::WOOCOMMERCE),  
  91. ),  
  92. ),  
  93. 'api_key' => array( 
  94. static::TITLE => __('Klucz API', static::WOOCOMMERCE),  
  95. static::TYPE => 'text',  
  96. static::DESCRIPTION => __('Klucz API wygenerowany w panelu odbiorcy p*atno*ci tpay.com.' 
  97. , static::WOOCOMMERCE),  
  98. static::DEFAULT_SETTING => __('0', static::WOOCOMMERCE),  
  99. static::DESC_TIP => true,  
  100. ),  
  101. 'api_pass' => array( 
  102. static::TITLE => __('Has*o API', static::WOOCOMMERCE),  
  103. static::TYPE => 'text',  
  104. static::DESCRIPTION => __('Has*o do klucza API', static::WOOCOMMERCE),  
  105. static::DEFAULT_SETTING => __('0', static::WOOCOMMERCE),  
  106. static::DESC_TIP => true,  
  107. ),  
  108. 'status' => array( 
  109. static::TITLE => __('Status zamwienia po op*aceniu w tpay.com', static::WOOCOMMERCE),  
  110. static::TYPE => static::SELECT,  
  111. static::DEFAULT_SETTING => '0',  
  112. static::OPTIONS => array( 
  113. '0' => __('W trakcie realizacji', static::WOOCOMMERCE),  
  114. '1' => __('Zrealizowane', static::WOOCOMMERCE),  
  115. ),  
  116. ),  
  117. 'doplata' => array( 
  118. static::TITLE => __('Dop*ata doliczana za korzystanie z Transferuj', static::WOOCOMMERCE),  
  119. static::TYPE => static::SELECT,  
  120. static::DEFAULT_SETTING => '0',  
  121. static::OPTIONS => array( 
  122. '0' => __('NIE', static::WOOCOMMERCE),  
  123. '1' => __('PLN', static::WOOCOMMERCE),  
  124. '2' => __('%', static::WOOCOMMERCE),  
  125. ),  
  126. ),  
  127. 'kwota_doplaty' => array( 
  128. static::TITLE => __('Kwota dop*aty', static::WOOCOMMERCE),  
  129. static::TYPE => "text",  
  130. 'css' => $ukryjD,  
  131. static::DESCRIPTION => __('Kwota jaka zostanie doliczona do zamwienia. 
  132. Jako separator liczb nale*y wykorzysta* kropk*', static::WOOCOMMERCE),  
  133. static::DEFAULT_SETTING => __('0', static::WOOCOMMERCE),  
  134. static::DESC_TIP => true,  
  135. ),  
  136. 'bank_list' => array( 
  137. static::TITLE => __('W**cz wybr banku na stronie sklepu', static::WOOCOMMERCE),  
  138. static::TYPE => static::SELECT,  
  139. static::DEFAULT_SETTING => '0',  
  140. static::OPTIONS => array( 
  141. '0' => __('TAK', static::WOOCOMMERCE),  
  142. '1' => __('NIE', static::WOOCOMMERCE),  
  143. ),  
  144. ),  
  145. 'bank_view' => array( 
  146. static::TITLE => __('Widok listy kana*w', static::WOOCOMMERCE),  
  147. static::TYPE => static::SELECT,  
  148. static::DEFAULT_SETTING => '0',  
  149. 'css' => $ukryjK,  
  150. static::OPTIONS => array( 
  151. '0' => __('Kafelki', static::WOOCOMMERCE),  
  152. '1' => __('Lista', static::WOOCOMMERCE),  
  153. ),  
  154. ),  
  155. 'documentation' => array( 
  156. static::TITLE => __('Dokumentacja techniczna', static::WOOCOMMERCE),  
  157. static::TYPE => static::TITLE,  
  158. static::DESCRIPTION => sprintf(__(' <a href="%s" TARGET="_blank"> 
  159. Link do dokumentacji Technicznej systemu tpay.com</a>.', static::WOOCOMMERCE), 'https://tpay.com/dokumentacje.html'),  
  160. ),  
  161. );