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,72 @@
|
|
1
|
+
module BerylHelper
|
2
|
+
def integer_as_currency(integer)
|
3
|
+
integer = integer.to_i unless integer.kind_of? Fixnum
|
4
|
+
decimal = integer / 100.0
|
5
|
+
decimal = "#{decimal}0" if decimal.to_s =~ /\..$/
|
6
|
+
"$#{decimal}"
|
7
|
+
end
|
8
|
+
|
9
|
+
def tid_for_transaction(trans)
|
10
|
+
if trans.hidden_data
|
11
|
+
trans.hidden_data[:tid] || state[:itid] || params[:itid]
|
12
|
+
else
|
13
|
+
state[:itid] || params[:itid]
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def receipt_text(content)
|
18
|
+
if content.kind_of? Hash
|
19
|
+
controller.rtml_interface.content_of_view(content)
|
20
|
+
else
|
21
|
+
content.to_s.gsub(/\n/, '<br/>')
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def left(r=nil, b=nil, &block)
|
26
|
+
align("left", r, b, &block)
|
27
|
+
end
|
28
|
+
|
29
|
+
def right(r=nil, b=nil, &block)
|
30
|
+
align("right", r, b, &block)
|
31
|
+
end
|
32
|
+
|
33
|
+
def align(a, r=nil, b=nil, &block)
|
34
|
+
b, r = r, b if r.kind_of?(Symbol)
|
35
|
+
c = case b
|
36
|
+
when :bold then " class='bold'"
|
37
|
+
when :small then " class='small'"
|
38
|
+
else ''
|
39
|
+
end
|
40
|
+
"<td align='#{a}'#{c}>#{r || yield}</td>"
|
41
|
+
end
|
42
|
+
|
43
|
+
def payment_keys
|
44
|
+
(((@transaction.payment_order.empty?) ?
|
45
|
+
@transaction.payment_data.keys :
|
46
|
+
@transaction.payment_order % @transaction.payment_data.keys) -
|
47
|
+
@transaction.payment_data.keys.select { |k| @transaction.payment_data[k].nil? })
|
48
|
+
end
|
49
|
+
|
50
|
+
def payment_value(key)
|
51
|
+
value = @transaction.payment_data[key]
|
52
|
+
# special cases
|
53
|
+
value = if value.kind_of?(Symbol) && @transaction.respond_to?(value)
|
54
|
+
@transaction.send(value)
|
55
|
+
elsif value.kind_of?(Proc)
|
56
|
+
value.call(@transaction)
|
57
|
+
else
|
58
|
+
value
|
59
|
+
end
|
60
|
+
|
61
|
+
# if value.blank?
|
62
|
+
# case key
|
63
|
+
# when :cashback, 'cashback'
|
64
|
+
# value = @transaction.amount_other
|
65
|
+
# when :total, 'total'
|
66
|
+
# value = (@transaction.amount.blank? ? 0 : @transaction.amount) +
|
67
|
+
# (@transaction.amount_other.blank? ? 0 : @transaction.amount_other)
|
68
|
+
# end
|
69
|
+
# end
|
70
|
+
value
|
71
|
+
end
|
72
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
Rtml.actions_for BerylController do
|
2
|
+
def auth_result
|
3
|
+
includes tml_stylesheet
|
4
|
+
layout tml_layout
|
5
|
+
allow_cache false
|
6
|
+
default_screen :result
|
7
|
+
string :owner => 'MERCHANT'
|
8
|
+
string :after_receipt => 'another_receipt'
|
9
|
+
string :signature_line => ''
|
10
|
+
|
11
|
+
void = url_for(:action => "index", :only_path => true)
|
12
|
+
|
13
|
+
#receipt = url_for(:action => "receipt", :only_path => true)
|
14
|
+
#void = url_for(:action => "index", :anchor => :void_trans, :only_path => true)
|
15
|
+
|
16
|
+
unless @transaction.auth_code.nil?
|
17
|
+
screen :result, :next => :receipt, :timeout => 3 do
|
18
|
+
timeout nil if @duplicate
|
19
|
+
set :owner => 'MERCHANT'
|
20
|
+
set :after_receipt => '#another_rcpt'
|
21
|
+
if controller.params[:transaction_type].to_s.downcase == 'debit'
|
22
|
+
set :signature_line => ''
|
23
|
+
else
|
24
|
+
set :signature_line => 'X__________________________'
|
25
|
+
end
|
26
|
+
|
27
|
+
display "Transaction Approved<br/>Auth Code: #{@transaction.auth_code}"
|
28
|
+
end
|
29
|
+
|
30
|
+
receipt :receipt, :next => 'tmlvar:after_receipt' do
|
31
|
+
display
|
32
|
+
end
|
33
|
+
|
34
|
+
screen :another_rcpt do
|
35
|
+
set :after_receipt => "#complete"
|
36
|
+
set :signature_line => ''
|
37
|
+
set :owner => 'CUSTOMER'
|
38
|
+
display
|
39
|
+
end
|
40
|
+
|
41
|
+
screen :complete, :next => (@transaction.hidden_data[:after_receipt] ||
|
42
|
+
url_for(:action => "index", :only_path => true))
|
43
|
+
else
|
44
|
+
screen :result, :next => :complete do
|
45
|
+
#set "decline_reason", :to => @transaction.message.to_s
|
46
|
+
code = @transaction.hidden_data
|
47
|
+
code = code[:response_code] if code
|
48
|
+
errmsg = "Transaction Declined"
|
49
|
+
errmsg = @transaction.hidden_data[:error_message] if @transaction.hidden_data and @transaction.hidden_data[:error_message]
|
50
|
+
display "#{errmsg}<br/>#{code} - #{@transaction.message}"
|
51
|
+
end
|
52
|
+
|
53
|
+
screen :complete, :next => void
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
Rtml.actions_for BerylController do
|
2
|
+
hide_action :tml_layout, :tml_stylesheet
|
3
|
+
|
4
|
+
def build_menu
|
5
|
+
super
|
6
|
+
# examples:
|
7
|
+
# menu_item :sale
|
8
|
+
# menu_item :refund
|
9
|
+
# menu_item :sale_with_cashback, :next_screen => :sale_cb, :position => 1
|
10
|
+
end
|
11
|
+
|
12
|
+
def tml_layout
|
13
|
+
File.join("rtml", "/beryl_#{color_display? ? "color" : "mono"}")
|
14
|
+
end
|
15
|
+
|
16
|
+
def tml_stylesheet
|
17
|
+
File.join("/stylesheets/rtml", "/beryl_#{color_display? ? "color" : "mono"}.css")
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,82 @@
|
|
1
|
+
Rtml.actions_for BerylController do
|
2
|
+
def index
|
3
|
+
controller.expires_at { 8.hours.from_now }
|
4
|
+
|
5
|
+
on :cancel => :idle
|
6
|
+
default_screen :init
|
7
|
+
cache true
|
8
|
+
layout tml_layout
|
9
|
+
includes tml_stylesheet
|
10
|
+
if request.headers['REQUEST_URI'] != url_for(:action => 'index', :only_path => false)
|
11
|
+
includes url_for(:action => 'index')
|
12
|
+
end
|
13
|
+
add_features!
|
14
|
+
|
15
|
+
screen :init, features.init(self, :idle) do
|
16
|
+
end
|
17
|
+
|
18
|
+
screen :idle, :next => :enter_amount do |scr|
|
19
|
+
avs_screen = ((feature_config.sale.address_verification > 0) ? :avs_zip : :submit_data)
|
20
|
+
scr.set 'submit_to' => url_for(:action => 'sale')
|
21
|
+
scr.set 'title' => ['tmlvar:transaction_type', '+', ' Sale']
|
22
|
+
scr.set 'screens.after_swipe' => '#enter_amount',
|
23
|
+
'screens.emv.exit_point' => avs_screen.to_screen_ref
|
24
|
+
scr.set 'confirm.accept' => avs_screen.to_screen_ref
|
25
|
+
scr.set 'confirm.reject' => '#enter_amount'
|
26
|
+
scr.on :menu => :main_menu, :cancel => :idle
|
27
|
+
scr.on :f3 => :main_menu
|
28
|
+
scr.layout nil
|
29
|
+
|
30
|
+
scr.build :tform do |tform|
|
31
|
+
tform.baddata :max => 3, :next => :idle.to_screen_ref do
|
32
|
+
table :border => 2, :class => 'warning' do; tr { td { span { getvar :name => 'err.baddata_reason' } } } end
|
33
|
+
end
|
34
|
+
tform.build :name => :card, :parser => 'mag', :parser_params => 'read_data'
|
35
|
+
if controller.feature_config.common.emv_support
|
36
|
+
tform.build :name => :card, :parser => 'icc_emv', :parser_params => 'init_app'
|
37
|
+
end
|
38
|
+
tform.prompt do |prompt| prompt.display end
|
39
|
+
end
|
40
|
+
#scr.display
|
41
|
+
end
|
42
|
+
|
43
|
+
screen :main_menu, embedded_app do
|
44
|
+
on 1 => :menu_credit, # CREDIT CARD
|
45
|
+
2 => :menu_debit, # DEBIT CARD
|
46
|
+
# 3 => :construction, # EBT
|
47
|
+
# 4 => :construction, # REPRINT
|
48
|
+
# 5 => :construction, # REPORTS
|
49
|
+
# 6 => :construction, # SETTLE
|
50
|
+
0 => embedded_app,
|
51
|
+
'menu' => :admin
|
52
|
+
set :title => "Main Menu"
|
53
|
+
display
|
54
|
+
end
|
55
|
+
|
56
|
+
screen :admin, :on_cancel => :main_menu do
|
57
|
+
on 1 => :about, 2 => embedded_app
|
58
|
+
display
|
59
|
+
end
|
60
|
+
|
61
|
+
screen :about, :admin do
|
62
|
+
on :cancel => :admin
|
63
|
+
layout nil
|
64
|
+
display
|
65
|
+
end
|
66
|
+
|
67
|
+
for scrn in ['credit', 'debit']
|
68
|
+
screen "menu_#{scrn}" do |scr|
|
69
|
+
scr.on :cancel => :main_menu
|
70
|
+
scr.assert
|
71
|
+
if scrn == 'debit'
|
72
|
+
only = { :only => [ :sale, :return ] }
|
73
|
+
scr.on feature_events(only) unless feature_events(only).empty?
|
74
|
+
else scr.on feature_events unless feature_events.empty?
|
75
|
+
end
|
76
|
+
scr.set :transaction_type => scrn.to_s.titleize
|
77
|
+
scr.set :title => "#{scrn.titleize} Menu"
|
78
|
+
scr.display
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
Rtml.actions_for Rtml::MagcardDemoController do
|
2
|
+
# Don't turn these methods into Rails or RTML actions
|
3
|
+
hide_action :build_menu, :tml_layout, :tml_stylesheet
|
4
|
+
|
5
|
+
def build_menu
|
6
|
+
super
|
7
|
+
# examples:
|
8
|
+
# menu_item :sale
|
9
|
+
# menu_item :refund
|
10
|
+
# menu_item :sale_with_cashback, :next_screen => :sale_cb, :position => 1
|
11
|
+
end
|
12
|
+
|
13
|
+
def tml_layout
|
14
|
+
File.join("rtml", "/magcard_demo_#{color_display? ? "color" : "mono"}")
|
15
|
+
end
|
16
|
+
|
17
|
+
def tml_stylesheet
|
18
|
+
File.join("/stylesheets/rtml", "/magcard_demo_#{color_display? ? "color" : "mono"}.css")
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
Rtml::actions_for Rtml::MagcardDemoController do
|
2
|
+
def index
|
3
|
+
on :cancel => embedded_app
|
4
|
+
default_screen :init
|
5
|
+
layout tml_layout
|
6
|
+
includes :stylesheet, tml_stylesheet
|
7
|
+
|
8
|
+
screen :init, :next => :main do
|
9
|
+
set 'payment.amount' => 0
|
10
|
+
end
|
11
|
+
|
12
|
+
screen :main, :next => :enter_amount do
|
13
|
+
card :parser => :mag, :params => :read_data do
|
14
|
+
baddata :partial => 'error', :locals => { :message => 'Could not read card data!' }
|
15
|
+
prompt display
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
screen :enter_amount, :next => :send_data do
|
20
|
+
display
|
21
|
+
end
|
22
|
+
|
23
|
+
screen :send_data do
|
24
|
+
submit :target => url_for(:action => 'authorize'), :on_error => :submit_error do
|
25
|
+
get_transaction_variables # will automatically include all transaction-related TML variables
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
screen :submit_error, :next => :init do
|
30
|
+
display :partial => 'error', :locals => { :message => 'Could not submit data!' }
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
Rtml.actions_for Rtml::Oe::BtmlpaController do
|
2
|
+
def auth_result
|
3
|
+
includes tml_stylesheet
|
4
|
+
layout tml_layout
|
5
|
+
allow_cache false
|
6
|
+
|
7
|
+
@receipt = url_for(:action => "receipt", :anchor => :rcpt_start, :only_path => true)
|
8
|
+
@void = url_for(:action => "index", :anchor => :void_trans, :only_path => true)
|
9
|
+
|
10
|
+
unless @transaction.auth_code.nil?
|
11
|
+
# was approved
|
12
|
+
screen :result, :next => @receipt, :timeout => 1 do
|
13
|
+
set "payment.auth_code", :to => @transaction.auth_code.to_s
|
14
|
+
display "Transaction Approved<br/>Auth Code: #{@transaction.auth_code}"
|
15
|
+
end
|
16
|
+
else
|
17
|
+
screen :result, :next => @void, :timeout => 10 do
|
18
|
+
set "decline_reason", :to => @transaction.message.to_s
|
19
|
+
display "Transaction Declined<br/>#{@transaction.message}"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
Rtml.actions_for Rtml::Oe::BtmlpaController do
|
2
|
+
before_filter :build_menu
|
3
|
+
|
4
|
+
def build_menu
|
5
|
+
#super
|
6
|
+
menu_item :sale, :partial => 'menu_sale'
|
7
|
+
menu_item :sale_cashback, :partial => 'menu_sale_cashback'
|
8
|
+
menu_item :refund, :partial => 'menu_refund'
|
9
|
+
menu_item :reversal, :partial => 'menu_reversal'
|
10
|
+
menu_item :duplicate, :partial => 'menu_duplicate'
|
11
|
+
menu_item :examples, :partial => 'menu_examples'
|
12
|
+
menu_item :other, :partial => 'menu_other'
|
13
|
+
menu_item :about, :partial => 'menu_about'
|
14
|
+
end
|
15
|
+
|
16
|
+
def tml_layout
|
17
|
+
"rtml/oe/btmlpa_i#{color_display? ? "8550" : "5100"}"
|
18
|
+
end
|
19
|
+
|
20
|
+
def tml_stylesheet
|
21
|
+
"/stylesheets/rtml/oe/btmlpa/i#{color_display? ? "8550" : "5100"}.css"
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
Rtml.actions_for Rtml::Oe::BtmlpaController do
|
2
|
+
def dynamic
|
3
|
+
on :cancel => embedded_app
|
4
|
+
layout tml_layout
|
5
|
+
includes tml_stylesheet
|
6
|
+
|
7
|
+
screen :response, :next => url_for(:action => 'index', :anchor => @destination, :only_path => true), :timeout => 5 do
|
8
|
+
display @message.to_s
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,384 @@
|
|
1
|
+
Rtml.actions_for Rtml::Oe::BtmlpaController do
|
2
|
+
def icc
|
3
|
+
@assert = url_for :only_path => true, :action => :index, :anchor => :assert
|
4
|
+
@abort = url_for :only_path => true, :action => :index, :anchor => :trans_abrt
|
5
|
+
@index = url_for :only_path => true, :action => :index
|
6
|
+
@reject = url_for :only_path => true, :action => :index, :anchor => :reject_trans
|
7
|
+
@receipt = url_for :only_path => true, :action => :receipt #, :anchor => :rcpt_start #:receipt
|
8
|
+
@void = url_for :only_path => true, :action => :index, :anchor => :void_trans
|
9
|
+
@compl_txn = url_for :only_path => true, :action => :index, :anchor => :compl_txn
|
10
|
+
|
11
|
+
@data_dump = %Q`<getvar name="err.baddata_reason"/>
|
12
|
+
<br/>
|
13
|
+
<br/>
|
14
|
+
err.high = <getvar name="err.code.high"/> <br/>
|
15
|
+
err.low = <getvar name="err.code.low"/><br/>
|
16
|
+
card.emv.apdu_list: <getvar name="card.emv.apdu_list"/>`
|
17
|
+
|
18
|
+
on :cancel => :index, :error => :eror_scr
|
19
|
+
strings :txt_cvm, :app_item, :app_sel_mode, :app_list, :app, :aid, :app_status, :sep, :aid_list,
|
20
|
+
'btmlpa.emv.selection_list', 'btmlpa.emv.selected_item'
|
21
|
+
integers :index, :count
|
22
|
+
layout tml_layout
|
23
|
+
|
24
|
+
# Copy an application into the list of applications to be displayed
|
25
|
+
tml_document.concat <<-end_tml
|
26
|
+
<screen id="copy_app1" next="#copy_app2">
|
27
|
+
<setvar name="app" lo="tmlvar:card.emv.app_list" op="item" ro="tmlvar:index" />
|
28
|
+
<strtemplate name="app_item" format="%1%2: %3">
|
29
|
+
<getvar name="sep" />
|
30
|
+
<getvar name="index" format="^00" />
|
31
|
+
<getvar name="app" />
|
32
|
+
</strtemplate>
|
33
|
+
</screen>
|
34
|
+
end_tml
|
35
|
+
|
36
|
+
multiple_screens do
|
37
|
+
# If card requires cardholder confirmation, display the list
|
38
|
+
# else, check if there are several applications or only a single one
|
39
|
+
check_apps :next => @assert do
|
40
|
+
set :count, :lo => "tmlvar:card.emv.app_status_list", :op => "number"
|
41
|
+
next_screen :man_app_sel, :if => "tmlvar:card.emv.selected_app == manual"
|
42
|
+
next_screen :chk_multi, :if => ["tmlvar:card.emv.selected_app", "==", ""]
|
43
|
+
end
|
44
|
+
|
45
|
+
# Check if there are several applications or only a single one.
|
46
|
+
# If there are several applications, display the list for manual selection, even if not required (best practice)
|
47
|
+
# If there is only a single one, try to select it automatically
|
48
|
+
chk_multi :next => :man_app_sel do
|
49
|
+
next_screen :auto_app_sel, :if => "tmlvar:count == 1"
|
50
|
+
end
|
51
|
+
|
52
|
+
# Enable automatic application selection
|
53
|
+
auto_app_sel :next => :final_select, :timeout => 1 do
|
54
|
+
set 'btmlpa.emv.txn_app', :to => "tmlvar:card.emv.app_list"
|
55
|
+
set :app_sel_mode, :to => "auto"
|
56
|
+
set "card.emv.selected_app", :to => ""
|
57
|
+
display "Auto Selection"
|
58
|
+
end
|
59
|
+
|
60
|
+
# Enable cardholder manual application selection
|
61
|
+
man_app_sel :next => @assert, :timeout => 1 do
|
62
|
+
set :app_sel_mode, :to => 'manual'
|
63
|
+
next_screen :prepare_list, :if => ["card.emv.app_list", "!=", ""]
|
64
|
+
display "Manual Selection"
|
65
|
+
end
|
66
|
+
|
67
|
+
# Building an application list for user selection
|
68
|
+
prepare_list :next => @assert do
|
69
|
+
set [ :sep, :app_list, :aid_list, "btmlpa.emv.selection_list" ], :to => ""
|
70
|
+
set :index, :to => 0
|
71
|
+
set :count, :lo => "tmlvar:card.emv.app_status_list", :op => "number"
|
72
|
+
next_screen :check_status, :if => "tmlvar:count >= 0"
|
73
|
+
end
|
74
|
+
|
75
|
+
# Copy the active applications into the list to be displayed. Inactive applications
|
76
|
+
# are just skipped.
|
77
|
+
check_status :next => @assert do
|
78
|
+
set :app_status, :to => ["tmlvar:card.emv.app_status_list", "item", "tmlvar:index"]
|
79
|
+
next_screen :copy_app1, :if => "tmlvar:app_status == active"
|
80
|
+
next_screen :loop_app, :if => "tmlvar:app_status == inactive"
|
81
|
+
end
|
82
|
+
|
83
|
+
copy_app2 :next => :loop_app do
|
84
|
+
set "btmlpa.emv.selection_list", :to => "tmlvar:btmlpa.emv.selection_list + tmlvar:app_item"
|
85
|
+
set :app => "tmlvar:sep + tmlvar:app"
|
86
|
+
set :app_list => "tmlvar:app_list + tmlvar:app"
|
87
|
+
set :aid => %W(tmlvar:card.emv.aid_list item tmlvar:index)
|
88
|
+
set :aid => "tmlvar:sep + tmlvar:aid"
|
89
|
+
set :aid_list => "tmlvar:aid_list + tmlvar:aid"
|
90
|
+
set :sep => ";"
|
91
|
+
end
|
92
|
+
|
93
|
+
# Increment the index for application status check process
|
94
|
+
loop_app :next => :check_status do
|
95
|
+
set :index, :to => "tmlvar:index + 1"
|
96
|
+
next_screen :select_first, :if => "tmlvar:index == tmlvar:count"
|
97
|
+
end
|
98
|
+
|
99
|
+
# Check whether the list of available applications is empty or not
|
100
|
+
select_first :next => :rej_no_app do
|
101
|
+
set :count, :lo => "tmlvar:app_list", :op => "number"
|
102
|
+
next_screen :show_app_lst, :if => "tmlvar:count >= 0"
|
103
|
+
end
|
104
|
+
|
105
|
+
# If none of the applications are active, abort the transaction
|
106
|
+
rej_no_app :next => @abort do
|
107
|
+
display "All applications are inactive.<br/>Transaction will be rejected."
|
108
|
+
end
|
109
|
+
|
110
|
+
# Show the list of available applications for cardholder selection
|
111
|
+
show_app_lst :on_cancel => @abort do
|
112
|
+
set "btmlpa.emv.selected_item", :to => %W(tmlvar:btmlpa.emv.selection_list item 0)
|
113
|
+
next_screen @assert
|
114
|
+
next_screen :select_aid1, :if => ["tmlvar:btmlpa.emv.selected_item","!=",""]
|
115
|
+
display <<-end_tml
|
116
|
+
<form>
|
117
|
+
<div class="title"><span class="title">Select ICC Application:</span></div>
|
118
|
+
<div class="menu"><input type="list" name="btmlpa.emv.selected_item"
|
119
|
+
value="tmlvar:btmlpa.emv.selection_list"
|
120
|
+
rows="4" width="100%" multiple="no" /></div>
|
121
|
+
</form>
|
122
|
+
end_tml
|
123
|
+
end
|
124
|
+
|
125
|
+
# Based on cardholder selection, fill the card.emv.selected_aid
|
126
|
+
select_aid1 :on_cancel => @index, :timeout => 1 do
|
127
|
+
set 'btmlpa.emv.selected_item', :lo => "tmlvar:btmlpa.emv.selected_item",
|
128
|
+
:op => :format, :format => 'nn'
|
129
|
+
set :index, :to => "tmlvar:btmlpa.emv.selected_item"
|
130
|
+
set 'card.emv.selected_app' => ""
|
131
|
+
set 'card.emv.selected_aid' => %W(tmlvar:aid_list item tmlvar:index)
|
132
|
+
set 'btmlpa.emv.txn_aid' => "tmlvar:card.emv.selected_aid"
|
133
|
+
set 'btmlpa.emv.txn_app' => %W(tmlvar:app_list item tmlvar:index)
|
134
|
+
next_screen @assert
|
135
|
+
next_screen :final_select, :if => [ "tmlvar:card.emv.selected_aid", "!=", "" ]
|
136
|
+
display "<getvar name='btmlpa.emv.txn_app' /><br/><getvar name='btmlpa.emv.txn_aid' /><br/>"
|
137
|
+
end
|
138
|
+
|
139
|
+
# Final application selection and initialization after application auto/manual choice
|
140
|
+
final_select :next => :chk_resel do
|
141
|
+
card :parser => :icc_emv, :params => :final_select do
|
142
|
+
baddata "Fail 01: #{@data_dump}" do
|
143
|
+
max 1
|
144
|
+
next_screen @abort
|
145
|
+
end
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
# Ensure the final selection was OK. If not, the application list will be re-displayed
|
150
|
+
# If application selection was OK, go to PIN check
|
151
|
+
# Else, try to select another one
|
152
|
+
chk_resel :next => :icc_get_cvm do
|
153
|
+
next_screen :dsp_selfld, :if => "tmlvar:err.code.low == -32817"
|
154
|
+
next_screen :dsp_selfld, :if => "tmlvar:err.code.low == -4380"
|
155
|
+
end
|
156
|
+
|
157
|
+
###############################################
|
158
|
+
# These screens are not used by the BTMLPA. They can be used to safely cancel an initiated transaction.
|
159
|
+
# This can be used, for example, to read the customer name from an EMV card after the application selection,
|
160
|
+
# but to correctly stop the transaction from gouing further. This cancellation should not be required for
|
161
|
+
# normal EMV transaction.
|
162
|
+
cncltran :next => :dspcncl do
|
163
|
+
card :parser => :icc_emv, :params => :cancel do
|
164
|
+
baddata "<getvar name='err.baddata_reason' />", :max => 1, :next => @abort
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
|
+
dspcncl :next => @abort do
|
169
|
+
display %Q`
|
170
|
+
The transaction has been canceled.<br/>
|
171
|
+
Cardholder name = <getvar name='card.cardholder_name' /><br/>
|
172
|
+
AAC = <getvar name='card.emv.aac' />
|
173
|
+
`
|
174
|
+
end
|
175
|
+
###############################################
|
176
|
+
|
177
|
+
# If final application selection failed, prompt the cardholder for another
|
178
|
+
# application selection if a list was previously displayed
|
179
|
+
dsp_selfld :next => :auto_app_sel do
|
180
|
+
next_screen :man_app_sel, :if => "tmlvar:app_sel_mode == manual"
|
181
|
+
display %Q`
|
182
|
+
Fail 02:
|
183
|
+
#{@data_dump}<br/>
|
184
|
+
app: <getvar name="card.emv.app_list"/><br/>
|
185
|
+
status: <getvar name="card.emv.app_status_list"/>
|
186
|
+
`
|
187
|
+
end
|
188
|
+
|
189
|
+
# icc screen analyses card verification method
|
190
|
+
icc_get_cvm :next => :chksign do
|
191
|
+
card :parser => :icc_emv, :params => :get_cvm do
|
192
|
+
baddata "Fail 03: #{@data_dump}" do
|
193
|
+
max 1
|
194
|
+
next_screen @abort
|
195
|
+
end
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
199
|
+
chksign :next => :chkcvm do
|
200
|
+
set :txt_cvm, :to => ''
|
201
|
+
next_screen :set_sign, :if => "tmlvar:card.emv.signature == 1"
|
202
|
+
end
|
203
|
+
|
204
|
+
set_sign :next => :chkcvm do
|
205
|
+
set :txt_cvm, :lo => " + SIGNATURE"
|
206
|
+
end
|
207
|
+
|
208
|
+
chkcvm :next => @assert do
|
209
|
+
variants "tmlvar:card.parser.verdict == reject" => @reject,
|
210
|
+
"tmlvar:card.parser.cvm == pin" => :enter_pin,
|
211
|
+
"tmlvar:card.parser.cvm == pin_online" => :online_cvm,
|
212
|
+
"tmlvar:card.parser.cvm == no_cv" => :cv_no_cv,
|
213
|
+
"tmlvar:card.parser.cvm == " => :icc_rsk_mgmt
|
214
|
+
end
|
215
|
+
|
216
|
+
# Empty form, just to set the cvr
|
217
|
+
online_cvm :next => :bypass_cvm, :timeout => 1 do
|
218
|
+
display "ONLINE PIN <getvar name='txt_cvm' />"
|
219
|
+
end
|
220
|
+
|
221
|
+
bypass_cvm :next => :icc_get_cvm do
|
222
|
+
set 'card.parser.cvr', :to => 'bypassed'
|
223
|
+
end
|
224
|
+
|
225
|
+
cv_no_cv :next => :icc_get_cvm, :timeout => 1 do
|
226
|
+
set 'card.parser.cvr', :to => 'ok'
|
227
|
+
display "NO CVM <getvar name='txt_cvm' />"
|
228
|
+
end
|
229
|
+
|
230
|
+
enter_pin :on_cancel => :cvr_no_pin, :timeout => 1, :next => @assert do
|
231
|
+
next_screen :enterpin, :if => "tmlvar:card.emv.last_attempt == 0"
|
232
|
+
next_screen :enterpinlast, :if => "tmlvar:card.emv.last_attempt == 1"
|
233
|
+
display "Offline PIN <getvar name='txt_cvm' />"
|
234
|
+
end
|
235
|
+
|
236
|
+
# If user presses cancel, we should present him the next card verification method
|
237
|
+
enterpin :on_cancel => :cvr_no_pin, :next => :verify_pin do
|
238
|
+
concat <<-end_tml
|
239
|
+
<tform>
|
240
|
+
<baddata max="1" next="#{@abort}">
|
241
|
+
#{layout.to_tml { %Q`
|
242
|
+
<getvar name="err.baddata_reason"/><br/>
|
243
|
+
err.high = <getvar name="err.code.high"/> <br/>
|
244
|
+
err.low = <getvar name="err.code.low"/><br/>
|
245
|
+
`} }
|
246
|
+
</baddata>
|
247
|
+
<!-- calls SSA for secure PIN entry -->
|
248
|
+
<pinentry type="icc" prompt="Enter PIN" />
|
249
|
+
</tform>
|
250
|
+
end_tml
|
251
|
+
end
|
252
|
+
|
253
|
+
cvr_no_pin :next => :icc_get_cvm do
|
254
|
+
set "card.parser.cvr", :to => "failed"
|
255
|
+
end
|
256
|
+
|
257
|
+
enterpinlast :timeout => 3, :on_cancel => :cvr_no_pin, :next => :pinlast do
|
258
|
+
display "Last Try."
|
259
|
+
end
|
260
|
+
|
261
|
+
pinlast :on_cancel => :cvr_no_pin, :next => :verify_pin do
|
262
|
+
concat <<-end_tml
|
263
|
+
<tform>
|
264
|
+
<baddata next="#{@abort}">
|
265
|
+
#{layout.to_tml { %Q` <getvar name="err.baddata_reason"/><br/> `} }
|
266
|
+
</baddata>
|
267
|
+
<!-- calls SSA for secure PIN entry -->
|
268
|
+
<pinentry type="icc" prompt="Enter PIN" />
|
269
|
+
</tform>
|
270
|
+
end_tml
|
271
|
+
end
|
272
|
+
|
273
|
+
#Verifies PIN
|
274
|
+
verify_pin :next => @assert do
|
275
|
+
variants "tmlvar:card.parser.verdict == reject" => @reject,
|
276
|
+
"tmlvar:card.parser.cvr == ok" => :icc_get_cvm,
|
277
|
+
"tmlvar:card.parser.cvr == ok_msg" => :pin_ok_msg,
|
278
|
+
"tmlvar:card.parser.cvr == failed" => :wrong_pin,
|
279
|
+
"tmlvar:card.parser.cvr == pin_tries" => :wrong_pin
|
280
|
+
card :parser => :icc_emv, :params => :verify do
|
281
|
+
baddata %Q`<getvar name="err.baddata_reason"/><br/>
|
282
|
+
err.high = <getvar name="err.code.high"/> <br/>
|
283
|
+
err.low = <getvar name="err.code.low"/>` do
|
284
|
+
max 1; next_screen @abort
|
285
|
+
end
|
286
|
+
end
|
287
|
+
end
|
288
|
+
|
289
|
+
#Notifies that user entered correct PIN
|
290
|
+
pin_ok_msg :timeout => 1, :on_cancel => :icc_get_cvm, :next => :icc_get_cvm do
|
291
|
+
display "PIN OK"
|
292
|
+
end
|
293
|
+
|
294
|
+
# Notifies that user entered incorrect PIN
|
295
|
+
wrong_pin :timeout => 1, :on_cancel => :icc_get_cvm, :next => @assert do
|
296
|
+
variants "tmlvar:card.parser.cvr == failed" => :enter_pin,
|
297
|
+
"tmlvar:card.parser.cvr == pin_tries" => :icc_get_cvm
|
298
|
+
display "Incorrect PIN"
|
299
|
+
end
|
300
|
+
|
301
|
+
# Perform the risk management.
|
302
|
+
# The "icc_emv" parser will:
|
303
|
+
# analyze amount and transaction type;
|
304
|
+
# analyze previous submission attempt ("oebr.econn" value);
|
305
|
+
# update "card.parser.verdict" variable;
|
306
|
+
# fill "card.parser.reject_reason" variable, if necessary.
|
307
|
+
icc_rsk_mgmt :next => :chk_verdict do
|
308
|
+
set 'btmlpa.emv.txn_aid', :to => "tmlvar:card.emv.aid"
|
309
|
+
set 'payment.txn_date' => 'tmlvar:terminal.datetime'
|
310
|
+
set 'payment.auth_code' => ''
|
311
|
+
set 'payment.auth_resp_code' => ''
|
312
|
+
|
313
|
+
card :parser => :icc_emv, :params => :risk_mgmt do
|
314
|
+
baddata "Fail 04: #{@data_dump}" do
|
315
|
+
max 1; next_screen @abort
|
316
|
+
end
|
317
|
+
end
|
318
|
+
end
|
319
|
+
|
320
|
+
chk_verdict :next => @assert do
|
321
|
+
set 'oebr.submit_mode', :to => "tmlvar:card.parser.verdict"
|
322
|
+
variants "tmlvar:card.parser.verdict == reject" => :off_rej,
|
323
|
+
"tmlvar:card.parser.verdict == offline" => :off_comp,
|
324
|
+
"tmlvar:card.parser.verdict == online" => :icc_submit
|
325
|
+
end
|
326
|
+
|
327
|
+
off_rej :next => @abort, :timeout => 1 do
|
328
|
+
display " REJECTED "
|
329
|
+
end
|
330
|
+
|
331
|
+
off_comp :next => :icc_submit, :timeout => 1 do
|
332
|
+
display " TRANSACTION PROCESSED OFFLINE"
|
333
|
+
end
|
334
|
+
|
335
|
+
# Submits transaction data to host
|
336
|
+
icc_submit :next => @receipt do
|
337
|
+
set 'card.expiry_date', :to => '2010/12/31'
|
338
|
+
set 'oebr.submit_mode', :to => 'tmlvar:card.parser.verdict'
|
339
|
+
submit :target => url_for(:action => "auth"), :on_error => :icc_conn_fld do
|
340
|
+
get_variables :transid, :currency_code, 'oebr.submit_mode', 'oebr.time_zone',
|
341
|
+
'payment.trans_type', 'payment.amount', 'payment.amount_other', 'payment.txn_date',
|
342
|
+
'card.pan', 'card.issue_number', 'card.expiry_date', 'card.cardholder_name',
|
343
|
+
'card.effective_date', 'card.input_type', 'card.mag.iso2_track',
|
344
|
+
'card.emv.aid', 'card.emv.aip', 'card.emv.auc', 'card.emv.atc', 'card.emv.aac',
|
345
|
+
'card.emv.tc', 'card.emv.arqc', 'card.emv.iad', 'card.emv.tvr', 'card.emv.unumber'
|
346
|
+
end
|
347
|
+
end
|
348
|
+
|
349
|
+
# This screen is used when the host is unreachable
|
350
|
+
icc_conn_fld :next => @assert do
|
351
|
+
next_screen :con_fld_onln, :if => "tmlvar:oebr.submit_mode == online"
|
352
|
+
next_screen :con_fld_ofln, :if => "tmlvar:oebr.submit_mode == offline"
|
353
|
+
end
|
354
|
+
|
355
|
+
con_fld_onln :next => :icc_rsk_mgmt, :timeout => 2 do
|
356
|
+
display "HOST IS UNREACHABLE"
|
357
|
+
end
|
358
|
+
|
359
|
+
con_fld_ofln :next => :off_rej, :timeout => 2 do
|
360
|
+
display "OFFLINE TRANSACTION POOL IS FULL"
|
361
|
+
end
|
362
|
+
|
363
|
+
# Screen which may be referred to by dynamic responses
|
364
|
+
icc_tc_aac :on_cancel => @abort, :next => @void do
|
365
|
+
set 'oebr.submit_mode', :to => 'offline'
|
366
|
+
next_screen @receipt, :if => ['tmlvar:card.emv.tc', '!=', '']
|
367
|
+
submit :target => url_for(:action => 'auth_icc_2'),
|
368
|
+
:on_error => url_for(:action => 'index', :anchor => :compl_txn) do
|
369
|
+
get_variables 'card.emv.aac', 'card.emv.tc'
|
370
|
+
get_variable 'transid'
|
371
|
+
end
|
372
|
+
end
|
373
|
+
|
374
|
+
error_scr do
|
375
|
+
display <<-end_tml
|
376
|
+
code-low: <getvar name="err.code.low"/> <br/>
|
377
|
+
code-high: <getvar name="err.code.high"/> <br/>
|
378
|
+
baddata_reason: <getvar name="err.baddata_reason"/> <br/>
|
379
|
+
descr: <getvar name="err.description"/> <br/>
|
380
|
+
end_tml
|
381
|
+
end
|
382
|
+
end
|
383
|
+
end
|
384
|
+
end
|