rtml 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/Manifest.txt +396 -0
- data/PostInstall.txt +2 -0
- data/README.rdoc +42 -0
- data/Rakefile +33 -0
- data/app_generators/rtml/USAGE +5 -0
- data/app_generators/rtml/rtml_generator.rb +78 -0
- data/app_generators/rtml/templates/rails_template.rb +36 -0
- data/app_generators/rtml/templates/rtml/MIT-LICENSE +20 -0
- data/app_generators/rtml/templates/rtml/README +109 -0
- data/app_generators/rtml/templates/rtml/Rakefile +38 -0
- data/app_generators/rtml/templates/rtml/app/controllers/beryl_controller.rb +70 -0
- data/app_generators/rtml/templates/rtml/app/controllers/rtml/magcard_demo_controller.rb +9 -0
- data/app_generators/rtml/templates/rtml/app/controllers/rtml/oe/btmlpa_controller.rb +158 -0
- data/app_generators/rtml/templates/rtml/app/controllers/rtml/rtml_app_controller.rb +252 -0
- data/app_generators/rtml/templates/rtml/app/controllers/rtml/tml_app_controller.rb +418 -0
- data/app_generators/rtml/templates/rtml/app/helpers/beryl_helper.rb +72 -0
- data/app_generators/rtml/templates/rtml/app/helpers/beryl_tml_helpers/auth_result.rb +56 -0
- data/app_generators/rtml/templates/rtml/app/helpers/beryl_tml_helpers/common.rb +19 -0
- data/app_generators/rtml/templates/rtml/app/helpers/beryl_tml_helpers/index.rb +82 -0
- data/app_generators/rtml/templates/rtml/app/helpers/rtml/magcard_demo_helper.rb +2 -0
- data/app_generators/rtml/templates/rtml/app/helpers/rtml/magcard_demo_tml_helpers/authorized.rb +10 -0
- data/app_generators/rtml/templates/rtml/app/helpers/rtml/magcard_demo_tml_helpers/common.rb +20 -0
- data/app_generators/rtml/templates/rtml/app/helpers/rtml/magcard_demo_tml_helpers/index.rb +33 -0
- data/app_generators/rtml/templates/rtml/app/helpers/rtml/oe/btmlpa_helper.rb +2 -0
- data/app_generators/rtml/templates/rtml/app/helpers/rtml/oe/btmlpa_tml_helpers/auth_result.rb +23 -0
- data/app_generators/rtml/templates/rtml/app/helpers/rtml/oe/btmlpa_tml_helpers/common.rb +23 -0
- data/app_generators/rtml/templates/rtml/app/helpers/rtml/oe/btmlpa_tml_helpers/dynamic.rb +11 -0
- data/app_generators/rtml/templates/rtml/app/helpers/rtml/oe/btmlpa_tml_helpers/icc.rb +384 -0
- data/app_generators/rtml/templates/rtml/app/helpers/rtml/oe/btmlpa_tml_helpers/index.rb +191 -0
- data/app_generators/rtml/templates/rtml/app/helpers/rtml/oe/btmlpa_tml_helpers/receipt.rb +152 -0
- data/app_generators/rtml/templates/rtml/app/helpers/rtml/rtml_app_helper.rb +74 -0
- data/app_generators/rtml/templates/rtml/app/helpers/rtml/rtml_app_tml_helpers/common.rb +9 -0
- data/app_generators/rtml/templates/rtml/app/helpers/rtml/tml_app_helper.rb +43 -0
- data/app_generators/rtml/templates/rtml/app/models/rtml/card.rb +83 -0
- data/app_generators/rtml/templates/rtml/app/models/rtml/card_avs.rb +14 -0
- data/app_generators/rtml/templates/rtml/app/models/rtml/card_cvv.rb +14 -0
- data/app_generators/rtml/templates/rtml/app/models/rtml/card_parser.rb +21 -0
- data/app_generators/rtml/templates/rtml/app/models/rtml/card_pin.rb +18 -0
- data/app_generators/rtml/templates/rtml/app/models/rtml/emv_card_data.rb +25 -0
- data/app_generators/rtml/templates/rtml/app/models/rtml/mag_card_data.rb +21 -0
- data/app_generators/rtml/templates/rtml/app/models/rtml/reference_code.rb +26 -0
- data/app_generators/rtml/templates/rtml/app/models/rtml/state.rb +12 -0
- data/app_generators/rtml/templates/rtml/app/models/rtml/terminal.rb +8 -0
- data/app_generators/rtml/templates/rtml/app/models/rtml/transaction.rb +68 -0
- data/app_generators/rtml/templates/rtml/app/views/beryl/auth_result/another_rcpt.rtml.erb +15 -0
- data/app_generators/rtml/templates/rtml/app/views/beryl/auth_result/receipt.rtml.erb +108 -0
- data/app_generators/rtml/templates/rtml/app/views/beryl/auth_result/receipt_single_column.rtml.erb +106 -0
- data/app_generators/rtml/templates/rtml/app/views/beryl/index/about.rtml.erb +8 -0
- data/app_generators/rtml/templates/rtml/app/views/beryl/index/admin.rtml.erb +4 -0
- data/app_generators/rtml/templates/rtml/app/views/beryl/index/construction.rtml.erb +10 -0
- data/app_generators/rtml/templates/rtml/app/views/beryl/index/idle.rtml.erb +13 -0
- data/app_generators/rtml/templates/rtml/app/views/beryl/index/main_menu.rtml.erb +12 -0
- data/app_generators/rtml/templates/rtml/app/views/beryl/index/menu_credit.rtml.erb +8 -0
- data/app_generators/rtml/templates/rtml/app/views/beryl/index/menu_debit.rtml.erb +3 -0
- data/app_generators/rtml/templates/rtml/app/views/layouts/rtml/beryl_color.rtml.erb +24 -0
- data/app_generators/rtml/templates/rtml/app/views/layouts/rtml/beryl_mono.rtml.erb +8 -0
- data/app_generators/rtml/templates/rtml/app/views/layouts/rtml/magcard_demo_color.rtml.erb +24 -0
- data/app_generators/rtml/templates/rtml/app/views/layouts/rtml/magcard_demo_mono.rtml.erb +3 -0
- data/app_generators/rtml/templates/rtml/app/views/layouts/rtml/oe/btmlpa_i5100.rtml.erb +3 -0
- data/app_generators/rtml/templates/rtml/app/views/layouts/rtml/oe/btmlpa_i8550.rtml.erb +17 -0
- data/app_generators/rtml/templates/rtml/app/views/layouts/rtml/uml.html.erb +11 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/magcard_demo/authorized.html.erb +15 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/magcard_demo/authorized/main.rtml.erb +5 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/magcard_demo/index.html.erb +15 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/magcard_demo/index/_error.rtml.erb +2 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/magcard_demo/index/enter_amount.rtml.erb +5 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/magcard_demo/index/main.rtml.erb +4 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/dynamic/response.rtml.erb +2 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/icc.rtml.erb +760 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/_enter_amount.rtml.erb +4 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/_menu_about.rtml.erb +8 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/_menu_duplicate.rtml.erb +9 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/_menu_examples.rtml.erb +9 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/_menu_logo.rtml.erb +11 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/_menu_other.rtml.erb +20 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/_menu_refund.rtml.erb +8 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/_menu_reversal.rtml.erb +9 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/_menu_sale.rtml.erb +8 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/_menu_sale_cashback.rtml.erb +8 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/about.rtml.erb +1 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/assert.rtml.erb +2 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/card_nmb.rtml.erb +19 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/compl_txn.rtml.erb +1 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/confirm_rev.rtml.erb +3 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/duplicate_na.rtml.erb +1 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/error_scr.rtml.erb +4 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/main_menu.rtml.bak +31 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/main_menu.rtml.erb +40 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/print_pf.rtml.erb +1 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/rd_sale_disp.rtml.erb +1 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/read_refund.rtml.erb +1 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/read_scb.rtml.erb +10 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/reject_trans.rtml.erb +1 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/remove_card.rtml.erb +1 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/rev_bad.rtml.erb +1 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/scb_check_f.rtml.erb +2 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/sign_check.rtml.erb +3 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/subm_err.rtml.erb +2 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/to_man_entry.rtml.erb +2 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/trans_abrt.rtml.erb +1 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/void_trans.rtml.erb +1 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/receipt/_receipt.rtml.erb +29 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/receipt/error_paper.rtml.erb +3 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/rtml_app/_default_development.html.erb +167 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/rtml_app/_default_header.html.erb +12 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/rtml_app/_default_production.html.erb +8 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/rtml_app/charts.html.erb +14 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/tml_app/do_tml_redirect.rtml.erb +7 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/tml_app/get_terminal_info.rtml.erb +26 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/tml_app/rescue_action_in_public.rtml.erb +9 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/tml_app/rescue_action_locally.rtml.erb +42 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/common.rb +303 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/force.rb +46 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/return.rb +22 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/sale.rb +49 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/_confirmation.rtml.erb +10 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/_receipt_agreement.rtml.erb +3 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/_receipt_footer.rtml.erb +2 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/_receipt_header.rtml.erb +4 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/ask_cashback.rtml.erb +11 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/card_imprint.rtml.erb +7 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/check_cb.rtml.erb +11 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/conf_debit.rtml.erb +5 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/confirm_sale.rtml.erb +4 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/confrm_force.rtml.erb +4 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/cvv_skipped.rtml.erb +10 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/disp_avs.rtml.erb +8 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/do_avs_zip.rtml.erb +8 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/enter_amount.rtml.erb +12 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/enter_card.rtml.erb +8 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/enter_cashbk.rtml.erb +10 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/enter_cvv2.rtml.erb +8 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/enter_expiry.rtml.erb +9 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/fraud_check1.rtml.erb +6 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/fraud_check2.rtml.erb +8 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/frc_aprvl.rtml.erb +8 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/frc_avs_zip.rtml.erb +8 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/frc_bad_aprv.rtml.erb +5 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/frd_chk_fail.rtml.erb +5 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/invalid_exp.rtml.erb +1 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/no_entr_crd.rtml.erb +1 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/remove_card.rtml.erb +1 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/swipe_card.rtml.erb +7 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/trans_abort.rtml.erb +1 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/trans_reject.rtml.erb +1 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/void_ref.rtml.erb +10 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/void.rb +30 -0
- data/app_generators/rtml/templates/rtml/components/rtml/widgets/card_parser_widget.rb +90 -0
- data/app_generators/rtml/templates/rtml/components/rtml/widgets/display_widget.rb +66 -0
- data/app_generators/rtml/templates/rtml/components/rtml/widgets/element_builder_widget.rb +123 -0
- data/app_generators/rtml/templates/rtml/components/rtml/widgets/emv_support_widget.rb +365 -0
- data/app_generators/rtml/templates/rtml/components/rtml/widgets/form_submit_widget.rb +65 -0
- data/app_generators/rtml/templates/rtml/components/rtml/widgets/get_transaction_variables_widget.rb +33 -0
- data/app_generators/rtml/templates/rtml/components/rtml/widgets/get_variable_widget.rb +39 -0
- data/app_generators/rtml/templates/rtml/components/rtml/widgets/receipt_widget.rb +66 -0
- data/app_generators/rtml/templates/rtml/components/rtml/widgets/screen_builder_widget.rb +49 -0
- data/app_generators/rtml/templates/rtml/db/migrate/20090825132217_create_rtml_states.rb +15 -0
- data/app_generators/rtml/templates/rtml/db/migrate/20090825132401_create_rtml_terminals.rb +16 -0
- data/app_generators/rtml/templates/rtml/db/migrate/20090825132530_create_rtml_transactions.rb +24 -0
- data/app_generators/rtml/templates/rtml/db/migrate/20090825134118_create_rtml_cards.rb +23 -0
- data/app_generators/rtml/templates/rtml/db/migrate/20090825134622_create_rtml_emv_card_data.rb +20 -0
- data/app_generators/rtml/templates/rtml/db/migrate/20090825134629_create_rtml_mag_card_data.rb +17 -0
- data/app_generators/rtml/templates/rtml/db/migrate/20090825135838_create_rtml_card_parsers.rb +19 -0
- data/app_generators/rtml/templates/rtml/db/migrate/20090826103509_create_reference_codes.rb +14 -0
- data/app_generators/rtml/templates/rtml/db/migrate/20090915030044_add_batch_to_rtml_transactions.rb +10 -0
- data/app_generators/rtml/templates/rtml/db/migrate/20090915031155_add_additional_data_to_rtml_transactions.rb +10 -0
- data/app_generators/rtml/templates/rtml/db/migrate/20090915031156_add_hidden_data_to_rtml_transactions.rb +10 -0
- data/app_generators/rtml/templates/rtml/db/migrate/20091016133313_create_rtml_card_avs.rb +16 -0
- data/app_generators/rtml/templates/rtml/db/migrate/20091016135800_create_rtml_card_cvvs.rb +16 -0
- data/app_generators/rtml/templates/rtml/db/migrate/20091016135810_create_rtml_card_pins.rb +16 -0
- data/app_generators/rtml/templates/rtml/db/migrate/20091016135820_reverse_card_transaction_relationship.rb +11 -0
- data/app_generators/rtml/templates/rtml/db/migrate/20100127115105_convert_rtml_migrations_to_rails_migrations.rb +31 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_controller/USAGE +25 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_controller/rtml_controller_generator.rb +49 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/common_tml_helper.rb +20 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/controller.rb +3 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/css_color.css +37 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/css_mono.css +12 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/functional_test.rb +11 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/helper.rb +2 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/layout_color.rtml.erb +24 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/layout_mono.rtml.erb +3 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/tml_helper.rb +16 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/view.html.erb +15 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/view.rtml.erb +2 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_document/USAGE +8 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_document/rtml_document_generator.rb +45 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_document/templates/controller.rb +7 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_document/templates/functional_test.rb +10 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_document/templates/helper.rb +2 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_document/templates/view.rtml.erb +11 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_widget/USAGE +8 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_widget/rtml_widget_generator.rb +66 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_widget/templates/basic_widget.rb +57 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_widget/templates/basic_widget_no_help.rb +27 -0
- data/app_generators/rtml/templates/rtml/init.rb +40 -0
- data/app_generators/rtml/templates/rtml/install.rb +18 -0
- data/app_generators/rtml/templates/rtml/lib/environment.rb +61 -0
- data/app_generators/rtml/templates/rtml/lib/extensions/action_controller/request.rb +9 -0
- data/app_generators/rtml/templates/rtml/lib/extensions/action_controller/routing/route_set.rb +34 -0
- data/app_generators/rtml/templates/rtml/lib/extensions/action_view/base.rb +74 -0
- data/app_generators/rtml/templates/rtml/lib/extensions/action_view/partial_template.rb +24 -0
- data/app_generators/rtml/templates/rtml/lib/extensions/active_record.rb +13 -0
- data/app_generators/rtml/templates/rtml/lib/extensions/active_support/dependencies.rb +25 -0
- data/app_generators/rtml/templates/rtml/lib/extensions/array.rb +15 -0
- data/app_generators/rtml/templates/rtml/lib/extensions/attr_boolean.rb +10 -0
- data/app_generators/rtml/templates/rtml/lib/extensions/hash.rb +28 -0
- data/app_generators/rtml/templates/rtml/lib/extensions/nil_class.rb +20 -0
- data/app_generators/rtml/templates/rtml/lib/extensions/rake.rb +19 -0
- data/app_generators/rtml/templates/rtml/lib/extensions/regexp.rb +16 -0
- data/app_generators/rtml/templates/rtml/lib/extensions/string.rb +37 -0
- data/app_generators/rtml/templates/rtml/lib/other_plugins.rb +23 -0
- data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/MIT-LICENSE +20 -0
- data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/README +36 -0
- data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/Rakefile +44 -0
- data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/init.rb +25 -0
- data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/lib/action_controller/filters/before_render_filter.rb +30 -0
- data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/lib/before_render.rb +43 -0
- data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/lib/before_render_instance.rb +45 -0
- data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/lib/filter_chain_has_many_types_of_filters.rb +87 -0
- data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/lib/filter_has_before_render.rb +26 -0
- data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/tasks/before_render_tasks.rake +25 -0
- data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/test/before_render_test.rb +29 -0
- data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/test/test_helper.rb +24 -0
- data/app_generators/rtml/templates/rtml/lib/rtml.rb +77 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/beryl/constants.rb +12 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/beryl/version.rb +11 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/common/renderable.rb +13 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/core/include.rb +30 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/core/layout.rb +59 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/core/next.rb +188 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/core/screen.rb +91 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/core/screen/iterators.rb +63 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/core/screen/next_screen_methods.rb +70 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/core/screen/variable_methods.rb +73 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/core/support/importer.rb +55 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/core/tml_document.rb +318 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/core/tml_document/screen_methods.rb +79 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/core/tml_document/variable_methods.rb +83 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/core/variable.rb +123 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/debug/browser_emulator.rb +59 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/debug/rtml_controller_test_case.rb +7 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/debug/rtml_core_unit_test.rb +11 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/debug/unit_test.rb +3 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/delegation.rb +8 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/doc.rb +12 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/element.rb +75 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/errors/widget_accessor_failure.rb +9 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/events/event_handler.rb +79 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/events/event_processor.rb +106 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/events/processors.rb +10 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/events/processors/defaults_processor.rb +18 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/events/processors/key_processor.rb +21 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/feature.rb +32 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/feature_config.rb +195 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/features.rb +18 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/features/array_of_feature_instances.rb +17 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/features/controller_class_methods.rb +30 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/features/controller_instance_methods.rb +35 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/helpers.rb +21 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/helpers/controller_helpers.rb +59 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/helpers/controller_helpers/menu_helpers.rb +193 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/helpers/core_helpers/action_view_wrapper.rb +23 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/helpers/core_helpers/event_helpers.rb +28 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/helpers/core_helpers/layout_helpers.rb +47 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/helpers/core_helpers/widget_support.rb +181 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/helpers/core_helpers/widget_support/class_methods.rb +28 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/helpers/core_helpers/yield_helpers.rb +33 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/helpers/proxy_helpers/feature_helpers.rb +17 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/helpers/render_helper.rb +71 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/helpers/terminal_helpers.rb +21 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/helpers/test_helpers.rb +6 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/helpers/test_helpers/tml_validation_assertions.rb +10 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/helpers/test_helpers/variable_assertions.rb +27 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/helpers/view_helpers/form_helpers.rb +70 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/helpers/view_helpers/rtml_form_builder.rb +174 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/oe/btmlpa_constants.rb +48 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/proxying/method_missing_methods.rb +14 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/proxying/rtml_interface.rb +33 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/proxying/sandbox.rb +18 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/text_utils.rb +51 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/tml_param_parser.rb +95 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/validation/dom_rule_parser.rb +61 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/validation/dom_tag.rb +52 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/validation/predefined_variable_rule_parser.rb +97 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/validation/tml_validator.rb +16 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/version.rb +11 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/widgets/property.rb +11 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/widgets/property_accessors.rb +59 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/widgets/widget.rb +251 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/widgets/widget_class_methods.rb +213 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/dot.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_can.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_cand.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_en.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_end.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_i.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_icd.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_icl.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_icr.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_ics.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_icsw.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_icv.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_int.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_int2.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_men.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_mend.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_next.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_no.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_nod.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_ok.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_okd.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_pic1.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_pic2.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_pic3.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_pic4.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_top.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_txn.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_yes.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_yesd.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/btmlpa.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/can_dn.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/can_up.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/conf.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/iccemv.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/images.lib +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/magcard.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/no_dn.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/no_up.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/ok_dn.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/ok_up.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/top.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/yes_dn.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/yes_up.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/stylesheets/rtml/beryl_color.css +37 -0
- data/app_generators/rtml/templates/rtml/public/stylesheets/rtml/beryl_mono.css +17 -0
- data/app_generators/rtml/templates/rtml/public/stylesheets/rtml/charts.css +0 -0
- data/app_generators/rtml/templates/rtml/public/stylesheets/rtml/oe/btmlpa/i5100.css +12 -0
- data/app_generators/rtml/templates/rtml/public/stylesheets/rtml/oe/btmlpa/i8550.css +37 -0
- data/app_generators/rtml/templates/rtml/public/stylesheets/rtml/oe/btmlpa/receipt.css +4 -0
- data/app_generators/rtml/templates/rtml/public/stylesheets/rtml/oe/examples/i5100.css +12 -0
- data/app_generators/rtml/templates/rtml/public/stylesheets/rtml/oe/examples/i8550.css +37 -0
- data/app_generators/rtml/templates/rtml/reporting/110409 +227 -0
- data/app_generators/rtml/templates/rtml/reporting/linecount.rb +42 -0
- data/app_generators/rtml/templates/rtml/rules/predefined_tml_variables.rb +63 -0
- data/app_generators/rtml/templates/rtml/rules/tml_document_structure.rb +84 -0
- data/app_generators/rtml/templates/rtml/rules/varns/audio.rb +30 -0
- data/app_generators/rtml/templates/rtml/rules/varns/card.rb +17 -0
- data/app_generators/rtml/templates/rtml/rules/varns/card/emv.rb +31 -0
- data/app_generators/rtml/templates/rtml/rules/varns/card/mag.rb +8 -0
- data/app_generators/rtml/templates/rtml/rules/varns/card/parser.rb +7 -0
- data/app_generators/rtml/templates/rtml/rules/varns/card/pin.rb +6 -0
- data/app_generators/rtml/templates/rtml/rules/varns/cfgm.rb +15 -0
- data/app_generators/rtml/templates/rtml/rules/varns/com.rb +9 -0
- data/app_generators/rtml/templates/rtml/rules/varns/err.rb +14 -0
- data/app_generators/rtml/templates/rtml/rules/varns/gma/event.rb +13 -0
- data/app_generators/rtml/templates/rtml/rules/varns/gprs.rb +8 -0
- data/app_generators/rtml/templates/rtml/rules/varns/imager.rb +8 -0
- data/app_generators/rtml/templates/rtml/rules/varns/ip.rb +15 -0
- data/app_generators/rtml/templates/rtml/rules/varns/oebr.rb +42 -0
- data/app_generators/rtml/templates/rtml/rules/varns/oebr/3rdparty.rb +7 -0
- data/app_generators/rtml/templates/rtml/rules/varns/oebr/backlight.rb +4 -0
- data/app_generators/rtml/templates/rtml/rules/varns/oebr/cache.rb +1 -0
- data/app_generators/rtml/templates/rtml/rules/varns/oebr/connect.rb +5 -0
- data/app_generators/rtml/templates/rtml/rules/varns/oebr/connection.rb +5 -0
- data/app_generators/rtml/templates/rtml/rules/varns/oebr/offline.rb +5 -0
- data/app_generators/rtml/templates/rtml/rules/varns/oegw.rb +12 -0
- data/app_generators/rtml/templates/rtml/rules/varns/payment.rb +21 -0
- data/app_generators/rtml/templates/rtml/rules/varns/ppp.rb +11 -0
- data/app_generators/rtml/templates/rtml/rules/varns/terminal.rb +29 -0
- data/app_generators/rtml/templates/rtml/tasks/rtml_tasks.rake +78 -0
- data/app_generators/rtml/templates/rtml/template.rb +64 -0
- data/app_generators/rtml/templates/rtml/test/core/element_test.rb +17 -0
- data/app_generators/rtml/templates/rtml/test/core/screen_test.rb +91 -0
- data/app_generators/rtml/templates/rtml/test/core/tml_document_test.rb +53 -0
- data/app_generators/rtml/templates/rtml/test/functional/beryl_controller_test.rb +13 -0
- data/app_generators/rtml/templates/rtml/test/functional/btmlpa_controller_test.rb +13 -0
- data/app_generators/rtml/templates/rtml/test/functional/magcard_demo_controller_test.rb +20 -0
- data/app_generators/rtml/templates/rtml/test/functional/rtml_app_controller_test.rb +9 -0
- data/app_generators/rtml/templates/rtml/test/functional/rtml_routing_test.rb +19 -0
- data/app_generators/rtml/templates/rtml/test/functional/tml_controller_params_test.rb +20 -0
- data/app_generators/rtml/templates/rtml/test/rtml_test_helper.rb +44 -0
- data/app_generators/rtml/templates/rtml/test/validation/predefined_variable_rule_parser_test.rb +11 -0
- data/app_generators/rtml/templates/rtml/uninstall.rb +1 -0
- data/app_generators/rtml/templates/rtml/update.rb +57 -0
- data/bin/rtml +36 -0
- data/lib/rtml.rb +4 -0
- data/script/console +10 -0
- data/script/destroy +14 -0
- data/script/generate +14 -0
- data/tasks/reglob.rake +28 -0
- data/test/test_generator_helper.rb +29 -0
- data/test/test_helper.rb +3 -0
- data/test/test_rtml.rb +11 -0
- data/test/test_rtml_generator.rb +43 -0
- metadata +516 -0
@@ -0,0 +1,65 @@
|
|
1
|
+
module Rtml
|
2
|
+
module Widgets
|
3
|
+
# Constructs a "submit" TML tag to submit data to the server.
|
4
|
+
#
|
5
|
+
# Example:
|
6
|
+
# def index
|
7
|
+
# . . .
|
8
|
+
# screen :do_submit, :next => :submit_err do
|
9
|
+
# submit :target => url_for(:action => "auth") do
|
10
|
+
# on_error :submit_err
|
11
|
+
# get_variables 'amount', 'card.issue_number',
|
12
|
+
# 'card.cardholder_name'
|
13
|
+
# end
|
14
|
+
# end
|
15
|
+
# end
|
16
|
+
#
|
17
|
+
class FormSubmitWidget < Rtml::Widgets::Widget
|
18
|
+
# the location to send the POST data to
|
19
|
+
property :target
|
20
|
+
# the screen on the current page (or a URL to it) to go to in the event of an error
|
21
|
+
property :on_error
|
22
|
+
# true if the terminal is allowed to cache the server's response
|
23
|
+
# defaults to false
|
24
|
+
property :cache
|
25
|
+
|
26
|
+
accessor Screen
|
27
|
+
accessor_alias :form_submit, :submit
|
28
|
+
|
29
|
+
def init_properties
|
30
|
+
cache false
|
31
|
+
end
|
32
|
+
|
33
|
+
def to_tml
|
34
|
+
tgt = url_for(target)
|
35
|
+
err = url_for(on_error)
|
36
|
+
cch = ((cache) ? :allow : :deny)
|
37
|
+
|
38
|
+
raise "No :target URL specified" if tgt.blank?
|
39
|
+
raise "No :on_error screen specified" if err.blank?
|
40
|
+
|
41
|
+
scr = parent
|
42
|
+
if parent.kind_of? Rtml::Core::Screen
|
43
|
+
parent.next err rescue nil
|
44
|
+
else
|
45
|
+
scr = parent.screen("sub_#{element_id}", :next => err)
|
46
|
+
end
|
47
|
+
scr.build :submit, :tgt => tgt, :econn => err, :cache => cch do |sub|
|
48
|
+
sub.getvar :name => 'authenticity_token' if document.variables.find_by_name('authenticity_token')
|
49
|
+
sub.concat render_widget_tml
|
50
|
+
end
|
51
|
+
nil
|
52
|
+
end
|
53
|
+
|
54
|
+
private
|
55
|
+
def url_for(a)
|
56
|
+
r = nil
|
57
|
+
if a.kind_of? String or a.kind_of? Symbol then r = a.to_screen_ref
|
58
|
+
elsif a.kind_of? Hash then r = action_view.url_for a
|
59
|
+
else raise "Invalid type specified for URL (#{a.inspect})"
|
60
|
+
end
|
61
|
+
r
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
data/app_generators/rtml/templates/rtml/components/rtml/widgets/get_transaction_variables_widget.rb
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
module Rtml
|
2
|
+
module Widgets
|
3
|
+
class GetTransactionVariablesWidget < Rtml::Widgets::Widget
|
4
|
+
accessor DisplayWidget, FormSubmitWidget
|
5
|
+
accessor_alias :get_transaction_variables
|
6
|
+
|
7
|
+
def to_tml #:nodoc:
|
8
|
+
# card variables
|
9
|
+
parent.get_variables %W(
|
10
|
+
cardholder_name effective_date expiry_date input_type issue_number issuer_name
|
11
|
+
pan scheme pin
|
12
|
+
).collect { |c| "card.#{c}" }
|
13
|
+
# emv variables
|
14
|
+
parent.get_variables %W(
|
15
|
+
aac aid aip app_pan_seq arqc atc auc cvmr iac_default iac_denial iac_online iad
|
16
|
+
iso_track2 last_attempt signature tc tvr unumber
|
17
|
+
).collect { |c| "card.emv.#{c}"}
|
18
|
+
# pin variables
|
19
|
+
parent.get_variables %W( length smid array ).collect { |c| "card.pin.#{c}"}
|
20
|
+
# mag variables
|
21
|
+
parent.get_variables %W( iso1_track iso2_track iso3_track service_code ).collect { |c| "card.mag.#{c}" }
|
22
|
+
# card parser variables
|
23
|
+
parent.get_variables %W( type reject_reason verdict cvm cvr ).collect { |c| "card.parser.#{c}" }
|
24
|
+
# OEBR variables
|
25
|
+
parent.get_variables %W( submit_mode time_zone ).collect { |c| "oebr.#{c}" }
|
26
|
+
# transaction payment variables
|
27
|
+
parent.get_variables %W( trans_type amount amount_other ).collect { |c| "payment.#{c}" }
|
28
|
+
|
29
|
+
nil
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module Rtml
|
2
|
+
module Widgets
|
3
|
+
# Constructs a "getvar" tag for a single TML variable.
|
4
|
+
#
|
5
|
+
# Examples:
|
6
|
+
# get_variable 'card.pan'
|
7
|
+
# => <getvar name="card.pan" />
|
8
|
+
# variable_for 'card.cardholder_name'
|
9
|
+
# => <getvar name="card.cardholder_name" />
|
10
|
+
# getvar :amount, :format => '^00'
|
11
|
+
# => <getvar name="amount" format="^00" />
|
12
|
+
#
|
13
|
+
class GetVariableWidget < Rtml::Widgets::Widget
|
14
|
+
# The name of the variable
|
15
|
+
property :name => :name_assigned
|
16
|
+
# Format, if any (see TML "getvar" format attribute)
|
17
|
+
property :format
|
18
|
+
|
19
|
+
accessor Widget
|
20
|
+
accessor_alias :get_variable, :variable_for, :getvar
|
21
|
+
|
22
|
+
def init_properties
|
23
|
+
name :required
|
24
|
+
name arguments.first
|
25
|
+
end
|
26
|
+
|
27
|
+
def name_assigned(n)
|
28
|
+
n
|
29
|
+
#qualified_variable_name n
|
30
|
+
end
|
31
|
+
|
32
|
+
def to_tml
|
33
|
+
fmt = ""
|
34
|
+
fmt = " format=\"#{format}\"" unless format.blank?
|
35
|
+
"<getvar name=\"#{name}\"#{fmt} />"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
module Rtml
|
2
|
+
module Widgets
|
3
|
+
# Assists in printing receipts by combining the <screen> and the
|
4
|
+
# necessary <print> TML tags into a single RTML method call.
|
5
|
+
#
|
6
|
+
# Like the Rtml::TMLDocument#screen method, an ID value is required.
|
7
|
+
# The ID is expected to be a Symbol.
|
8
|
+
#
|
9
|
+
# The second argument should be a reference to the next screen, like
|
10
|
+
# the TMLDocument#screen method.
|
11
|
+
#
|
12
|
+
# You can also pass the content as the last argument, or a Block with which
|
13
|
+
# to construct the content. (The Block can use the #display method
|
14
|
+
# to render a View, as with Screen). The content for the second argument
|
15
|
+
# is built using the Widget#display method.
|
16
|
+
#
|
17
|
+
# If a both a Block and a content argument are specified, the Block will take
|
18
|
+
# priority and the argument will be ignored.
|
19
|
+
#
|
20
|
+
# Examples:
|
21
|
+
# def index
|
22
|
+
# receipt :example_1, :example_2 { concat "This is a receipt example!" }
|
23
|
+
# receipt :example_2, :example_3 { display }
|
24
|
+
# receipt :example_3, :example_4, "This is another example!"
|
25
|
+
# receipt :example_4, :example_5, :partial => "receipts/content_for_receipt_example_4"
|
26
|
+
# end
|
27
|
+
class ReceiptWidget < Rtml::Widgets::Widget
|
28
|
+
property :screen_id
|
29
|
+
property :next
|
30
|
+
property :inner
|
31
|
+
|
32
|
+
accessor TMLDocument
|
33
|
+
accessor_alias :receipt
|
34
|
+
accessor_alias :printscr
|
35
|
+
|
36
|
+
def init_properties #:nodoc:
|
37
|
+
screen_id :required
|
38
|
+
|
39
|
+
screen_id arguments.first if arguments.first.kind_of? Symbol or arguments.first.kind_of? String or arguments.length == 1
|
40
|
+
if @receipt_block
|
41
|
+
next_screen arguments[1]
|
42
|
+
else
|
43
|
+
inner arguments.last
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
def next_screen(*a,&b) self.send(:next, *a, &b); end
|
48
|
+
|
49
|
+
def initialize(*a, &b) #:nodoc:
|
50
|
+
@receipt_block = b if block_given?
|
51
|
+
super(*a) {}
|
52
|
+
end
|
53
|
+
|
54
|
+
def to_tml(&block) #:nodoc:
|
55
|
+
parent.screen screen_id, :next => next_screen do |scr|
|
56
|
+
scr.build :print do |builder|
|
57
|
+
if @receipt_block then builder.yield_with_optional_param self, &@receipt_block
|
58
|
+
else display inner if inner
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
nil
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
module Rtml
|
2
|
+
module Widgets
|
3
|
+
# Used to build a set of screens without having to call the Rtml::TMLDocument#screen
|
4
|
+
# method for each one.
|
5
|
+
#
|
6
|
+
# Within the block you pass to this Widget, anything that would normally cause a
|
7
|
+
# NoMethodError will instead create a new screen of the same name. If a second argument
|
8
|
+
# is supplied, it will be used for the :next attribute (linking this screen to the
|
9
|
+
# next). If any other arguments are supplied, they will be passed directly into
|
10
|
+
# the Screen initializer. Also, if a block is supplied, it is passed into the Screen
|
11
|
+
# initializer. If a block is NOT supplied, a default block is created calling "display",
|
12
|
+
# which will cause the Screen to build a Display element and render its corresponding View.
|
13
|
+
#
|
14
|
+
# See also Rtml::Helpers::ChildElements#screens
|
15
|
+
#
|
16
|
+
# Examples:
|
17
|
+
#
|
18
|
+
# def index
|
19
|
+
# screens do
|
20
|
+
# init :index # => screen :init, :next => :index { display }
|
21
|
+
# index :menu { card_parser . . . } # => screen :index, :next => :menu { card_parser . . . }
|
22
|
+
# end
|
23
|
+
# end
|
24
|
+
#
|
25
|
+
class ScreenBuilderWidget < Rtml::Widgets::Widget
|
26
|
+
accessor TMLDocument
|
27
|
+
|
28
|
+
def respond_to?(a) #:nodoc:
|
29
|
+
super #true
|
30
|
+
end
|
31
|
+
|
32
|
+
def method_missing(name, *args, &block) #:nodoc:
|
33
|
+
if args.length == 1 and not args[0].kind_of? Hash
|
34
|
+
if block_given? then parent.screen name, :next => args[0], &block
|
35
|
+
else parent.screen(name, :next => args[0]) { display }
|
36
|
+
end
|
37
|
+
else
|
38
|
+
if block_given? then parent.screen name, *args, &block
|
39
|
+
else parent.screen(name, :next => args[0]) { display }
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
def to_tml #:nodoc:
|
45
|
+
''
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class CreateRtmlStates < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :rtml_states do |t|
|
4
|
+
t.string :signature
|
5
|
+
t.text :state
|
6
|
+
|
7
|
+
t.timestamps
|
8
|
+
end
|
9
|
+
rescue # because of the move from Rtml::Migrator to ActiveRecord::Migrator
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.down
|
13
|
+
drop_table :rtml_states
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class CreateRtmlTerminals < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :rtml_terminals do |t|
|
4
|
+
t.string :itid
|
5
|
+
t.integer :state_id
|
6
|
+
t.string :type, :default => 'Rtml::Terminal'
|
7
|
+
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
rescue # because of the move from Rtml::Migrator to ActiveRecord::Migrator
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.down
|
14
|
+
drop_table :rtml_terminals
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
class CreateRtmlTransactions < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :rtml_transactions do |t|
|
4
|
+
%W(action message auth_code currency_code txn_mode).each do |i|
|
5
|
+
t.string i
|
6
|
+
end
|
7
|
+
t.string :state
|
8
|
+
t.float :duration
|
9
|
+
t.decimal :amount, :precision => 2
|
10
|
+
t.decimal :amount_other, :precision => 2
|
11
|
+
t.string :txn_type
|
12
|
+
t.datetime :post_date
|
13
|
+
t.integer :post_id
|
14
|
+
|
15
|
+
t.references :rtml_terminal
|
16
|
+
t.timestamps
|
17
|
+
end
|
18
|
+
rescue # because of the move from Rtml::Migrator to ActiveRecord::Migrator
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.down
|
22
|
+
drop_table :rtml_transactions
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
class CreateRtmlCards < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :rtml_cards do |t|
|
4
|
+
t.string :cardholder_name
|
5
|
+
t.datetime :effective_date
|
6
|
+
t.datetime :expiry_date
|
7
|
+
t.string :input_type
|
8
|
+
t.integer :issue_number
|
9
|
+
t.string :issuer_name
|
10
|
+
t.string :pan
|
11
|
+
t.string :scheme
|
12
|
+
|
13
|
+
t.references :data, :polymorphic => true
|
14
|
+
t.references :transaction
|
15
|
+
t.timestamps
|
16
|
+
end
|
17
|
+
rescue # because of the move from Rtml::Migrator to ActiveRecord::Migrator
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.down
|
21
|
+
drop_table :rtml_cards
|
22
|
+
end
|
23
|
+
end
|
data/app_generators/rtml/templates/rtml/db/migrate/20090825134622_create_rtml_emv_card_data.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
class CreateRtmlEmvCardData < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :rtml_emv_card_data do |t|
|
4
|
+
t.string :aid
|
5
|
+
for i in %W(aip app_pan_seq atc auc last_attempt signature unumber)
|
6
|
+
t.integer i
|
7
|
+
end
|
8
|
+
for i in %W(aac arqc cvmr iac_default iac_denial iac_online iad iso_track2 tc tvr)
|
9
|
+
t.binary i
|
10
|
+
end
|
11
|
+
|
12
|
+
t.timestamps
|
13
|
+
end
|
14
|
+
rescue # because of the move from Rtml::Migrator to ActiveRecord::Migrator
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.down
|
18
|
+
drop_table :rtml_emv_card_data
|
19
|
+
end
|
20
|
+
end
|
data/app_generators/rtml/templates/rtml/db/migrate/20090825134629_create_rtml_mag_card_data.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
class CreateRtmlMagCardData < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :rtml_mag_card_data do |t|
|
4
|
+
t.string :iso1_track
|
5
|
+
t.string :iso2_track
|
6
|
+
t.string :iso3_track
|
7
|
+
t.string :service_code
|
8
|
+
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
rescue # because of the move from Rtml::Migrator to ActiveRecord::Migrator
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.down
|
15
|
+
drop_table :rtml_mag_card_data
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
class CreateRtmlCardParsers < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :rtml_card_parsers do |t|
|
4
|
+
t.string :card_type # => 'mag' or 'icc_emv'
|
5
|
+
t.string :reject_reason # => reason for transaction rejection
|
6
|
+
t.string :verdict # => 'online', 'offline' or 'reject'
|
7
|
+
t.string :cvm # => cardholder verification method
|
8
|
+
t.string :cvr # => cardholder verification result
|
9
|
+
|
10
|
+
t.references :card
|
11
|
+
t.timestamps
|
12
|
+
end
|
13
|
+
rescue # because of the move from Rtml::Migrator to ActiveRecord::Migrator
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.down
|
17
|
+
drop_table :rtml_card_parsers
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreateReferenceCodes < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :rtml_reference_codes do |t|
|
4
|
+
t.string :value
|
5
|
+
|
6
|
+
t.references :transaction
|
7
|
+
end
|
8
|
+
rescue # because of the move from Rtml::Migrator to ActiveRecord::Migrator
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.down
|
12
|
+
drop_table :rtml_reference_codes
|
13
|
+
end
|
14
|
+
end
|
data/app_generators/rtml/templates/rtml/db/migrate/20090915030044_add_batch_to_rtml_transactions.rb
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
class AddBatchToRtmlTransactions < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_column :rtml_transactions, :batch, :string
|
4
|
+
rescue # because of the move from Rtml::Migrator to ActiveRecord::Migrator
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.down
|
8
|
+
remove_column :rtml_transactions, :batch
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
class AddAdditionalDataToRtmlTransactions < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_column :rtml_transactions, :additional_data, :text
|
4
|
+
rescue # because of the move from Rtml::Migrator to ActiveRecord::Migrator
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.down
|
8
|
+
remove_column :rtml_transactions, :additional_data
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
class AddHiddenDataToRtmlTransactions < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_column :rtml_transactions, :hidden_data, :text
|
4
|
+
rescue # because of the move from Rtml::Migrator to ActiveRecord::Migrator
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.down
|
8
|
+
remove_column :rtml_transactions, :hidden_data
|
9
|
+
end
|
10
|
+
end
|