rtml 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (397) hide show
  1. data/History.txt +4 -0
  2. data/Manifest.txt +396 -0
  3. data/PostInstall.txt +2 -0
  4. data/README.rdoc +42 -0
  5. data/Rakefile +33 -0
  6. data/app_generators/rtml/USAGE +5 -0
  7. data/app_generators/rtml/rtml_generator.rb +78 -0
  8. data/app_generators/rtml/templates/rails_template.rb +36 -0
  9. data/app_generators/rtml/templates/rtml/MIT-LICENSE +20 -0
  10. data/app_generators/rtml/templates/rtml/README +109 -0
  11. data/app_generators/rtml/templates/rtml/Rakefile +38 -0
  12. data/app_generators/rtml/templates/rtml/app/controllers/beryl_controller.rb +70 -0
  13. data/app_generators/rtml/templates/rtml/app/controllers/rtml/magcard_demo_controller.rb +9 -0
  14. data/app_generators/rtml/templates/rtml/app/controllers/rtml/oe/btmlpa_controller.rb +158 -0
  15. data/app_generators/rtml/templates/rtml/app/controllers/rtml/rtml_app_controller.rb +252 -0
  16. data/app_generators/rtml/templates/rtml/app/controllers/rtml/tml_app_controller.rb +418 -0
  17. data/app_generators/rtml/templates/rtml/app/helpers/beryl_helper.rb +72 -0
  18. data/app_generators/rtml/templates/rtml/app/helpers/beryl_tml_helpers/auth_result.rb +56 -0
  19. data/app_generators/rtml/templates/rtml/app/helpers/beryl_tml_helpers/common.rb +19 -0
  20. data/app_generators/rtml/templates/rtml/app/helpers/beryl_tml_helpers/index.rb +82 -0
  21. data/app_generators/rtml/templates/rtml/app/helpers/rtml/magcard_demo_helper.rb +2 -0
  22. data/app_generators/rtml/templates/rtml/app/helpers/rtml/magcard_demo_tml_helpers/authorized.rb +10 -0
  23. data/app_generators/rtml/templates/rtml/app/helpers/rtml/magcard_demo_tml_helpers/common.rb +20 -0
  24. data/app_generators/rtml/templates/rtml/app/helpers/rtml/magcard_demo_tml_helpers/index.rb +33 -0
  25. data/app_generators/rtml/templates/rtml/app/helpers/rtml/oe/btmlpa_helper.rb +2 -0
  26. data/app_generators/rtml/templates/rtml/app/helpers/rtml/oe/btmlpa_tml_helpers/auth_result.rb +23 -0
  27. data/app_generators/rtml/templates/rtml/app/helpers/rtml/oe/btmlpa_tml_helpers/common.rb +23 -0
  28. data/app_generators/rtml/templates/rtml/app/helpers/rtml/oe/btmlpa_tml_helpers/dynamic.rb +11 -0
  29. data/app_generators/rtml/templates/rtml/app/helpers/rtml/oe/btmlpa_tml_helpers/icc.rb +384 -0
  30. data/app_generators/rtml/templates/rtml/app/helpers/rtml/oe/btmlpa_tml_helpers/index.rb +191 -0
  31. data/app_generators/rtml/templates/rtml/app/helpers/rtml/oe/btmlpa_tml_helpers/receipt.rb +152 -0
  32. data/app_generators/rtml/templates/rtml/app/helpers/rtml/rtml_app_helper.rb +74 -0
  33. data/app_generators/rtml/templates/rtml/app/helpers/rtml/rtml_app_tml_helpers/common.rb +9 -0
  34. data/app_generators/rtml/templates/rtml/app/helpers/rtml/tml_app_helper.rb +43 -0
  35. data/app_generators/rtml/templates/rtml/app/models/rtml/card.rb +83 -0
  36. data/app_generators/rtml/templates/rtml/app/models/rtml/card_avs.rb +14 -0
  37. data/app_generators/rtml/templates/rtml/app/models/rtml/card_cvv.rb +14 -0
  38. data/app_generators/rtml/templates/rtml/app/models/rtml/card_parser.rb +21 -0
  39. data/app_generators/rtml/templates/rtml/app/models/rtml/card_pin.rb +18 -0
  40. data/app_generators/rtml/templates/rtml/app/models/rtml/emv_card_data.rb +25 -0
  41. data/app_generators/rtml/templates/rtml/app/models/rtml/mag_card_data.rb +21 -0
  42. data/app_generators/rtml/templates/rtml/app/models/rtml/reference_code.rb +26 -0
  43. data/app_generators/rtml/templates/rtml/app/models/rtml/state.rb +12 -0
  44. data/app_generators/rtml/templates/rtml/app/models/rtml/terminal.rb +8 -0
  45. data/app_generators/rtml/templates/rtml/app/models/rtml/transaction.rb +68 -0
  46. data/app_generators/rtml/templates/rtml/app/views/beryl/auth_result/another_rcpt.rtml.erb +15 -0
  47. data/app_generators/rtml/templates/rtml/app/views/beryl/auth_result/receipt.rtml.erb +108 -0
  48. data/app_generators/rtml/templates/rtml/app/views/beryl/auth_result/receipt_single_column.rtml.erb +106 -0
  49. data/app_generators/rtml/templates/rtml/app/views/beryl/index/about.rtml.erb +8 -0
  50. data/app_generators/rtml/templates/rtml/app/views/beryl/index/admin.rtml.erb +4 -0
  51. data/app_generators/rtml/templates/rtml/app/views/beryl/index/construction.rtml.erb +10 -0
  52. data/app_generators/rtml/templates/rtml/app/views/beryl/index/idle.rtml.erb +13 -0
  53. data/app_generators/rtml/templates/rtml/app/views/beryl/index/main_menu.rtml.erb +12 -0
  54. data/app_generators/rtml/templates/rtml/app/views/beryl/index/menu_credit.rtml.erb +8 -0
  55. data/app_generators/rtml/templates/rtml/app/views/beryl/index/menu_debit.rtml.erb +3 -0
  56. data/app_generators/rtml/templates/rtml/app/views/layouts/rtml/beryl_color.rtml.erb +24 -0
  57. data/app_generators/rtml/templates/rtml/app/views/layouts/rtml/beryl_mono.rtml.erb +8 -0
  58. data/app_generators/rtml/templates/rtml/app/views/layouts/rtml/magcard_demo_color.rtml.erb +24 -0
  59. data/app_generators/rtml/templates/rtml/app/views/layouts/rtml/magcard_demo_mono.rtml.erb +3 -0
  60. data/app_generators/rtml/templates/rtml/app/views/layouts/rtml/oe/btmlpa_i5100.rtml.erb +3 -0
  61. data/app_generators/rtml/templates/rtml/app/views/layouts/rtml/oe/btmlpa_i8550.rtml.erb +17 -0
  62. data/app_generators/rtml/templates/rtml/app/views/layouts/rtml/uml.html.erb +11 -0
  63. data/app_generators/rtml/templates/rtml/app/views/rtml/magcard_demo/authorized.html.erb +15 -0
  64. data/app_generators/rtml/templates/rtml/app/views/rtml/magcard_demo/authorized/main.rtml.erb +5 -0
  65. data/app_generators/rtml/templates/rtml/app/views/rtml/magcard_demo/index.html.erb +15 -0
  66. data/app_generators/rtml/templates/rtml/app/views/rtml/magcard_demo/index/_error.rtml.erb +2 -0
  67. data/app_generators/rtml/templates/rtml/app/views/rtml/magcard_demo/index/enter_amount.rtml.erb +5 -0
  68. data/app_generators/rtml/templates/rtml/app/views/rtml/magcard_demo/index/main.rtml.erb +4 -0
  69. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/dynamic/response.rtml.erb +2 -0
  70. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/icc.rtml.erb +760 -0
  71. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/_enter_amount.rtml.erb +4 -0
  72. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/_menu_about.rtml.erb +8 -0
  73. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/_menu_duplicate.rtml.erb +9 -0
  74. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/_menu_examples.rtml.erb +9 -0
  75. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/_menu_logo.rtml.erb +11 -0
  76. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/_menu_other.rtml.erb +20 -0
  77. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/_menu_refund.rtml.erb +8 -0
  78. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/_menu_reversal.rtml.erb +9 -0
  79. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/_menu_sale.rtml.erb +8 -0
  80. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/_menu_sale_cashback.rtml.erb +8 -0
  81. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/about.rtml.erb +1 -0
  82. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/assert.rtml.erb +2 -0
  83. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/card_nmb.rtml.erb +19 -0
  84. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/compl_txn.rtml.erb +1 -0
  85. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/confirm_rev.rtml.erb +3 -0
  86. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/duplicate_na.rtml.erb +1 -0
  87. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/error_scr.rtml.erb +4 -0
  88. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/main_menu.rtml.bak +31 -0
  89. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/main_menu.rtml.erb +40 -0
  90. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/print_pf.rtml.erb +1 -0
  91. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/rd_sale_disp.rtml.erb +1 -0
  92. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/read_refund.rtml.erb +1 -0
  93. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/read_scb.rtml.erb +10 -0
  94. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/reject_trans.rtml.erb +1 -0
  95. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/remove_card.rtml.erb +1 -0
  96. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/rev_bad.rtml.erb +1 -0
  97. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/scb_check_f.rtml.erb +2 -0
  98. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/sign_check.rtml.erb +3 -0
  99. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/subm_err.rtml.erb +2 -0
  100. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/to_man_entry.rtml.erb +2 -0
  101. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/trans_abrt.rtml.erb +1 -0
  102. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/void_trans.rtml.erb +1 -0
  103. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/receipt/_receipt.rtml.erb +29 -0
  104. data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/receipt/error_paper.rtml.erb +3 -0
  105. data/app_generators/rtml/templates/rtml/app/views/rtml/rtml_app/_default_development.html.erb +167 -0
  106. data/app_generators/rtml/templates/rtml/app/views/rtml/rtml_app/_default_header.html.erb +12 -0
  107. data/app_generators/rtml/templates/rtml/app/views/rtml/rtml_app/_default_production.html.erb +8 -0
  108. data/app_generators/rtml/templates/rtml/app/views/rtml/rtml_app/charts.html.erb +14 -0
  109. data/app_generators/rtml/templates/rtml/app/views/rtml/tml_app/do_tml_redirect.rtml.erb +7 -0
  110. data/app_generators/rtml/templates/rtml/app/views/rtml/tml_app/get_terminal_info.rtml.erb +26 -0
  111. data/app_generators/rtml/templates/rtml/app/views/rtml/tml_app/rescue_action_in_public.rtml.erb +9 -0
  112. data/app_generators/rtml/templates/rtml/app/views/rtml/tml_app/rescue_action_locally.rtml.erb +42 -0
  113. data/app_generators/rtml/templates/rtml/components/rtml/features/common.rb +303 -0
  114. data/app_generators/rtml/templates/rtml/components/rtml/features/force.rb +46 -0
  115. data/app_generators/rtml/templates/rtml/components/rtml/features/return.rb +22 -0
  116. data/app_generators/rtml/templates/rtml/components/rtml/features/sale.rb +49 -0
  117. data/app_generators/rtml/templates/rtml/components/rtml/features/views/_confirmation.rtml.erb +10 -0
  118. data/app_generators/rtml/templates/rtml/components/rtml/features/views/_receipt_agreement.rtml.erb +3 -0
  119. data/app_generators/rtml/templates/rtml/components/rtml/features/views/_receipt_footer.rtml.erb +2 -0
  120. data/app_generators/rtml/templates/rtml/components/rtml/features/views/_receipt_header.rtml.erb +4 -0
  121. data/app_generators/rtml/templates/rtml/components/rtml/features/views/ask_cashback.rtml.erb +11 -0
  122. data/app_generators/rtml/templates/rtml/components/rtml/features/views/card_imprint.rtml.erb +7 -0
  123. data/app_generators/rtml/templates/rtml/components/rtml/features/views/check_cb.rtml.erb +11 -0
  124. data/app_generators/rtml/templates/rtml/components/rtml/features/views/conf_debit.rtml.erb +5 -0
  125. data/app_generators/rtml/templates/rtml/components/rtml/features/views/confirm_sale.rtml.erb +4 -0
  126. data/app_generators/rtml/templates/rtml/components/rtml/features/views/confrm_force.rtml.erb +4 -0
  127. data/app_generators/rtml/templates/rtml/components/rtml/features/views/cvv_skipped.rtml.erb +10 -0
  128. data/app_generators/rtml/templates/rtml/components/rtml/features/views/disp_avs.rtml.erb +8 -0
  129. data/app_generators/rtml/templates/rtml/components/rtml/features/views/do_avs_zip.rtml.erb +8 -0
  130. data/app_generators/rtml/templates/rtml/components/rtml/features/views/enter_amount.rtml.erb +12 -0
  131. data/app_generators/rtml/templates/rtml/components/rtml/features/views/enter_card.rtml.erb +8 -0
  132. data/app_generators/rtml/templates/rtml/components/rtml/features/views/enter_cashbk.rtml.erb +10 -0
  133. data/app_generators/rtml/templates/rtml/components/rtml/features/views/enter_cvv2.rtml.erb +8 -0
  134. data/app_generators/rtml/templates/rtml/components/rtml/features/views/enter_expiry.rtml.erb +9 -0
  135. data/app_generators/rtml/templates/rtml/components/rtml/features/views/fraud_check1.rtml.erb +6 -0
  136. data/app_generators/rtml/templates/rtml/components/rtml/features/views/fraud_check2.rtml.erb +8 -0
  137. data/app_generators/rtml/templates/rtml/components/rtml/features/views/frc_aprvl.rtml.erb +8 -0
  138. data/app_generators/rtml/templates/rtml/components/rtml/features/views/frc_avs_zip.rtml.erb +8 -0
  139. data/app_generators/rtml/templates/rtml/components/rtml/features/views/frc_bad_aprv.rtml.erb +5 -0
  140. data/app_generators/rtml/templates/rtml/components/rtml/features/views/frd_chk_fail.rtml.erb +5 -0
  141. data/app_generators/rtml/templates/rtml/components/rtml/features/views/invalid_exp.rtml.erb +1 -0
  142. data/app_generators/rtml/templates/rtml/components/rtml/features/views/no_entr_crd.rtml.erb +1 -0
  143. data/app_generators/rtml/templates/rtml/components/rtml/features/views/remove_card.rtml.erb +1 -0
  144. data/app_generators/rtml/templates/rtml/components/rtml/features/views/swipe_card.rtml.erb +7 -0
  145. data/app_generators/rtml/templates/rtml/components/rtml/features/views/trans_abort.rtml.erb +1 -0
  146. data/app_generators/rtml/templates/rtml/components/rtml/features/views/trans_reject.rtml.erb +1 -0
  147. data/app_generators/rtml/templates/rtml/components/rtml/features/views/void_ref.rtml.erb +10 -0
  148. data/app_generators/rtml/templates/rtml/components/rtml/features/void.rb +30 -0
  149. data/app_generators/rtml/templates/rtml/components/rtml/widgets/card_parser_widget.rb +90 -0
  150. data/app_generators/rtml/templates/rtml/components/rtml/widgets/display_widget.rb +66 -0
  151. data/app_generators/rtml/templates/rtml/components/rtml/widgets/element_builder_widget.rb +123 -0
  152. data/app_generators/rtml/templates/rtml/components/rtml/widgets/emv_support_widget.rb +365 -0
  153. data/app_generators/rtml/templates/rtml/components/rtml/widgets/form_submit_widget.rb +65 -0
  154. data/app_generators/rtml/templates/rtml/components/rtml/widgets/get_transaction_variables_widget.rb +33 -0
  155. data/app_generators/rtml/templates/rtml/components/rtml/widgets/get_variable_widget.rb +39 -0
  156. data/app_generators/rtml/templates/rtml/components/rtml/widgets/receipt_widget.rb +66 -0
  157. data/app_generators/rtml/templates/rtml/components/rtml/widgets/screen_builder_widget.rb +49 -0
  158. data/app_generators/rtml/templates/rtml/db/migrate/20090825132217_create_rtml_states.rb +15 -0
  159. data/app_generators/rtml/templates/rtml/db/migrate/20090825132401_create_rtml_terminals.rb +16 -0
  160. data/app_generators/rtml/templates/rtml/db/migrate/20090825132530_create_rtml_transactions.rb +24 -0
  161. data/app_generators/rtml/templates/rtml/db/migrate/20090825134118_create_rtml_cards.rb +23 -0
  162. data/app_generators/rtml/templates/rtml/db/migrate/20090825134622_create_rtml_emv_card_data.rb +20 -0
  163. data/app_generators/rtml/templates/rtml/db/migrate/20090825134629_create_rtml_mag_card_data.rb +17 -0
  164. data/app_generators/rtml/templates/rtml/db/migrate/20090825135838_create_rtml_card_parsers.rb +19 -0
  165. data/app_generators/rtml/templates/rtml/db/migrate/20090826103509_create_reference_codes.rb +14 -0
  166. data/app_generators/rtml/templates/rtml/db/migrate/20090915030044_add_batch_to_rtml_transactions.rb +10 -0
  167. data/app_generators/rtml/templates/rtml/db/migrate/20090915031155_add_additional_data_to_rtml_transactions.rb +10 -0
  168. data/app_generators/rtml/templates/rtml/db/migrate/20090915031156_add_hidden_data_to_rtml_transactions.rb +10 -0
  169. data/app_generators/rtml/templates/rtml/db/migrate/20091016133313_create_rtml_card_avs.rb +16 -0
  170. data/app_generators/rtml/templates/rtml/db/migrate/20091016135800_create_rtml_card_cvvs.rb +16 -0
  171. data/app_generators/rtml/templates/rtml/db/migrate/20091016135810_create_rtml_card_pins.rb +16 -0
  172. data/app_generators/rtml/templates/rtml/db/migrate/20091016135820_reverse_card_transaction_relationship.rb +11 -0
  173. data/app_generators/rtml/templates/rtml/db/migrate/20100127115105_convert_rtml_migrations_to_rails_migrations.rb +31 -0
  174. data/app_generators/rtml/templates/rtml/generators/rtml_controller/USAGE +25 -0
  175. data/app_generators/rtml/templates/rtml/generators/rtml_controller/rtml_controller_generator.rb +49 -0
  176. data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/common_tml_helper.rb +20 -0
  177. data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/controller.rb +3 -0
  178. data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/css_color.css +37 -0
  179. data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/css_mono.css +12 -0
  180. data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/functional_test.rb +11 -0
  181. data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/helper.rb +2 -0
  182. data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/layout_color.rtml.erb +24 -0
  183. data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/layout_mono.rtml.erb +3 -0
  184. data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/tml_helper.rb +16 -0
  185. data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/view.html.erb +15 -0
  186. data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/view.rtml.erb +2 -0
  187. data/app_generators/rtml/templates/rtml/generators/rtml_document/USAGE +8 -0
  188. data/app_generators/rtml/templates/rtml/generators/rtml_document/rtml_document_generator.rb +45 -0
  189. data/app_generators/rtml/templates/rtml/generators/rtml_document/templates/controller.rb +7 -0
  190. data/app_generators/rtml/templates/rtml/generators/rtml_document/templates/functional_test.rb +10 -0
  191. data/app_generators/rtml/templates/rtml/generators/rtml_document/templates/helper.rb +2 -0
  192. data/app_generators/rtml/templates/rtml/generators/rtml_document/templates/view.rtml.erb +11 -0
  193. data/app_generators/rtml/templates/rtml/generators/rtml_widget/USAGE +8 -0
  194. data/app_generators/rtml/templates/rtml/generators/rtml_widget/rtml_widget_generator.rb +66 -0
  195. data/app_generators/rtml/templates/rtml/generators/rtml_widget/templates/basic_widget.rb +57 -0
  196. data/app_generators/rtml/templates/rtml/generators/rtml_widget/templates/basic_widget_no_help.rb +27 -0
  197. data/app_generators/rtml/templates/rtml/init.rb +40 -0
  198. data/app_generators/rtml/templates/rtml/install.rb +18 -0
  199. data/app_generators/rtml/templates/rtml/lib/environment.rb +61 -0
  200. data/app_generators/rtml/templates/rtml/lib/extensions/action_controller/request.rb +9 -0
  201. data/app_generators/rtml/templates/rtml/lib/extensions/action_controller/routing/route_set.rb +34 -0
  202. data/app_generators/rtml/templates/rtml/lib/extensions/action_view/base.rb +74 -0
  203. data/app_generators/rtml/templates/rtml/lib/extensions/action_view/partial_template.rb +24 -0
  204. data/app_generators/rtml/templates/rtml/lib/extensions/active_record.rb +13 -0
  205. data/app_generators/rtml/templates/rtml/lib/extensions/active_support/dependencies.rb +25 -0
  206. data/app_generators/rtml/templates/rtml/lib/extensions/array.rb +15 -0
  207. data/app_generators/rtml/templates/rtml/lib/extensions/attr_boolean.rb +10 -0
  208. data/app_generators/rtml/templates/rtml/lib/extensions/hash.rb +28 -0
  209. data/app_generators/rtml/templates/rtml/lib/extensions/nil_class.rb +20 -0
  210. data/app_generators/rtml/templates/rtml/lib/extensions/rake.rb +19 -0
  211. data/app_generators/rtml/templates/rtml/lib/extensions/regexp.rb +16 -0
  212. data/app_generators/rtml/templates/rtml/lib/extensions/string.rb +37 -0
  213. data/app_generators/rtml/templates/rtml/lib/other_plugins.rb +23 -0
  214. data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/MIT-LICENSE +20 -0
  215. data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/README +36 -0
  216. data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/Rakefile +44 -0
  217. data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/init.rb +25 -0
  218. data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/lib/action_controller/filters/before_render_filter.rb +30 -0
  219. data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/lib/before_render.rb +43 -0
  220. data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/lib/before_render_instance.rb +45 -0
  221. data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/lib/filter_chain_has_many_types_of_filters.rb +87 -0
  222. data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/lib/filter_has_before_render.rb +26 -0
  223. data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/tasks/before_render_tasks.rake +25 -0
  224. data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/test/before_render_test.rb +29 -0
  225. data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/test/test_helper.rb +24 -0
  226. data/app_generators/rtml/templates/rtml/lib/rtml.rb +77 -0
  227. data/app_generators/rtml/templates/rtml/lib/rtml/beryl/constants.rb +12 -0
  228. data/app_generators/rtml/templates/rtml/lib/rtml/beryl/version.rb +11 -0
  229. data/app_generators/rtml/templates/rtml/lib/rtml/common/renderable.rb +13 -0
  230. data/app_generators/rtml/templates/rtml/lib/rtml/core/include.rb +30 -0
  231. data/app_generators/rtml/templates/rtml/lib/rtml/core/layout.rb +59 -0
  232. data/app_generators/rtml/templates/rtml/lib/rtml/core/next.rb +188 -0
  233. data/app_generators/rtml/templates/rtml/lib/rtml/core/screen.rb +91 -0
  234. data/app_generators/rtml/templates/rtml/lib/rtml/core/screen/iterators.rb +63 -0
  235. data/app_generators/rtml/templates/rtml/lib/rtml/core/screen/next_screen_methods.rb +70 -0
  236. data/app_generators/rtml/templates/rtml/lib/rtml/core/screen/variable_methods.rb +73 -0
  237. data/app_generators/rtml/templates/rtml/lib/rtml/core/support/importer.rb +55 -0
  238. data/app_generators/rtml/templates/rtml/lib/rtml/core/tml_document.rb +318 -0
  239. data/app_generators/rtml/templates/rtml/lib/rtml/core/tml_document/screen_methods.rb +79 -0
  240. data/app_generators/rtml/templates/rtml/lib/rtml/core/tml_document/variable_methods.rb +83 -0
  241. data/app_generators/rtml/templates/rtml/lib/rtml/core/variable.rb +123 -0
  242. data/app_generators/rtml/templates/rtml/lib/rtml/debug/browser_emulator.rb +59 -0
  243. data/app_generators/rtml/templates/rtml/lib/rtml/debug/rtml_controller_test_case.rb +7 -0
  244. data/app_generators/rtml/templates/rtml/lib/rtml/debug/rtml_core_unit_test.rb +11 -0
  245. data/app_generators/rtml/templates/rtml/lib/rtml/debug/unit_test.rb +3 -0
  246. data/app_generators/rtml/templates/rtml/lib/rtml/delegation.rb +8 -0
  247. data/app_generators/rtml/templates/rtml/lib/rtml/doc.rb +12 -0
  248. data/app_generators/rtml/templates/rtml/lib/rtml/element.rb +75 -0
  249. data/app_generators/rtml/templates/rtml/lib/rtml/errors/widget_accessor_failure.rb +9 -0
  250. data/app_generators/rtml/templates/rtml/lib/rtml/events/event_handler.rb +79 -0
  251. data/app_generators/rtml/templates/rtml/lib/rtml/events/event_processor.rb +106 -0
  252. data/app_generators/rtml/templates/rtml/lib/rtml/events/processors.rb +10 -0
  253. data/app_generators/rtml/templates/rtml/lib/rtml/events/processors/defaults_processor.rb +18 -0
  254. data/app_generators/rtml/templates/rtml/lib/rtml/events/processors/key_processor.rb +21 -0
  255. data/app_generators/rtml/templates/rtml/lib/rtml/feature.rb +32 -0
  256. data/app_generators/rtml/templates/rtml/lib/rtml/feature_config.rb +195 -0
  257. data/app_generators/rtml/templates/rtml/lib/rtml/features.rb +18 -0
  258. data/app_generators/rtml/templates/rtml/lib/rtml/features/array_of_feature_instances.rb +17 -0
  259. data/app_generators/rtml/templates/rtml/lib/rtml/features/controller_class_methods.rb +30 -0
  260. data/app_generators/rtml/templates/rtml/lib/rtml/features/controller_instance_methods.rb +35 -0
  261. data/app_generators/rtml/templates/rtml/lib/rtml/helpers.rb +21 -0
  262. data/app_generators/rtml/templates/rtml/lib/rtml/helpers/controller_helpers.rb +59 -0
  263. data/app_generators/rtml/templates/rtml/lib/rtml/helpers/controller_helpers/menu_helpers.rb +193 -0
  264. data/app_generators/rtml/templates/rtml/lib/rtml/helpers/core_helpers/action_view_wrapper.rb +23 -0
  265. data/app_generators/rtml/templates/rtml/lib/rtml/helpers/core_helpers/event_helpers.rb +28 -0
  266. data/app_generators/rtml/templates/rtml/lib/rtml/helpers/core_helpers/layout_helpers.rb +47 -0
  267. data/app_generators/rtml/templates/rtml/lib/rtml/helpers/core_helpers/widget_support.rb +181 -0
  268. data/app_generators/rtml/templates/rtml/lib/rtml/helpers/core_helpers/widget_support/class_methods.rb +28 -0
  269. data/app_generators/rtml/templates/rtml/lib/rtml/helpers/core_helpers/yield_helpers.rb +33 -0
  270. data/app_generators/rtml/templates/rtml/lib/rtml/helpers/proxy_helpers/feature_helpers.rb +17 -0
  271. data/app_generators/rtml/templates/rtml/lib/rtml/helpers/render_helper.rb +71 -0
  272. data/app_generators/rtml/templates/rtml/lib/rtml/helpers/terminal_helpers.rb +21 -0
  273. data/app_generators/rtml/templates/rtml/lib/rtml/helpers/test_helpers.rb +6 -0
  274. data/app_generators/rtml/templates/rtml/lib/rtml/helpers/test_helpers/tml_validation_assertions.rb +10 -0
  275. data/app_generators/rtml/templates/rtml/lib/rtml/helpers/test_helpers/variable_assertions.rb +27 -0
  276. data/app_generators/rtml/templates/rtml/lib/rtml/helpers/view_helpers/form_helpers.rb +70 -0
  277. data/app_generators/rtml/templates/rtml/lib/rtml/helpers/view_helpers/rtml_form_builder.rb +174 -0
  278. data/app_generators/rtml/templates/rtml/lib/rtml/oe/btmlpa_constants.rb +48 -0
  279. data/app_generators/rtml/templates/rtml/lib/rtml/proxying/method_missing_methods.rb +14 -0
  280. data/app_generators/rtml/templates/rtml/lib/rtml/proxying/rtml_interface.rb +33 -0
  281. data/app_generators/rtml/templates/rtml/lib/rtml/proxying/sandbox.rb +18 -0
  282. data/app_generators/rtml/templates/rtml/lib/rtml/text_utils.rb +51 -0
  283. data/app_generators/rtml/templates/rtml/lib/rtml/tml_param_parser.rb +95 -0
  284. data/app_generators/rtml/templates/rtml/lib/rtml/validation/dom_rule_parser.rb +61 -0
  285. data/app_generators/rtml/templates/rtml/lib/rtml/validation/dom_tag.rb +52 -0
  286. data/app_generators/rtml/templates/rtml/lib/rtml/validation/predefined_variable_rule_parser.rb +97 -0
  287. data/app_generators/rtml/templates/rtml/lib/rtml/validation/tml_validator.rb +16 -0
  288. data/app_generators/rtml/templates/rtml/lib/rtml/version.rb +11 -0
  289. data/app_generators/rtml/templates/rtml/lib/rtml/widgets/property.rb +11 -0
  290. data/app_generators/rtml/templates/rtml/lib/rtml/widgets/property_accessors.rb +59 -0
  291. data/app_generators/rtml/templates/rtml/lib/rtml/widgets/widget.rb +251 -0
  292. data/app_generators/rtml/templates/rtml/lib/rtml/widgets/widget_class_methods.rb +213 -0
  293. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/dot.gif +0 -0
  294. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_can.gif +0 -0
  295. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_cand.gif +0 -0
  296. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_en.gif +0 -0
  297. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_end.gif +0 -0
  298. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_i.gif +0 -0
  299. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_icd.gif +0 -0
  300. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_icl.gif +0 -0
  301. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_icr.gif +0 -0
  302. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_ics.gif +0 -0
  303. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_icsw.gif +0 -0
  304. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_icv.gif +0 -0
  305. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_int.gif +0 -0
  306. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_int2.gif +0 -0
  307. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_men.gif +0 -0
  308. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_mend.gif +0 -0
  309. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_next.gif +0 -0
  310. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_no.gif +0 -0
  311. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_nod.gif +0 -0
  312. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_ok.gif +0 -0
  313. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_okd.gif +0 -0
  314. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_pic1.gif +0 -0
  315. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_pic2.gif +0 -0
  316. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_pic3.gif +0 -0
  317. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_pic4.gif +0 -0
  318. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_top.gif +0 -0
  319. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_txn.gif +0 -0
  320. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_yes.gif +0 -0
  321. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_yesd.gif +0 -0
  322. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/btmlpa.gif +0 -0
  323. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/can_dn.gif +0 -0
  324. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/can_up.gif +0 -0
  325. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/conf.gif +0 -0
  326. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/iccemv.gif +0 -0
  327. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/images.lib +0 -0
  328. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/magcard.gif +0 -0
  329. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/no_dn.gif +0 -0
  330. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/no_up.gif +0 -0
  331. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/ok_dn.gif +0 -0
  332. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/ok_up.gif +0 -0
  333. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/top.gif +0 -0
  334. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/yes_dn.gif +0 -0
  335. data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/yes_up.gif +0 -0
  336. data/app_generators/rtml/templates/rtml/public/stylesheets/rtml/beryl_color.css +37 -0
  337. data/app_generators/rtml/templates/rtml/public/stylesheets/rtml/beryl_mono.css +17 -0
  338. data/app_generators/rtml/templates/rtml/public/stylesheets/rtml/charts.css +0 -0
  339. data/app_generators/rtml/templates/rtml/public/stylesheets/rtml/oe/btmlpa/i5100.css +12 -0
  340. data/app_generators/rtml/templates/rtml/public/stylesheets/rtml/oe/btmlpa/i8550.css +37 -0
  341. data/app_generators/rtml/templates/rtml/public/stylesheets/rtml/oe/btmlpa/receipt.css +4 -0
  342. data/app_generators/rtml/templates/rtml/public/stylesheets/rtml/oe/examples/i5100.css +12 -0
  343. data/app_generators/rtml/templates/rtml/public/stylesheets/rtml/oe/examples/i8550.css +37 -0
  344. data/app_generators/rtml/templates/rtml/reporting/110409 +227 -0
  345. data/app_generators/rtml/templates/rtml/reporting/linecount.rb +42 -0
  346. data/app_generators/rtml/templates/rtml/rules/predefined_tml_variables.rb +63 -0
  347. data/app_generators/rtml/templates/rtml/rules/tml_document_structure.rb +84 -0
  348. data/app_generators/rtml/templates/rtml/rules/varns/audio.rb +30 -0
  349. data/app_generators/rtml/templates/rtml/rules/varns/card.rb +17 -0
  350. data/app_generators/rtml/templates/rtml/rules/varns/card/emv.rb +31 -0
  351. data/app_generators/rtml/templates/rtml/rules/varns/card/mag.rb +8 -0
  352. data/app_generators/rtml/templates/rtml/rules/varns/card/parser.rb +7 -0
  353. data/app_generators/rtml/templates/rtml/rules/varns/card/pin.rb +6 -0
  354. data/app_generators/rtml/templates/rtml/rules/varns/cfgm.rb +15 -0
  355. data/app_generators/rtml/templates/rtml/rules/varns/com.rb +9 -0
  356. data/app_generators/rtml/templates/rtml/rules/varns/err.rb +14 -0
  357. data/app_generators/rtml/templates/rtml/rules/varns/gma/event.rb +13 -0
  358. data/app_generators/rtml/templates/rtml/rules/varns/gprs.rb +8 -0
  359. data/app_generators/rtml/templates/rtml/rules/varns/imager.rb +8 -0
  360. data/app_generators/rtml/templates/rtml/rules/varns/ip.rb +15 -0
  361. data/app_generators/rtml/templates/rtml/rules/varns/oebr.rb +42 -0
  362. data/app_generators/rtml/templates/rtml/rules/varns/oebr/3rdparty.rb +7 -0
  363. data/app_generators/rtml/templates/rtml/rules/varns/oebr/backlight.rb +4 -0
  364. data/app_generators/rtml/templates/rtml/rules/varns/oebr/cache.rb +1 -0
  365. data/app_generators/rtml/templates/rtml/rules/varns/oebr/connect.rb +5 -0
  366. data/app_generators/rtml/templates/rtml/rules/varns/oebr/connection.rb +5 -0
  367. data/app_generators/rtml/templates/rtml/rules/varns/oebr/offline.rb +5 -0
  368. data/app_generators/rtml/templates/rtml/rules/varns/oegw.rb +12 -0
  369. data/app_generators/rtml/templates/rtml/rules/varns/payment.rb +21 -0
  370. data/app_generators/rtml/templates/rtml/rules/varns/ppp.rb +11 -0
  371. data/app_generators/rtml/templates/rtml/rules/varns/terminal.rb +29 -0
  372. data/app_generators/rtml/templates/rtml/tasks/rtml_tasks.rake +78 -0
  373. data/app_generators/rtml/templates/rtml/template.rb +64 -0
  374. data/app_generators/rtml/templates/rtml/test/core/element_test.rb +17 -0
  375. data/app_generators/rtml/templates/rtml/test/core/screen_test.rb +91 -0
  376. data/app_generators/rtml/templates/rtml/test/core/tml_document_test.rb +53 -0
  377. data/app_generators/rtml/templates/rtml/test/functional/beryl_controller_test.rb +13 -0
  378. data/app_generators/rtml/templates/rtml/test/functional/btmlpa_controller_test.rb +13 -0
  379. data/app_generators/rtml/templates/rtml/test/functional/magcard_demo_controller_test.rb +20 -0
  380. data/app_generators/rtml/templates/rtml/test/functional/rtml_app_controller_test.rb +9 -0
  381. data/app_generators/rtml/templates/rtml/test/functional/rtml_routing_test.rb +19 -0
  382. data/app_generators/rtml/templates/rtml/test/functional/tml_controller_params_test.rb +20 -0
  383. data/app_generators/rtml/templates/rtml/test/rtml_test_helper.rb +44 -0
  384. data/app_generators/rtml/templates/rtml/test/validation/predefined_variable_rule_parser_test.rb +11 -0
  385. data/app_generators/rtml/templates/rtml/uninstall.rb +1 -0
  386. data/app_generators/rtml/templates/rtml/update.rb +57 -0
  387. data/bin/rtml +36 -0
  388. data/lib/rtml.rb +4 -0
  389. data/script/console +10 -0
  390. data/script/destroy +14 -0
  391. data/script/generate +14 -0
  392. data/tasks/reglob.rake +28 -0
  393. data/test/test_generator_helper.rb +29 -0
  394. data/test/test_helper.rb +3 -0
  395. data/test/test_rtml.rb +11 -0
  396. data/test/test_rtml_generator.rb +43 -0
  397. metadata +516 -0
@@ -0,0 +1,12 @@
1
+ <style>
2
+ body { font-family: Arial, Helvetica, sans-serif; }
3
+ span.filename { font-weight: bold; font-style: italic; }
4
+ #uml_div { text-align: center; }
5
+ #sidebar { float: right; border:1px inset #ccc; padding:1em; margin-left:1em; margin-bottom:1em; }
6
+ #form_helpers th, td { border:1px inset #ccc; }
7
+ #form_helpers td { vertical-align:bottom; font-family: "Courier New", Courier; }
8
+ #form_helpers td sup { font-weight:bolder; }
9
+ .code { font-family: "Courier New", Courier; white-space:pre;}
10
+ .section { font-size:150%; display:block; }
11
+ </style>
12
+ <%=javascript_include_tag :defaults%>
@@ -0,0 +1,8 @@
1
+ <p>
2
+ <h2 style='display:inline;'>RTML</h2> is active
3
+ and the TML is available at the usual location.
4
+ </p>
5
+ <p>
6
+ If you don't know what any of that meant, then you probably don't belong here. Try
7
+ <%=link_to "here", '/'%> instead.
8
+ </p>
@@ -0,0 +1,14 @@
1
+ <%
2
+ url = []
3
+ @screens.each do |scr|
4
+ scr.next.variants.each do |cond,nextid|
5
+ left = yuml_for_screen(scr)
6
+ cond = yuml_conditions_for(cond)
7
+ right = yuml_for_screen(@screens.find(nextid) || format_for_yuml(nextid))
8
+ url << "[#{left}]-#{cond}>[#{right}]"
9
+ end
10
+ end
11
+ url = "http://yuml.me/diagram/scruffy/class/#{url.join(", ")}"
12
+ %>
13
+ <%=url%>
14
+ <img src='<%=url%>' />
@@ -0,0 +1,7 @@
1
+ <%=tml_document do |doc|
2
+ doc.cache false
3
+
4
+ doc.screen :tmlredir do |scr|
5
+ scr.next_screen h(@redirect_to)
6
+ end
7
+ end%>
@@ -0,0 +1,26 @@
1
+ <%=tml_document do
2
+ cache false
3
+ on :cancel => embedded_app
4
+
5
+ screen :gather_data do
6
+ submit do
7
+ target url_for(params)
8
+ on_error :submit_err
9
+ cache :deny
10
+
11
+ [ :datetime, :datetime_start, :itid, :model, :os, :part_number,
12
+ :serial_number ].each do |var|
13
+ get_variable "terminal.#{var}"
14
+ end
15
+ end
16
+ end
17
+
18
+ screen :submit_err do
19
+ next_screen :gather_data
20
+ display <<-end_tml
21
+ <br/><br/>
22
+ Error initializing session state data. See logs for more details.<br/>
23
+ <getvar name='err.baddata_reason' />
24
+ end_tml
25
+ end
26
+ end%>
@@ -0,0 +1,9 @@
1
+ <%=tml_document do
2
+ #on :cancel => embedded_app
3
+
4
+ screen :error, :next => '/index.tml' do
5
+ display <<-end_tml
6
+ <p>Could not complete transaction. Please try again.</p>
7
+ end_tml
8
+ end
9
+ end%>
@@ -0,0 +1,42 @@
1
+ <%=tml_document do
2
+ on :cancel => embedded_app
3
+ cache false
4
+ default_screen :error
5
+
6
+ screen :error, :next => '/index.tml' do
7
+ clean_params = request.parameters.clone
8
+ clean_params.delete("action")
9
+ clean_params.delete("controller")
10
+
11
+ request_dump = clean_params.empty? ? 'None' : clean_params.inspect.gsub(',', ",\n")
12
+
13
+ concat <<-end_tml
14
+ <display>
15
+ <h1>#{h @exception.class} in
16
+ #{h request.parameters["controller"].capitalize if request.parameters["controller"]}##{
17
+ h request.parameters["action"]}
18
+ </h1>
19
+ <br/>
20
+ <h2>Message: #{h(@exception ? @exception.message : "")}</h2>
21
+ <br/>
22
+ #{link_to "Retry Request", controller.params} |
23
+ #{link_to "Restart Application", "/index.tml"} |
24
+ #{link_to "Configuration", embedded_app}
25
+ <br/><br/>
26
+ <pre>RAILS_ROOT: #{defined?(RAILS_ROOT) ? RAILS_ROOT : "unset"}</pre>
27
+ <br/>
28
+ <div id="traces">
29
+ #{@exception ? @exception.application_backtrace.select { |i| not(i =~ /lib\/ruby\/gems/) }.collect { |i| h(i) }.join("<br/>\n") : ""}
30
+ </div>
31
+ <br/>
32
+
33
+ <h2>Request</h2>
34
+ Parameters: <pre>#{h request_dump}</pre>
35
+ <br/>
36
+
37
+ <h2>Response</h2>
38
+ Headers: <pre>#{h(response ? response.headers.inspect.gsub(',', ",\n") : 'None')}</pre>
39
+ </display>
40
+ end_tml
41
+ end
42
+ end%>
@@ -0,0 +1,303 @@
1
+ class Rtml::Features::Common < ::Rtml::Feature
2
+ entry_point :none
3
+
4
+ def self.configure
5
+ config.option :receipt_header => { :partial => 'receipt_header' }
6
+ config.option :receipt_footer => { :partial => 'receipt_footer' }
7
+ config.option :receipt_agreement => { :partial => 'receipt_agreement' }
8
+ config.option :emv_support => true
9
+ config.option :fraud_check => 3 # 1 = verify card number; 2 = enter last 4 digits; 3 = both
10
+ config.option :card_code_verification => true
11
+ config.option :card_imprint => true
12
+ config.option :allow_keyed_debit => false #allow user to manually enter debit number
13
+ config.option :confirm_amount => true
14
+ config.option :submit_variables => []
15
+ config.option :cashback => true, :min_sale_amount => 1, :max_sale_amount => nil,
16
+ :min_cashback_amount => 0, :max_cashback_amount => nil,
17
+ :sale_limits_cashback => true
18
+ config.option :debit_encryption_type => :dukpt3des
19
+ config.menu = false
20
+ end
21
+
22
+ def init(scr)
23
+ scr.set 'title' => ['tmlvar:transaction_type', '+', ' ']
24
+ scr.set 'card.input_type' => 3, 'card.parser.type' => '',
25
+ 'card.pan' => '', 'card.expiry_date' => '2007/01/01',
26
+ 'card.effective_date' => '', :manual_entry => 0,
27
+ :prompt_for_cashback => 1, :skip_fraud_check => 0, 'card.cvv.value' => '',
28
+ 'card.cvv.reason_skipped' => ''
29
+ scr.card :parser => :mag, :params => :clean do |card|
30
+ card.baddata "<getvar name='err.baddata_reason' />: <getvar name='err.description' />"
31
+ end
32
+ end
33
+
34
+ def to_tml
35
+ document.process_block do |doc|
36
+ doc.strings 'confirm.accept', 'confirm.reject'
37
+ doc.string 'submit_to'
38
+ doc.string 'submit_err' => '#submit_err'
39
+ doc.string 'screens.after_swipe'
40
+ doc.string 'screens.emv.exit_point'
41
+ doc.string :fraud_check, :format => 'n*' if config.fraud_check > 0
42
+ doc.string :transaction_type
43
+ doc.string 'card.cvv.value'
44
+ doc.string 'card.cvv.reason_skipped'
45
+ doc.string :title
46
+ doc.string 'key_card_prompt'
47
+ doc.integer :prompt_for_cashback
48
+ doc.integer :manual_entry
49
+ doc.integer :total_amount
50
+ doc.integer :skip_fraud_check
51
+
52
+ if config.emv_support
53
+ document.supports_emv :entry_point => :emv_start, :exit_point => 'tmlvar:screens.emv.exit_point',
54
+ :on_abort => :trans_abort,:on_reject => :trans_reject
55
+ end
56
+
57
+ doc.screen :enter_amount, :next => :confirm_sale do |scr|
58
+ scr.on :cancel => :trans_abort
59
+ scr.next_screen :check_cb, :if => 'tmlvar:transaction_type contains Debit' if config.cashback
60
+ scr.display
61
+ end
62
+
63
+ doc.screen :confirm_sale, 'tmlvar:confirm.accept' do |scr|
64
+ scr.on :cancel => 'tmlvar:confirm.reject'
65
+ scr.display if config.confirm_amount
66
+ end
67
+
68
+ if config.cashback
69
+ doc.screen :check_cb, :confirm_sale do
70
+ next_screen :ask_cashback, :if => 'tmlvar:prompt_for_cashback == 1'
71
+ end
72
+ doc.screen :ask_cashback, :next => :conf_debit do
73
+ set 'payment.amount_other' => 0
74
+ display
75
+ end
76
+ doc.screen :enter_cashbk, :check_cb_amt do display end
77
+
78
+ doc.screen :check_cb_amt, :conf_debit do |scr|
79
+ if config.sale_limits_cashback
80
+ scr.next_screen :enter_cashbk, :if => "tmlvar:payment.amount_other > tmlvar:payment.amount"
81
+ end
82
+ end
83
+
84
+ doc.screen :conf_debit do
85
+ set :total_amount => 'tmlvar:payment.amount + tmlvar:payment.amount_other'
86
+ display
87
+ end
88
+ end
89
+
90
+ doc.screen :swipe_card do |scr|#, :next => :fraud_check do |scr|
91
+ scr.on :cancel => :trans_abort
92
+ scr.next :risk_mgmt
93
+ scr.set 'fraud_check' => '' if config.fraud_check > 0
94
+ scr.set 'card.input_type' => 1, 'payment.trans_type' => 'debit',
95
+ 'payment.amount' => 0, 'payment.amount_other' => 0,
96
+ 'oebr.submit_mode' => ''
97
+ scr.set 'card.pan' => '' # wipes out the 'NA' assigned by the 'mag clean' parser
98
+ scr.on :menu => :start_enter
99
+ scr.set :manual_entry => 0
100
+ for i in 0..9; scr.on i => "enter_card_#{i}" end
101
+
102
+ scr.build :tform do |tform|
103
+ tform.baddata :max => 3, :next => :start_enter.to_screen_ref do
104
+ table :border => 2, :class => 'warning' do; tr { td { span { getvar :name => 'err.baddata_reason' } } } end
105
+ end
106
+ tform.build :name => :card, :parser => 'mag', :parser_params => 'read_data'
107
+ if config.emv_support
108
+ tform.build :name => :card, :parser => 'icc_emv', :parser_params => 'init_app'
109
+ end
110
+ tform.prompt do |prompt|
111
+ message = "Please slide "
112
+ message.concat "/ insert " if config.emv_support
113
+ message.concat "<getvar name='key_card_prompt' /> "
114
+ message.concat "card"
115
+ prompt.display :locals => { :message => message }
116
+ end
117
+ end
118
+ end
119
+
120
+ for i in 0..9
121
+ doc.screen "enter_card_#{i}", :chk_entr_crd do
122
+ set 'card.pan' => i.to_s
123
+ end
124
+ end
125
+
126
+ doc.screen :start_enter, :chk_entr_crd do |scr|
127
+ scr.set 'card.pan' => '' # wipes out the 'NA' assigned by the 'mag clean' parser
128
+ end
129
+
130
+ doc.screen :chk_entr_crd do |scr|
131
+ scr.next_screen :enter_card
132
+ scr.next_screen :no_entr_crd, :if => 'tmlvar:transaction_type contains Debit' unless config.allow_keyed_debit
133
+ end
134
+
135
+ unless config.allow_keyed_debit
136
+ doc.screen :no_entr_crd, :next => :swipe_card, :timeout => 3, :on_cancel => :back do display end
137
+ end
138
+
139
+ doc.screen :enter_card do |scr|
140
+ scr.set :manual_entry => 1
141
+ scr.set 'card.input_type' => 3
142
+ scr.on :cancel => :trans_abort
143
+ scr.set 'card.cvv.value' => ''
144
+ scr.set 'card.cvv.reason_skipped' => ''
145
+ scr.next :enter_expiry
146
+ scr.display
147
+ end
148
+
149
+ doc.screen :enter_expiry, :risk_mgmt do |scr|
150
+ scr.on :cancel => :trans_abort
151
+ scr.display
152
+ end
153
+
154
+ ## RISK MANAGEMENT
155
+ doc.screen :risk_mgmt, :next => (config.root.common.emv_support ? :emv_start : :trans_reject) do
156
+ next_screen :mg_risk_mgmt, :if => "tmlvar:card.parser.type == mag"
157
+ next_screen :mg_risk_mgmt, :if => "tmlvar:card.input_type == 3"
158
+ #display "risk_mgmt"
159
+ end
160
+
161
+ doc.screen :debit_pin, :submit_data2 do |scr|#:rsk_mgt_done do |scr|
162
+ scr.build :tform do |tform|
163
+ tform.baddata do "<getvar name='err.baddata_reason'/>" end
164
+ tform.pinentry :prompt => 'Enter PIN:', :type => config.debit_encryption_type
165
+ end
166
+ end
167
+
168
+ doc.screen :mg_risk_mgmt, :next => :rsk_mgt_done do
169
+ next_screen :trans_reject, :if => "tmlvar:card.parser.verdict == reject"
170
+ #next_screen :debit_pin, :if => 'tmlvar:transaction_type contains Debit'
171
+ card :parser => 'mag', :params => 'risk_mgmt' do
172
+ baddata "<getvar name='err.baddata_reason'/>"
173
+ baddata_options :max => 1, :next => :trans_abort
174
+ #prompt "mg_risk_mgmt"
175
+ end
176
+ end
177
+
178
+ doc.screen :rsk_mgt_done, :frd_chk_pass do |scr|
179
+ scr.next_screen :frd_chk_pass, :if => "tmlvar:skip_fraud_check == 1"
180
+ #scr.display "<getvar name='card.parser.verdict' />"
181
+ unless config.card_code_verification
182
+ #if config.card_imprint then scr.next_screen :card_imprint, :if => "tmlvar:manual_entry == 1"
183
+ #else
184
+ scr.next_screen :fraud_check, :if => "tmlvar:manual_entry == 1"
185
+ #end
186
+ else
187
+ scr.next_screen :enter_cvv, :if => "tmlvar:manual_entry == 1"
188
+ end
189
+ scr.next_screen :frd_chk_pass, :if => 'tmlvar:transaction_type contains Debit'
190
+ end
191
+ ##
192
+
193
+ if config.card_code_verification
194
+ nxt = ((config.card_imprint) ? :card_imprint : :fraud_check)
195
+ doc.screen :enter_cvv, :enter_cvv2 do
196
+ next_screen nxt, :if => "tmlvar:transaction_type contains Debit"
197
+ # next_screen nxt, :if => "tmlvar:skip_fraud_check == 1"
198
+ end
199
+ doc.screen :enter_cvv2, :check_cvv do on :cancel => :trans_abort; display end
200
+ doc.screen :check_cvv, nxt do
201
+ next_screen :cvv_skipped, :if => 'tmlvar:card.cvv.value == '
202
+ end
203
+ doc.screen :cvv_skipped, :chk_cvv_rsn do on :cancel => :trans_abort; display end
204
+ doc.screen :chk_cvv_rsn, nxt do
205
+ next_screen :cvv_skipped, :if => "tmlvar:card.cvv.reason_skipped == "
206
+ end
207
+ end
208
+
209
+ if config.card_imprint
210
+ doc.screen :card_imprint, :next => :fraud_check, :timeout => 3, :on_cancel => :trans_abort do display end
211
+ end
212
+
213
+ doc.screen :fraud_check do |scr|
214
+ scr.next :frd_chk_pass if config.fraud_check == 0
215
+ scr.next :frd_chk_pass, :if => "tmlvar:manual_entry == 1"
216
+ scr.next :fraud_check0 if config.fraud_check > 0
217
+ end
218
+
219
+ doc.screen :fraud_check0 do |scr|
220
+ scr.next :fraud_check1 if config.fraud_check == 1 || config.fraud_check == 3
221
+ scr.next :fraud_check2 if config.fraud_check == 2
222
+ scr.next :frd_chk_pass, :if => 'tmlvar:manual_entry == 0'
223
+ end
224
+
225
+ if [1,3].include? config.fraud_check
226
+ doc.screen :fraud_check1 do |scr|
227
+ scr.on :cancel => :trans_abort
228
+ scr.next :frd_chk_ver1
229
+ scr.display
230
+ end
231
+
232
+ doc.screen :frd_chk_ver1 do |scr|
233
+ scr.on :cancel => :trans_abort
234
+ scr.next :frd_chk_pass if config.fraud_check == 1
235
+ scr.next :fraud_check2 if config.fraud_check == 3
236
+ #scr.next :frd_chk_fail
237
+ #scr.next :frd_chk_pass, :if => "tmlvar:fraud_check == tmlvar:card.pan" if config.fraud_check == 1
238
+ #scr.next :fraud_check2, :if => "tmlvar:fraud_check == tmlvar:card.pan" if config.fraud_check == 3
239
+ end
240
+ end
241
+ if [2,3].include? config.fraud_check
242
+ doc.screen :fraud_check2 do |scr|
243
+ scr.on :cancel => :trans_abort
244
+ scr.next :frd_chk_ver2
245
+ scr.display
246
+ end
247
+
248
+ doc.screen :frd_chk_ver2 do |scr|
249
+ scr.next :frd_chk_fail
250
+ scr.next :frd_chk_pass, :if => "tmlvar:card.pan contains tmlvar:fraud_check"
251
+ end
252
+ end
253
+
254
+ if config.fraud_check > 0
255
+ doc.screen :frd_chk_fail, :next => :trans_abort, :on_cancel => :trans_abort do |scr| scr.display end
256
+ end
257
+
258
+ doc.screen :submit_data, :submit_data2 do |scr|
259
+ scr.next_screen :debit_pin, :if => 'tmlvar:transaction_type contains Debit'
260
+ end
261
+
262
+ doc.screen :submit_data2 do |scr|
263
+ scr.set 'oebr.submit_mode' => 'tmlvar:card.parser.verdict',
264
+ 'payment.auth_code' => ''
265
+ scr.submit :target => 'tmlvar:submit_to', :on_error => :submit_err do |s|
266
+ s.get_transaction_variables
267
+ s.get_variable :transaction_type
268
+ s.get_variable :manual_entry
269
+ s.get_variables 'card.cvv.value', 'card.cvv.reason_skipped'
270
+ config.submit_variables.each do |v|
271
+ s.get_variable v
272
+ end
273
+ end
274
+ end
275
+
276
+ doc.screen :submit_err, :next => :trans_abort do
277
+ if ENV['RAILS_ENV'] == 'production'
278
+ timeout 3
279
+ display "Transaction Failed. Please try again."
280
+ else
281
+ display "Error: <getvar name='err.baddata_reason' /><br/><getvar name='err.description' />"
282
+ end
283
+ end
284
+
285
+ doc.screen :invalid_exp, :trans_abort do
286
+ display
287
+ end
288
+
289
+ doc.screen :frd_chk_pass, :next => 'tmlvar:screens.after_swipe'
290
+ doc.screen :trans_reject, :next => restart_app, :timeout => 3, :on_cancel => restart_app do display end
291
+ doc.screen :trans_abort, :next => restart_app, :timeout => 3, :on_cancel => restart_app do
292
+ #next_screen :menu_debit, :if => "tmlvar:transaction_type contains Debit"
293
+ display
294
+ end
295
+
296
+ doc.screen :trans_close, :next => restart_app do
297
+ next_screen :remove_card, :if => "tmlvar:card.input_type == 2"
298
+ end
299
+
300
+ doc.screen :remove_card, :next => restart_app, :on_cancel => restart_app do display end
301
+ end
302
+ end
303
+ end
@@ -0,0 +1,46 @@
1
+ class Rtml::Features::Force < ::Rtml::Feature
2
+ entry_point :force
3
+
4
+ def self.configure
5
+ #config.option :min_sale_amount => 1, :max_sale_amount => nil
6
+ config.option :address_verification => 1 # 0: off, 1: on w/ZIP, 2: on w/Address + Zip
7
+ config.option :requires_approval => true
8
+ config.order = 3
9
+ end
10
+
11
+ def initialize
12
+ super
13
+ config.root.common.submit_variables << "approval_code"
14
+ end
15
+
16
+ def to_tml
17
+ document.process_block do |doc|
18
+ doc.string :approval_code
19
+
20
+ doc.screen :force, :swipe_card do
21
+ set 'submit_to' => url_for(:action => 'force_sale')
22
+ set 'title' => {:lo => 'Force Sale'}
23
+ set 'screens.after_swipe' => '#enter_amount',
24
+ 'screens.emv.exit_point' => '#submit_data'
25
+ set 'confirm.accept' => '#do_force'
26
+ set 'confirm.reject' => '#enter_amount'
27
+ set :skip_fraud_check => 1
28
+ end
29
+
30
+ doc.screen :do_force, (config.requires_approval ? :frc_aprvl : :submit_data)
31
+
32
+ if config.requires_approval
33
+ doc.screens do
34
+ frc_aprvl :frc_chk_aprv do on :cancel => :trans_abort; display end
35
+ frc_bad_aprv :frc_aprvl do on :cancel => :frc_aprvl; display end
36
+ end
37
+
38
+ doc.screen :frc_chk_aprv, :submit_data do |scr|
39
+ end
40
+ # doc.screen :frc_chk_aprv, :frc_bad_aprv do |scr|
41
+ # scr.next_screen :submit_data, :if => ["tmlvar:approval_code","==",config.approval_code]
42
+ # end
43
+ end
44
+ end
45
+ end
46
+ end