diff --git a/app/controllers/pay_controller.rb b/app/controllers/pay_controller.rb index 30368f1..6a71dc3 100644 --- a/app/controllers/pay_controller.rb +++ b/app/controllers/pay_controller.rb @@ -33,4 +33,11 @@ class PayController < ApplicationController redirect_to user_pay_index_path end + def decrypted_bank_acct_num + decrypted = Encryption.decrypt_sensitive_value(params[:value_to_decrypt]) + respond_to do |format| + format.json {render :json => {:account_num => decrypted || "No Data" }} + end + end + end diff --git a/app/views/pay/index.html.erb b/app/views/pay/index.html.erb index 74c6a8a..96c6c57 100644 --- a/app/views/pay/index.html.erb +++ b/app/views/pay/index.html.erb @@ -30,7 +30,7 @@
- Direct Deposit + Direct Deposit
@@ -109,6 +109,35 @@
+ + +
+
+
+
+
+ Decrypt Bank Account Number +
+
+
+
+ <%= form_tag "#", {:class => "form-horizontal", :id => "decrypt_form" } do %> + + +
+ <%= text_field_tag :value_to_decrypt, params[:value_to_decrypt], {:placeholder => "Bank Account Number"} %> + # +
+ + + <%= submit_tag "Submit", {:id => "decrypt_btn", :style => "margin-left: 10px;", :class => "btn btn-medium btn-primary"} %> + <% end %> +
+
+
+
+
+
@@ -117,7 +146,7 @@