@@ -5,37 +5,35 @@ class ESign::Eeg014CollectPaymentController < EgController
5
5
before_action -> { @example = Utils ::ManifestUtils . new . get_example ( @manifest , 14 , 'eSignature' ) }
6
6
7
7
def create
8
- begin
9
- envelope_args = {
10
- signer_email : param_gsub ( params [ 'signerEmail' ] ) ,
11
- signer_name : param_gsub ( params [ 'signerName' ] ) ,
12
- cc_email : param_gsub ( params [ 'ccEmail' ] ) ,
13
- cc_name : param_gsub ( params [ 'ccName' ] ) ,
14
- gateway_account_id : Rails . application . config . gateway_account_id ,
15
- gateway_name : Rails . application . config . gateway_name ,
16
- gateway_display_name : Rails . application . config . gateway_display_name
17
- }
18
- args = {
19
- account_id : session [ 'ds_account_id' ] ,
20
- base_path : session [ 'ds_base_path' ] ,
21
- access_token : session [ 'ds_access_token' ] ,
22
- envelope_args : envelope_args
23
- }
8
+ envelope_args = {
9
+ signer_email : param_gsub ( params [ 'signerEmail' ] ) ,
10
+ signer_name : param_gsub ( params [ 'signerName' ] ) ,
11
+ cc_email : param_gsub ( params [ 'ccEmail' ] ) ,
12
+ cc_name : param_gsub ( params [ 'ccName' ] ) ,
13
+ gateway_account_id : Rails . application . config . gateway_account_id ,
14
+ gateway_name : Rails . application . config . gateway_name ,
15
+ gateway_display_name : Rails . application . config . gateway_display_name
16
+ }
17
+ args = {
18
+ account_id : session [ 'ds_account_id' ] ,
19
+ base_path : session [ 'ds_base_path' ] ,
20
+ access_token : session [ 'ds_access_token' ] ,
21
+ envelope_args : envelope_args
22
+ }
24
23
25
- results = ESign ::Eg014CollectPaymentService . new ( args ) . worker
26
- @title = @example [ 'ExampleName' ]
27
- @message = format_string ( @example [ 'ResultsPageText' ] , results [ :envelope_id ] )
28
- render 'ds_common/example_done'
29
- rescue DocuSign_eSign ::ApiError => e
30
- handle_error ( e )
31
- end
24
+ results = ESign ::Eg014CollectPaymentService . new ( args ) . worker
25
+ @title = @example [ 'ExampleName' ]
26
+ @message = format_string ( @example [ 'ResultsPageText' ] , results [ :envelope_id ] )
27
+ render 'ds_common/example_done'
28
+ rescue DocuSign_eSign ::ApiError => e
29
+ handle_error ( e )
32
30
end
33
31
34
32
def get
35
- enableCFR = ESign ::GetDataService . new ( session [ :ds_access_token ] , session [ :ds_base_path ] ) . is_cfr ( session [ :ds_account_id ] )
36
- if enableCFR == " enabled"
37
- session [ :status_cfr ] = " enabled"
38
- @title = " Not CFR Part 11 compatible"
33
+ enableCFR = ESign ::GetDataService . new ( session [ :ds_access_token ] , session [ :ds_base_path ] ) . cfr? ( session [ :ds_account_id ] )
34
+ if enableCFR == ' enabled'
35
+ session [ :status_cfr ] = ' enabled'
36
+ @title = ' Not CFR Part 11 compatible'
39
37
@error_information = @manifest [ 'SupportingTexts' ] [ 'CFRError' ]
40
38
render 'ds_common/error'
41
39
end
0 commit comments