|
2 | 2 |
|
3 | 3 | class FeesController < ApplicationController |
4 | 4 |
|
5 | | - rescue_from ActionController::ParameterMissing, with: :missing_params |
6 | | - |
7 | 5 | # This will be needed for transaction_complete since Paypal will hit that |
8 | 6 | protect_from_forgery with: :null_session |
9 | 7 |
|
10 | 8 | def index |
11 | | - @jwt = params.require(:jwt) |
12 | | - decoded_token = JWT.decode @jwt, nil, false |
13 | | - @alma_id = decoded_token.first['userName'] |
14 | | - @fees = FeesPayment.new(alma_id: @alma_id) |
15 | | - rescue JWT::DecodeError |
16 | | - redirect_to(action: :transaction_error) |
| 9 | + @jwt = params.require(:jwt) |
| 10 | + decoded_token = JWT.decode @jwt, nil, false |
| 11 | + @alma_id = decoded_token.first['userName'] |
| 12 | + @fees = FeesPayment.new(alma_id: @alma_id) |
| 13 | + rescue ActionController::ParameterMissing |
| 14 | + redirect_to 'https://www.lib.berkeley.edu/find/borrow-renew?section=pay-fees', allow_other_host: true |
| 15 | + rescue JWT::DecodeError |
| 16 | + redirect_to(action: :transaction_error) |
17 | 17 | end |
18 | 18 |
|
19 | 19 | def efee |
@@ -78,10 +78,6 @@ def transaction_complete |
78 | 78 |
|
79 | 79 | private |
80 | 80 |
|
81 | | - def missing_params(_error) |
82 | | - redirect_to 'https://lib.berkeley.edu/find/borrow-renew?section=pay-fees', allow_other_host: true |
83 | | - end |
84 | | - |
85 | 81 | def authorize! |
86 | 82 | return if Rails.env.development? |
87 | 83 |
|
|
0 commit comments