rtml 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,66 @@
|
|
|
1
|
+
module Rtml
|
|
2
|
+
module Widgets
|
|
3
|
+
# Renders a "display" tag. Only accessible from within a Screen
|
|
4
|
+
# object. If a Block is given, its return value is used for the content.
|
|
5
|
+
# Otherwise, the options hash is passed into WidgetSupport#content_of_view
|
|
6
|
+
# and whatever it returns is used for the content. The content is then laid out
|
|
7
|
+
# if a layout has been supplied, and wrapped in a <display> tag.
|
|
8
|
+
#
|
|
9
|
+
# Examples:
|
|
10
|
+
# def index
|
|
11
|
+
# screen :main_menu do
|
|
12
|
+
# display # overridden for Screen to produce <display> tags around the View
|
|
13
|
+
# end
|
|
14
|
+
#
|
|
15
|
+
# screen :error_scr do
|
|
16
|
+
# display "error occurred"
|
|
17
|
+
# end
|
|
18
|
+
#
|
|
19
|
+
# screen :welcome_scr do
|
|
20
|
+
# display do
|
|
21
|
+
# # return value will be wrapped in <display> and laid out.
|
|
22
|
+
# if current_user then "Welcome, #{current_user.name}!"
|
|
23
|
+
# else "You must be logged in."
|
|
24
|
+
# end
|
|
25
|
+
# endif
|
|
26
|
+
# end
|
|
27
|
+
#
|
|
28
|
+
# . . .
|
|
29
|
+
#
|
|
30
|
+
# end
|
|
31
|
+
#
|
|
32
|
+
class DisplayWidget < Rtml::Widgets::Widget
|
|
33
|
+
silence_accessor_failures!
|
|
34
|
+
accessor Screen
|
|
35
|
+
accessor_alias :display
|
|
36
|
+
|
|
37
|
+
def initialize(*a, &b) #:nodoc:
|
|
38
|
+
super(*a)
|
|
39
|
+
parent.widgets.each do |wi|
|
|
40
|
+
parent.widgets.delete wi if wi.kind_of? DisplayWidget and wi != self
|
|
41
|
+
end
|
|
42
|
+
@block_value = yield_with_optional_param(self, &b) if block_given?
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def self.assign_properties? #:nodoc:
|
|
46
|
+
false
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# rtml builds a widget calling to_tml with a block from render_tml. When
|
|
50
|
+
# render_tml doesn't exist, it falls back to to_tml without a block, and
|
|
51
|
+
# failing that it'll just call to_s on the object.
|
|
52
|
+
undef render_tml
|
|
53
|
+
|
|
54
|
+
def init_properties #:nodoc:
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def to_tml(&b) #:nodoc:
|
|
58
|
+
if arguments.empty? and @block_value then c = content_of_view(@block_value)
|
|
59
|
+
else c = content_of_view(*arguments, &b).to_s
|
|
60
|
+
end
|
|
61
|
+
r = ((layout.nil? or layout == false) ? c : (layout.to_tml { c.indent })).to_s.indent
|
|
62
|
+
concat "<display>\n\t#{r}\n</display>"
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
module Rtml
|
|
2
|
+
module Widgets
|
|
3
|
+
# The Element Builder Widget is designed to help alleviate the sheer amount of typing necessary
|
|
4
|
+
# for developing raw TML. If you need to insert TML and don't have any RTML Widgets to fill the
|
|
5
|
+
# void, or if you're in the process of building an RTML Widget and are ready to build some actual
|
|
6
|
+
# TML without using Strings, you can take advantage of the Element Builder to keep your code pretty
|
|
7
|
+
# and easy to maintain.
|
|
8
|
+
#
|
|
9
|
+
# Examples:
|
|
10
|
+
# This is an example of building a magnetic card reader with a prompt using Strings:
|
|
11
|
+
# doc.concat <<-end_tml
|
|
12
|
+
# <tform>
|
|
13
|
+
# <baddata>
|
|
14
|
+
# <getvar name=”err.baddata_reason” />
|
|
15
|
+
# </baddata>
|
|
16
|
+
# <card parser=”mag” parser_params=”read_data” />
|
|
17
|
+
# <prompt>
|
|
18
|
+
# Please Swipe Card.
|
|
19
|
+
# </prompt>
|
|
20
|
+
# </tform>
|
|
21
|
+
# end_tml
|
|
22
|
+
#
|
|
23
|
+
# And this is the same example using Element Builder:
|
|
24
|
+
# build :tform do
|
|
25
|
+
# baddata { getvar :name => 'err.baddata_reason' }
|
|
26
|
+
# prompt "Please swipe card."
|
|
27
|
+
# card :parser => 'mag', :parser_params => 'read_data'
|
|
28
|
+
# end
|
|
29
|
+
#
|
|
30
|
+
# If the same example were using Views...
|
|
31
|
+
#
|
|
32
|
+
# build :tform do
|
|
33
|
+
# baddata { display :file => 'common/card_data_error' }
|
|
34
|
+
# prompt { display }
|
|
35
|
+
# card :parser => 'mag', :parser_params => 'read_data'
|
|
36
|
+
# end
|
|
37
|
+
#
|
|
38
|
+
# ElementBuilder will help you keep ugly TML out of your application, and helps a little
|
|
39
|
+
# bit with DRYing it up -- but you'll want to design Widgets around it because if, for
|
|
40
|
+
# example, you need a second Card Swipe prompt, you'd need to retype the above.
|
|
41
|
+
#
|
|
42
|
+
# Note that if you need to construct a TML tag that is also a valid method or Widget
|
|
43
|
+
# reference, you can do that by just adding another build element with the ambiguous name
|
|
44
|
+
# as the first (or only) argument:
|
|
45
|
+
#
|
|
46
|
+
# build :display do
|
|
47
|
+
# . . .
|
|
48
|
+
# end
|
|
49
|
+
#
|
|
50
|
+
class ElementBuilderWidget < Rtml::Widgets::Widget
|
|
51
|
+
# Stores the key-value pairs for this element. You don't need to directly reference this.
|
|
52
|
+
property :attributes
|
|
53
|
+
# Stores the name of this element. You don't need to directly reference this.
|
|
54
|
+
property :name
|
|
55
|
+
accessor TMLDocument, Screen, Widget
|
|
56
|
+
accessor_alias :element_builder, :build
|
|
57
|
+
# If true, any attributes that have no content will not be added to the element.
|
|
58
|
+
# Defaults to false.
|
|
59
|
+
attr_accessor :drop_empty_attributes
|
|
60
|
+
|
|
61
|
+
def layout(*a, &b) parent.layout *a, &b end
|
|
62
|
+
|
|
63
|
+
def respond_to?(name) #:nodoc:
|
|
64
|
+
super or parent.respond_to? name
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def init_properties
|
|
68
|
+
attributes({})
|
|
69
|
+
name arguments.first
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def initialize(parent, *a, &b) #:nodoc:
|
|
73
|
+
super parent, &b
|
|
74
|
+
if a.length > 0
|
|
75
|
+
name a[0] if a[0].kind_of? Symbol or a[0].kind_of? String
|
|
76
|
+
end
|
|
77
|
+
a.each do |p|
|
|
78
|
+
if p.kind_of? Hash
|
|
79
|
+
if p[:name] and name.nil?
|
|
80
|
+
name p[:name]
|
|
81
|
+
p.delete :name
|
|
82
|
+
end
|
|
83
|
+
attributes.merge! p
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
attributes.each { |a,b| attributes[a] = b.to_screen_ref if a == 'next' || a == 'next_screen' }
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
def method_missing(name, *args, &blk) #:nodoc:
|
|
90
|
+
return parent.send(name, *args, &blk) if parent.respond_to? name and not self.is_accessor? name
|
|
91
|
+
r = self.build name, *args, &blk
|
|
92
|
+
r.drop_empty_attributes = self.drop_empty_attributes
|
|
93
|
+
r
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
def to_tml #:nodoc:
|
|
97
|
+
front = back = ""
|
|
98
|
+
inner = render_widget_tml
|
|
99
|
+
inner = block_value.to_s if inner.blank?
|
|
100
|
+
inner.strip!
|
|
101
|
+
if name.nil?
|
|
102
|
+
inner
|
|
103
|
+
else
|
|
104
|
+
front = "<#{name}"
|
|
105
|
+
attrs = {}
|
|
106
|
+
attributes.each { |k,v| attrs[k] = v unless drop_empty_attributes and v.blank? }
|
|
107
|
+
attrs = ((attrs.respond_to? :to_xml_params) ? attrs.to_xml_params : attrs.to_s)
|
|
108
|
+
front.concat " #{attrs}" unless attrs.blank?
|
|
109
|
+
if inner.blank?
|
|
110
|
+
front.concat " />"
|
|
111
|
+
return front
|
|
112
|
+
else
|
|
113
|
+
front.concat ">"
|
|
114
|
+
back = "</#{name}>"
|
|
115
|
+
front + "\n" +
|
|
116
|
+
inner.indent + "\n" +
|
|
117
|
+
back
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
end
|
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
module Rtml
|
|
2
|
+
module Widgets
|
|
3
|
+
class EmvSupportWidget < Rtml::Widgets::Widget
|
|
4
|
+
property :swipe_card_prompt
|
|
5
|
+
property :baddata
|
|
6
|
+
property :entry_point
|
|
7
|
+
property :exit_point
|
|
8
|
+
property :on_error
|
|
9
|
+
property :on_cancel
|
|
10
|
+
property :on_abort
|
|
11
|
+
property :on_reject
|
|
12
|
+
|
|
13
|
+
accessor TMLDocument
|
|
14
|
+
accessor_alias :supports_emv
|
|
15
|
+
|
|
16
|
+
def init_properties #:nodoc:
|
|
17
|
+
entry_point :required
|
|
18
|
+
exit_point :required
|
|
19
|
+
on_error 'emv_error'
|
|
20
|
+
on_cancel ((parent.default_screen.blank?) ? url_for(:action => params[:action]) : parent.default_screen)
|
|
21
|
+
on_abort 'emv_abort'
|
|
22
|
+
on_reject 'emv_reject'
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Sets up EMV support (this must happen after initialization, but prior to rendering)
|
|
26
|
+
def after_initialize
|
|
27
|
+
build_emv_support
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Returns the names of all TML variables defined and used by this Widget
|
|
31
|
+
def emv_variables
|
|
32
|
+
emv_string_variables + emv_integer_variables
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Returns the names of all TML String variables defined and used by this Widget
|
|
36
|
+
def emv_string_variables
|
|
37
|
+
[:txt_cvm, :app_item, :app_sel_mode, :app, :aid, :app_status, :sep,
|
|
38
|
+
:selection_list, :selected_item, :txn_aid, :txn_app].collect { |s| "emv.#{s}" }
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns the names of all TML Integer variables defined and used by this Widget
|
|
42
|
+
def emv_integer_variables
|
|
43
|
+
[:index, :count].collect { |s| "emv.#{s}" }
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def to_tml #:nodoc:
|
|
47
|
+
''
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
private
|
|
51
|
+
def build_emv_support
|
|
52
|
+
doc = parent.document
|
|
53
|
+
doc.strings emv_string_variables
|
|
54
|
+
doc.integers emv_integer_variables
|
|
55
|
+
doc.screen entry_point, :emv_chk_apps
|
|
56
|
+
|
|
57
|
+
# Copy an application into the list of applications to be displayed
|
|
58
|
+
doc.concat <<-end_tml
|
|
59
|
+
<screen id="emv_copy_app" next="#emv_copyapp2">
|
|
60
|
+
<setvar name="emv.app" lo="tmlvar:card.emv.app_list" op="item" ro="tmlvar:emv.index" />
|
|
61
|
+
<strtemplate name="emv.app_item" format="%1%2: %3">
|
|
62
|
+
<getvar name="emv.sep" />
|
|
63
|
+
<getvar name="emv.index" format="^00" />
|
|
64
|
+
<getvar name="emv.app" />
|
|
65
|
+
</strtemplate>
|
|
66
|
+
</screen>
|
|
67
|
+
end_tml
|
|
68
|
+
|
|
69
|
+
doc.screen :emv_error, doc.default_screen do |scr|
|
|
70
|
+
scr.display " EMV ERROR: #{data_dump}"
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
doc.screen :emv_abort, doc.default_screen do |scr| scr.display " TRANSACTION ABORTED " end
|
|
74
|
+
doc.screen :emv_reject, doc.default_screen do |scr| scr.display " TRANSACTION REJECTED " end
|
|
75
|
+
|
|
76
|
+
# If card requires cardholder confirmation, display the list
|
|
77
|
+
# else, check if there are several applications or only a single one
|
|
78
|
+
doc.screen :emv_chk_apps do |scr|
|
|
79
|
+
scr.set 'emv.count', :lo => 'tmlvar:card.emv.app_status_list', :op => 'number'
|
|
80
|
+
scr.assert :emv_app_manl, :if => 'tmlvar:card.emv.selected_app == manual'
|
|
81
|
+
scr.assert :emv_chk_mult, :if => 'tmlvar:card.emv.selected_app == '
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Check if there are several applications or only a single one.
|
|
85
|
+
# If there are several applications, display the list for manual selection,
|
|
86
|
+
# even if not required (best practice)
|
|
87
|
+
# If there is only a single one, try to select it automatically
|
|
88
|
+
doc.screen :emv_chk_mult, :next => :emv_app_manl do |scr|
|
|
89
|
+
scr.next_screen :emv_app_auto, :if => "tmlvar:emv.count == 1"
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Enable automatic application selection
|
|
93
|
+
doc.screen :emv_app_auto, :next => :emv_final do |scr|
|
|
94
|
+
scr.set 'emv.txn_app', :to => "tmlvar:card.emv.app_list"
|
|
95
|
+
scr.set 'emv.app_sel_mode', :to => "auto"
|
|
96
|
+
scr.set "card.emv.selected_app", :to => ""
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Enable cardholder manual application selection
|
|
100
|
+
doc.screen :emv_app_manl, :timeout => 1 do |scr|
|
|
101
|
+
scr.set 'emv.app_sel_mode', :to => 'manual'
|
|
102
|
+
scr.assert :emv_prep_lst, :if => ['card.emv.app_list', '!=', '']
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Build an application list for user selection
|
|
106
|
+
doc.screen :emv_prep_lst do |scr|
|
|
107
|
+
scr.set [ 'emv.sep', 'card.emv.app_list', 'card.emv.aid_list', 'emv.selection_list' ], :to => ''
|
|
108
|
+
scr.set 'emv.index' => 0
|
|
109
|
+
scr.set 'emv.count', :lo => 'tmlvar:card.emv.app_status_list', :op => 'number'
|
|
110
|
+
scr.assert :emv_chk_stat, :if => "tmlvar:emv.count >= 0"
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Copy the active applications into the list to be displayed; inactive apps are skipped.
|
|
114
|
+
doc.screen :emv_chk_stat do |scr|
|
|
115
|
+
scr.set 'emv.app_status' => %W"tmlvar:card.emv.app_status_list item tmlvar:emv.index"
|
|
116
|
+
scr.assert :emv_copy_app, :if => 'tmlvar:emv.app_status == active'
|
|
117
|
+
scr.assert :emv_loop_app, :if => 'tmlvar:emv.app_status == inactive'
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
doc.screen :emv_copyapp2, :next => :emv_loop_app do |scr|
|
|
121
|
+
scr.set 'emv.selection_list' => 'tmlvar:emv.selection_list + tmlvar:emv.app_item'
|
|
122
|
+
scr.set 'emv.app' => 'tmlvar:emv.sep + tmlvar:emv.app'
|
|
123
|
+
scr.set 'card.emv.app_list' => 'tmlvar:card.emv.app_list + tmlvar:emv.app'
|
|
124
|
+
scr.set 'emv.aid' => %W'tmlvar:card.emv.aid_list item tmlvar:emv.index'
|
|
125
|
+
scr.set 'emv.aid' => 'tmlvar:emv.sep + tmlvar:emv.aid'
|
|
126
|
+
scr.set 'card.emv.aid_list' => 'tmlvar:card.emv.aid_list + tmlvar:emv.aid'
|
|
127
|
+
scr.set 'emv.sep' => ';'
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Increment the index for the app status check process
|
|
131
|
+
doc.screen :emv_loop_app, :next => :emv_chk_stat do |scr|
|
|
132
|
+
scr.set 'emv.index' => 'tmlvar:emv.index + 1'
|
|
133
|
+
scr.next_screen :emv_sel_1st, :if => 'tmlvar:emv.index == tmlvar:emv.count'
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Check whether the list of available apps is empty or not
|
|
137
|
+
doc.screen :emv_sel_1st, :next => :emv_rej_noap do |scr|
|
|
138
|
+
scr.set 'emv.count', :lo => 'tmlvar:card.emv.app_list', :op => 'number'
|
|
139
|
+
scr.next_screen :emv_show_lst, :if => 'tmlvar:emv.count >= 0'
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# If no applications are active, abort the transaction
|
|
143
|
+
doc.screen :emv_rej_noap, :next => on_reject do |scr|
|
|
144
|
+
scr.display "All applications are inactive.<br/>Transaction will be rejected."
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Show the list of available applications for cardholder selection
|
|
148
|
+
doc.screen :emv_show_lst, :on_cancel => on_cancel do |scr|
|
|
149
|
+
scr.set 'emv.selected_item' => %W"tmlvar:emv.selection_list item 0"
|
|
150
|
+
scr.assert :emv_sel_aid1, :if => ["tmlvar:emv.selected_item","!=",""]
|
|
151
|
+
scr.display <<-end_tml
|
|
152
|
+
<form>
|
|
153
|
+
<div class="title"><span class="title">Select ICC Application:</span></div>
|
|
154
|
+
<div class="menu">
|
|
155
|
+
<input type="list" name="emv.selected_item"
|
|
156
|
+
value="tmlvar:emv.selection_list"
|
|
157
|
+
rows="4" width="100%" multiple="no" />
|
|
158
|
+
</div>
|
|
159
|
+
</form>
|
|
160
|
+
end_tml
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Based on cardholder selection, fill the card.emv.selected_aid variable
|
|
164
|
+
doc.screen :emv_sel_aid1, :on_cancel => on_cancel, :timeout => 1 do |scr|
|
|
165
|
+
scr.set 'emv.selected_item', :lo => "tmlvar:emv.selected_item", :op => :format, :format => :nn
|
|
166
|
+
scr.set 'emv.index' => "tmlvar:emv.selected_item"
|
|
167
|
+
scr.set "card.emv.selected_app" => ""
|
|
168
|
+
scr.set "card.emv.selected_aid" => %W(tmlvar:card.emv.aid_list item tmlvar:emv.index)
|
|
169
|
+
scr.set "emv.txn_aid" => "tmlvar:card.emv.selected_aid"
|
|
170
|
+
scr.set "emv.txn_app" => %W"tmlvar:card.emv.app_list item tmlvar:emv.index"
|
|
171
|
+
scr.assert :emv_final, :if => ["tmlvar:card.emv.selected_aid", "!=", ""]
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Final application selection and initialization after application auto/manual choice
|
|
175
|
+
doc.screen :emv_final, :next => :emv_chk_resl do |scr|
|
|
176
|
+
scr.card :parser => :icc_emv, :params => :final_select do |p|
|
|
177
|
+
p.baddata "EMV Failure during Final Select: #{data_dump}" do |b|
|
|
178
|
+
b.max 1
|
|
179
|
+
b.next_screen on_abort
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# Ensure the final selection was OK. If not, the application list will be re-displayed
|
|
185
|
+
# If application selection was OK, go to PIN check
|
|
186
|
+
# Else, try to select another one
|
|
187
|
+
doc.screen :emv_chk_resl, :next => :emv_get_cvm do |scr|
|
|
188
|
+
scr.next :emv_dsp_sfld, :if => "tmlvar:err.code.low == -32817"
|
|
189
|
+
scr.next :emv_dsp_sfld, :if => "tmlvar:err.code.low == -4380"
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Can be used to safely cancel an EMV transaction. Not normally required.
|
|
193
|
+
doc.screen :emv_cncltran, :next => :emv_dspcncl do |scr|
|
|
194
|
+
scr.card :parser => :icc_emv, :params => :cancel do |c|
|
|
195
|
+
c.baddata "<getvar name='err.baddata_reason' />", :max => 1, :next => on_abort
|
|
196
|
+
end
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
doc.screen :emv_dspcncl, :next => on_cancel do |scr|
|
|
200
|
+
scr.display %Q`The transaction has been canceled.<br/>
|
|
201
|
+
Cardholder name: <getvar name='card.cardholder_name' /><br/>
|
|
202
|
+
AAC: <getvar name='card.emv.aac' />`
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# If final application selection failed, prompt the cardholder for another
|
|
206
|
+
# application selection if a list was previously displayed
|
|
207
|
+
doc.screen :emv_dsp_sfld, :next => :emv_app_auto do |scr|
|
|
208
|
+
scr.next_screen :emv_app_manl, :if => "tmlvar:emv.app_sel_mode == manual"
|
|
209
|
+
scr.display "EMV Failure during Application Selection:#{data_dump}<br/>" +
|
|
210
|
+
"app: <getvar name='card.emv.app_list' /><br/>" +
|
|
211
|
+
"status: <getvar name='card.emv.app_status_list' /><br/>"
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# analyzes card verification method
|
|
215
|
+
doc.screen :emv_get_cvm, :next => :emv_chksign do |scr|
|
|
216
|
+
scr.card :parser => :icc_emv, :params => :get_cvm do |c|
|
|
217
|
+
c.baddata "EMV Failure during Card Verification: #{data_dump}" do |b|
|
|
218
|
+
b.max 1
|
|
219
|
+
b.next_screen on_abort
|
|
220
|
+
end
|
|
221
|
+
end
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
doc.screen :emv_chksign, :next => :emv_chkcvm do |scr|
|
|
225
|
+
scr.set 'emv.txt_cvm' => ''
|
|
226
|
+
scr.next_screen :emv_set_sign, :if => "tmlvar:card.emv.signature == 1"
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
doc.screen :emv_set_sign, :next => :emv_chkcvm do |scr|
|
|
230
|
+
scr.set 'emv.txt_cvm' => " + SIGNATURE"
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
doc.screen :emv_chkcvm do |scr|
|
|
234
|
+
scr.assert
|
|
235
|
+
scr.variants "tmlvar:card.parser.verdict == reject" => on_reject,
|
|
236
|
+
"tmlvar:card.parser.cvm == pin" => :emv_pin,
|
|
237
|
+
"tmlvar:card.parser.cvm == pin_online" => :emv_skip_cvm,
|
|
238
|
+
"tmlvar:card.parser.cvm == no_cv" => :emv_cv_no_cv,
|
|
239
|
+
"tmlvar:card.parser.cvm == " => :emv_rsk_mgmt
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
doc.screen :emv_cv_no_cv, :next => :emv_get_cvm, :timeout => 1 do |scr|
|
|
243
|
+
scr.set 'card.parser.cvr', :to => 'ok'
|
|
244
|
+
scr.display "NO CVM <getvar name='emv.txt_cvm' />"
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
doc.screen :emv_skip_cvm, :emv_get_cvm do |scr| scr.set 'card.parser.cvr' => :bypassed end
|
|
248
|
+
|
|
249
|
+
doc.screen :emv_pin, :on_cancel => :emv_no_pin, :assert => nil do |scr|
|
|
250
|
+
scr.variants "tmlvar:card.emv.last_attempt == 0" => :emv_enterpin,
|
|
251
|
+
"tmlvar:card.emv.last_attempt == 1" => :emv_pin_last
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
doc.screen :emv_enterpin, :on_cancel => :emv_no_pin, :next => :emv_chk_pin do |scr|
|
|
255
|
+
scr.concat(%Q`
|
|
256
|
+
<tform>
|
|
257
|
+
<baddata max='1' next='#{on_abort}'>
|
|
258
|
+
#{(layout ? (layout.to_tml { "<getvar name='err.baddata_reason'/>" }) : "<getvar name='err.baddata_reason'/>")}
|
|
259
|
+
</baddata>
|
|
260
|
+
<!--calls SSA for secure PIN entry-->
|
|
261
|
+
<pinentry type='icc' prompt='Enter PIN' />
|
|
262
|
+
</tform>
|
|
263
|
+
`) #/
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
doc.screen :emv_no_pin, :emv_get_cvm do |scr| scr.set "card.parser.cvr" => "failed" end
|
|
267
|
+
doc.screen :emv_pin_last, :timeout => 3, :on_cancel => :emv_no_pin, :next => :emv_enterpin do |scr|
|
|
268
|
+
display "Last Try."
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
# Verify PIN
|
|
272
|
+
doc.screen :emv_chk_pin, :assert do |scr|
|
|
273
|
+
scr.variants "tmlvar:card.parser.verdict == reject" => on_reject,
|
|
274
|
+
"tmlvar:card.parser.cvr == ok" => :emv_get_cvm,
|
|
275
|
+
"tmlvar:card.parser.cvr == ok_msg" => :emv_pin_ok,
|
|
276
|
+
"tmlvar:card.parser.cvr == failed" => :emv_pin_bad,
|
|
277
|
+
"tmlvar:card.parser.cvr == pin_tries" => :emv_pin_bad
|
|
278
|
+
scr.card :parser => :icc_emv, :params => :verify do |p|
|
|
279
|
+
p.baddata '<getvar name="err.baddata_reason" />' do |b|
|
|
280
|
+
b.max 1
|
|
281
|
+
b.next_screen on_abort
|
|
282
|
+
end
|
|
283
|
+
end
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
# Notifies user that s/he has entered correct PIN
|
|
287
|
+
doc.screen :emv_pin_ok, :next => :emv_get_cvm, :on_cancel => :emv_get_cvm do end
|
|
288
|
+
# Notifies user that s/he has entered incorrect PIN
|
|
289
|
+
doc.screen :emv_pin_bad, :timeout => 1, :on_cancel => :emv_get_cvm, :next => :assert do |scr|
|
|
290
|
+
scr.variants "tmlvar:card.parser.cvr == failed" => :emv_pin,
|
|
291
|
+
"tmlvar:card.parser.cvr == pin_tries" => :emv_get_cvm
|
|
292
|
+
scr.display "Incorrect PIN"
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
# Performs risk management.
|
|
296
|
+
# The "icc_emv" parser will:
|
|
297
|
+
# 1. Analyze amount and transaction type;
|
|
298
|
+
# 2. Analyze previous submission attempt ("oebr.econn" value);
|
|
299
|
+
# 3. Update "card.parser.verdict" variable;
|
|
300
|
+
# 4. Fill "card.parser.reject_reason" variable, if necessary.
|
|
301
|
+
doc.screen :emv_rsk_mgmt, :emv_verdict do |scr|
|
|
302
|
+
scr.set "emv.txn_aid" => "tmlvar:card.emv.aid"
|
|
303
|
+
scr.card :parser => :icc_emv, :params => :risk_mgmt do |c|
|
|
304
|
+
c.baddata "EMV Failure during Risk Management: #{data_dump}" do |b|
|
|
305
|
+
b.max 1
|
|
306
|
+
b.next_screen on_abort
|
|
307
|
+
end
|
|
308
|
+
end
|
|
309
|
+
end
|
|
310
|
+
|
|
311
|
+
doc.screen :emv_verdict, :assert do |scr|
|
|
312
|
+
scr.set 'oebr.submit_mode' => 'tmlvar:card.parser.verdict'
|
|
313
|
+
scr.variants "tmlvar:card.parser.verdict == reject" => :emv_off_rej,
|
|
314
|
+
"tmlvar:card.parser.verdict == offline" => :emv_off_comp,
|
|
315
|
+
"tmlvar:card.parser.verdict == online" => :emv_submit
|
|
316
|
+
end
|
|
317
|
+
|
|
318
|
+
doc.screen :emv_off_rej, :next => on_abort, :timeout => 1 do |scr| scr.display " REJECTED " end
|
|
319
|
+
doc.screen :emv_off_comp, :next => :emv_submit, :timeout => 1 do |scr| scr.display " TRANSACTION PROCESSED OFFLINE " end
|
|
320
|
+
|
|
321
|
+
# Submits transaction data to host
|
|
322
|
+
doc.screen :emv_submit, exit_point do |scr| end
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
# doc.screen :emv_submit, on_error do |scr|
|
|
326
|
+
# scr.set 'card.expiry_date' => '2010/12/31',
|
|
327
|
+
# 'oebr.submit_mode' => 'tmlvar:card.parser.verdict'
|
|
328
|
+
# scr.submit :target => submit_to, :on_error => :emv_sub_fail do |sub|
|
|
329
|
+
# sub.get_variables :transid
|
|
330
|
+
# end
|
|
331
|
+
# end
|
|
332
|
+
|
|
333
|
+
# Host is unreachable
|
|
334
|
+
# doc.screen :emv_sub_fail, :assert do
|
|
335
|
+
# variants "tmlvar:oebr.submit_mode == online" => :emv_fld_onln,
|
|
336
|
+
# "tmlvar:oebr.submit_mode == offline"=> :emv_fld_ofln
|
|
337
|
+
# end
|
|
338
|
+
|
|
339
|
+
# doc.screen :emv_fld_onln, :next => :emv_rsk_mgmt, :timeout => 2 do |scr| scr.display " HOST IS UNREACHABLE " end
|
|
340
|
+
# doc.screen :emv_fld_ofln, :next => :emv_off_rej, :timeout => 2 do |scr|
|
|
341
|
+
# scr.display " OFFLINE TRANSACTION POOL IS FULL "
|
|
342
|
+
# end
|
|
343
|
+
|
|
344
|
+
# doc.screen :emv_tc_aac, :on_cancel => on_cancel, :next => void do |scr|
|
|
345
|
+
# scr.set 'oebr.submit_mode' => 'offline'
|
|
346
|
+
# scr.next_screen receipt, :if => 'tmlvar:card.emv.tc != '
|
|
347
|
+
# scr.submit :target => auth_icc_2, :on_error => exit_point do |sub|
|
|
348
|
+
# sub.get_variables 'card.emv.aac', 'card.emv.tc', 'transid'
|
|
349
|
+
# end
|
|
350
|
+
# end
|
|
351
|
+
end
|
|
352
|
+
|
|
353
|
+
# def auth_icc_2
|
|
354
|
+
# url_for(:action => "auth_icc_2")
|
|
355
|
+
# end
|
|
356
|
+
|
|
357
|
+
def data_dump
|
|
358
|
+
%Q`<getvar name="err.baddata_reason" /><br/><br/>
|
|
359
|
+
err.high = <getvar name="err.code.high" /><br/>
|
|
360
|
+
err.low = <getvar name="err.code.low" /><br/>
|
|
361
|
+
card.emv.apdu_list: <getvar name="card.emv.apdu_list" />`
|
|
362
|
+
end
|
|
363
|
+
end
|
|
364
|
+
end
|
|
365
|
+
end
|