paya 0.9.0

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.
Files changed (35) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/CODE_OF_CONDUCT.md +13 -0
  4. data/Gemfile +1 -0
  5. data/LICENSE.txt +21 -0
  6. data/README.md +46 -0
  7. data/Rakefile +1 -0
  8. data/bin/console +14 -0
  9. data/bin/setup +7 -0
  10. data/lib/paya.rb +111 -0
  11. data/lib/paya/base.rb +145 -0
  12. data/lib/paya/ccd/guaranteed/credit_debit_transaction.rb +87 -0
  13. data/lib/paya/ccd/guaranteed/debit_transaction.rb +85 -0
  14. data/lib/paya/ccd/non_guaranteed/credit_debit_transaction.rb +85 -0
  15. data/lib/paya/ccd/non_guaranteed/debit_transaction.rb +85 -0
  16. data/lib/paya/certification.rb +22 -0
  17. data/lib/paya/certification/ccd.rb +50 -0
  18. data/lib/paya/certification/ppd.rb +52 -0
  19. data/lib/paya/certification/tel.rb +54 -0
  20. data/lib/paya/certification/web.rb +52 -0
  21. data/lib/paya/ppd/guaranteed/credit_debit_transaction.rb +85 -0
  22. data/lib/paya/ppd/guaranteed/debit_transaction.rb +85 -0
  23. data/lib/paya/ppd/non_guaranteed/credit_debit_transaction.rb +85 -0
  24. data/lib/paya/ppd/non_guaranteed/debit_transaction.rb +86 -0
  25. data/lib/paya/tel/guaranteed/credit_debit_transaction.rb +69 -0
  26. data/lib/paya/tel/guaranteed/debit_transaction.rb +85 -0
  27. data/lib/paya/tel/non_guaranteed/credit_debit_transaction.rb +68 -0
  28. data/lib/paya/tel/non_guaranteed/debit_transaction.rb +85 -0
  29. data/lib/paya/version.rb +3 -0
  30. data/lib/paya/web/guaranteed/credit_debit_transaction.rb +68 -0
  31. data/lib/paya/web/guaranteed/debit_transaction.rb +68 -0
  32. data/lib/paya/web/non_guaranteed/credit_debit_transaction.rb +68 -0
  33. data/lib/paya/web/non_guaranteed/debit_transaction.rb +85 -0
  34. data/paya.gemspec +26 -0
  35. metadata +121 -0
@@ -0,0 +1,85 @@
1
+ module Paya
2
+ module Ppd
3
+ module Guaranteed
4
+ class CreditDebitTransaction < Base
5
+ attr_accessor :request_id, :transaction_id, :routing_number, :account_number, :account_type, :company_name, :address_1, :address_2, :city, :state, :dl_state, :dl_number, :dob_year, :zip, :phone_number, :check_amount , :identifier
6
+
7
+ def initialize options={}
8
+ @options = options
9
+ @request_id = options[:request_id]
10
+ @transaction_id = options[:transaction_id]
11
+ @routing_number = options[:routing_number]
12
+ @account_number = options[:account_number]
13
+ @account_type = options[:account_type]
14
+ @company_name = options[:company_name]
15
+ @address_1 = options[:address_1]
16
+ @address_2 = options[:address_2]
17
+ @city = options[:city]
18
+ @state = options[:state]
19
+ @dl_state = options[:dl_state]
20
+ @dl_number = options[:dl_number]
21
+ @dob_year = options[:dob_year]
22
+ @zip = options[:zip]
23
+ @phone_number = options[:phone_number]
24
+ @check_amount = options[:check_amount]
25
+ @identifier = options[:identifier]
26
+ end
27
+
28
+ def process check_verification=false, identity_verification=false, dl_required=false
29
+ if check_verification == false and identity_verification == false and dl_required == false
30
+ check_no_verification_dl_optional
31
+ elsif check_verification == false and identity_verification == false and dl_required == true
32
+ check_no_verification_dl_required
33
+ elsif check_verification == true and identity_verification == true and dl_required == false
34
+ check_verification_identity_verification_dl_optional
35
+ elsif check_verification == true and identity_verification == true and dl_required == true
36
+ check_verification_identity_verification_dl_required
37
+ elsif check_verification == true and identity_verification == false and dl_required == false
38
+ check_verification_only_dl_optional
39
+ elsif check_verification == true and identity_verification == false and dl_required == true
40
+ check_verification_only_dl_required
41
+ elsif check_verification == false and identity_verification == true and dl_required == false
42
+ identity_verification_only_dl_optional
43
+ elsif check_verification == false and identity_verification == true and dl_required == true
44
+ identity_verification_only_dl_required
45
+ else
46
+ raise "Transaction not supported"
47
+ end
48
+ end
49
+
50
+ def check_no_verification_dl_optional
51
+ process_single_check @options, 1810, 'R'
52
+ end
53
+
54
+ def check_no_verification_dl_required
55
+ process_single_check @options, 1811, 'R'
56
+ end
57
+
58
+ def check_verification_identity_verification_dl_optional
59
+ process_single_check @options, 1812, 'R'
60
+ end
61
+
62
+ def check_verification_identity_verification_dl_required
63
+ process_single_check @options, 1813, 'R'
64
+ end
65
+
66
+ def check_verification_only_dl_optional
67
+ process_single_check @options, 1814, 'R'
68
+ end
69
+
70
+ def check_verification_only_dl_required
71
+ process_single_check @options, 1815, 'R'
72
+ end
73
+
74
+ def identity_verification_only_dl_optional
75
+ process_single_check @options, 1816, 'R'
76
+ end
77
+
78
+ def identity_verification_only_dl_required
79
+ process_single_check @options, 1817, 'R'
80
+ end
81
+
82
+ end
83
+ end
84
+ end
85
+ end
@@ -0,0 +1,85 @@
1
+ module Paya
2
+ module Ppd
3
+ module Guaranteed
4
+ class DebitTransaction < Base
5
+ attr_accessor :request_id, :transaction_id, :routing_number, :account_number, :account_type, :company_name, :address_1, :address_2, :city, :state, :dl_state, :dl_number, :dob_year, :zip, :phone_number, :check_amount , :identifier
6
+
7
+ def initialize options={}
8
+ @options = options
9
+ @request_id = options[:request_id]
10
+ @transaction_id = options[:transaction_id]
11
+ @routing_number = options[:routing_number]
12
+ @account_number = options[:account_number]
13
+ @account_type = options[:account_type]
14
+ @company_name = options[:company_name]
15
+ @address_1 = options[:address_1]
16
+ @address_2 = options[:address_2]
17
+ @city = options[:city]
18
+ @state = options[:state]
19
+ @dl_state = options[:dl_state]
20
+ @dl_number = options[:dl_number]
21
+ @dob_year = options[:dob_year]
22
+ @zip = options[:zip]
23
+ @phone_number = options[:phone_number]
24
+ @check_amount = options[:check_amount]
25
+ @identifier = options[:identifier]
26
+ end
27
+
28
+ def process check_verification=false, identity_verification=false, dl_required=false
29
+ if check_verification == false and identity_verification == false and dl_required == false
30
+ check_no_verification_dl_optional
31
+ elsif check_verification == false and identity_verification == false and dl_required == true
32
+ check_no_verification_dl_required
33
+ elsif check_verification == true and identity_verification == true and dl_required == false
34
+ check_verification_identity_verification_dl_optional
35
+ elsif check_verification == true and identity_verification == true and dl_required == true
36
+ check_verification_identity_verification_dl_required
37
+ elsif check_verification == true and identity_verification == false and dl_required == false
38
+ check_verification_only_dl_optional
39
+ elsif check_verification == true and identity_verification == false and dl_required == true
40
+ check_verification_only_dl_required
41
+ elsif check_verification == false and identity_verification == true and dl_required == false
42
+ identity_verification_only_dl_optional
43
+ elsif check_verification == false and identity_verification == true and dl_required == true
44
+ identity_verification_only_dl_required
45
+ else
46
+ raise "Transaction not supported"
47
+ end
48
+ end
49
+
50
+ def check_no_verification_dl_optional
51
+ process_single_check @options, 1010, 'R'
52
+ end
53
+
54
+ def check_no_verification_dl_required
55
+ process_single_check @options, 1011, 'R'
56
+ end
57
+
58
+ def check_verification_identity_verification_dl_optional
59
+ process_single_check @options, 1012, 'R'
60
+ end
61
+
62
+ def check_verification_identity_verification_dl_required
63
+ process_single_check @options, 1013, 'R'
64
+ end
65
+
66
+ def check_verification_only_dl_optional
67
+ process_single_check @options, 1014, 'R'
68
+ end
69
+
70
+ def check_verification_only_dl_required
71
+ process_single_check @options, 1015, 'R'
72
+ end
73
+
74
+ def identity_verification_only_dl_optional
75
+ process_single_check @options, 1016, 'R'
76
+ end
77
+
78
+ def identity_verification_only_dl_required
79
+ process_single_check @options, 1017, 'R'
80
+ end
81
+
82
+ end
83
+ end
84
+ end
85
+ end
@@ -0,0 +1,85 @@
1
+ module Paya
2
+ module Ppd
3
+ module NonGuaranteed
4
+ class CreditDebitTransaction < Base
5
+ attr_accessor :request_id, :transaction_id, :routing_number, :account_number, :account_type, :company_name, :address_1, :address_2, :city, :state, :dl_state, :dl_number, :dob_year, :zip, :phone_number, :check_amount , :identifier
6
+
7
+ def initialize options={}
8
+ @options = options
9
+ @request_id = options[:request_id]
10
+ @transaction_id = options[:transaction_id]
11
+ @routing_number = options[:routing_number]
12
+ @account_number = options[:account_number]
13
+ @account_type = options[:account_type]
14
+ @company_name = options[:company_name]
15
+ @address_1 = options[:address_1]
16
+ @address_2 = options[:address_2]
17
+ @city = options[:city]
18
+ @state = options[:state]
19
+ @dl_state = options[:dl_state]
20
+ @dl_number = options[:dl_number]
21
+ @dob_year = options[:dob_year]
22
+ @zip = options[:zip]
23
+ @phone_number = options[:phone_number]
24
+ @check_amount = options[:check_amount]
25
+ @identifier = options[:identifier]
26
+ end
27
+
28
+ def process check_verification=false, identity_verification=false, dl_required=false
29
+ if check_verification == false and identity_verification == false and dl_required == false
30
+ check_no_verification_dl_optional
31
+ elsif check_verification == false and identity_verification == false and dl_required == true
32
+ check_no_verification_dl_required
33
+ elsif check_verification == true and identity_verification == true and dl_required == false
34
+ check_verification_identity_verification_dl_optional
35
+ elsif check_verification == true and identity_verification == true and dl_required == true
36
+ check_verification_identity_verification_dl_required
37
+ elsif check_verification == true and identity_verification == false and dl_required == false
38
+ check_verification_only_dl_optional
39
+ elsif check_verification == true and identity_verification == false and dl_required == true
40
+ check_verification_only_dl_required
41
+ elsif check_verification == false and identity_verification == true and dl_required == false
42
+ identity_verification_only_dl_optional
43
+ elsif check_verification == false and identity_verification == true and dl_required == true
44
+ identity_verification_only_dl_required
45
+ else
46
+ raise "Transaction not supported"
47
+ end
48
+ end
49
+
50
+ def check_no_verification_dl_optional
51
+ process_single_check @options, 2810, 'R'
52
+ end
53
+
54
+ def check_no_verification_dl_required
55
+ process_single_check @options, 2811, 'R'
56
+ end
57
+
58
+ def check_verification_identity_verification_dl_optional
59
+ process_single_check @options, 2812, 'R'
60
+ end
61
+
62
+ def check_verification_identity_verification_dl_required
63
+ process_single_check @options, 2813, 'R'
64
+ end
65
+
66
+ def check_verification_only_dl_optional
67
+ process_single_check @options, 2814, 'R'
68
+ end
69
+
70
+ def check_verification_only_dl_required
71
+ process_single_check @options, 2815, 'R'
72
+ end
73
+
74
+ def identity_verification_only_dl_optional
75
+ process_single_check @options, 2816, 'R'
76
+ end
77
+
78
+ def identity_verification_only_dl_required
79
+ process_single_check @options, 2817, 'R'
80
+ end
81
+
82
+ end
83
+ end
84
+ end
85
+ end
@@ -0,0 +1,86 @@
1
+
2
+ module Paya
3
+ module Ppd
4
+ module NonGuaranteed
5
+ class DebitTransaction < Base
6
+ attr_accessor :request_id, :transaction_id, :routing_number, :account_number, :account_type, :company_name, :address_1, :address_2, :city, :state, :dl_state, :dl_number, :dob_year, :zip, :phone_number, :check_amount , :identifier
7
+
8
+ def initialize options={}
9
+ @options = options
10
+ @request_id = options[:request_id]
11
+ @transaction_id = options[:transaction_id]
12
+ @routing_number = options[:routing_number]
13
+ @account_number = options[:account_number]
14
+ @account_type = options[:account_type]
15
+ @company_name = options[:company_name]
16
+ @address_1 = options[:address_1]
17
+ @address_2 = options[:address_2]
18
+ @city = options[:city]
19
+ @state = options[:state]
20
+ @dl_state = options[:dl_state]
21
+ @dl_number = options[:dl_number]
22
+ @dob_year = options[:dob_year]
23
+ @zip = options[:zip]
24
+ @phone_number = options[:phone_number]
25
+ @check_amount = options[:check_amount]
26
+ @identifier = options[:identifier]
27
+ end
28
+
29
+ def process check_verification=false, identity_verification=false, dl_required=false
30
+ if check_verification == false and identity_verification == false and dl_required == false
31
+ check_no_verification_dl_optional
32
+ elsif check_verification == false and identity_verification == false and dl_required == true
33
+ check_no_verification_dl_required
34
+ elsif check_verification == true and identity_verification == true and dl_required == false
35
+ check_verification_identity_verification_dl_optional
36
+ elsif check_verification == true and identity_verification == true and dl_required == true
37
+ check_verification_identity_verification_dl_required
38
+ elsif check_verification == true and identity_verification == false and dl_required == false
39
+ check_verification_only_dl_optional
40
+ elsif check_verification == true and identity_verification == false and dl_required == true
41
+ check_verification_only_dl_required
42
+ elsif check_verification == false and identity_verification == true and dl_required == false
43
+ identity_verification_only_dl_optional
44
+ elsif check_verification == false and identity_verification == true and dl_required == true
45
+ identity_verification_only_dl_required
46
+ else
47
+ raise "Transaction not supported"
48
+ end
49
+ end
50
+
51
+ def check_no_verification_dl_optional
52
+ process_single_check @options, 2010, 'R'
53
+ end
54
+
55
+ def check_no_verification_dl_required
56
+ process_single_check @options, 2011, 'R'
57
+ end
58
+
59
+ def check_verification_identity_verification_dl_optional
60
+ process_single_check @options, 2012, 'R'
61
+ end
62
+
63
+ def check_verification_identity_verification_dl_required
64
+ process_single_check @options, 2013, 'R'
65
+ end
66
+
67
+ def check_verification_only_dl_optional
68
+ process_single_check @options, 2014, 'R'
69
+ end
70
+
71
+ def check_verification_only_dl_required
72
+ process_single_check @options, 2015, 'R'
73
+ end
74
+
75
+ def identity_verification_only_dl_optional
76
+ process_single_check @options, 2016, 'R'
77
+ end
78
+
79
+ def identity_verification_only_dl_required
80
+ process_single_check @options, 2017, 'R'
81
+ end
82
+
83
+ end
84
+ end
85
+ end
86
+ end
@@ -0,0 +1,69 @@
1
+ module Paya
2
+ module Tel
3
+ module Guaranteed
4
+ class CreditDebitTransaction < Base
5
+ attr_accessor :request_id, :transaction_id, :routing_number, :account_number, :account_type, :company_name, :address_1, :address_2, :city, :state, :dl_state, :dl_number, :dob_year, :zip, :phone_number, :check_amount , :identifier
6
+
7
+ def initialize options={}
8
+ @request_id = options[:request_id]
9
+ @transaction_id = options[:transaction_id]
10
+ @routing_number = options[:routing_number]
11
+ @account_number = options[:account_number]
12
+ @account_type = options[:account_type]
13
+ @company_name = options[:company_name]
14
+ @address_1 = options[:address_1]
15
+ @address_2 = options[:address_2]
16
+ @city = options[:city]
17
+ @state = options[:state]
18
+ @dl_state = options[:dl_state]
19
+ @dl_number = options[:dl_number]
20
+ @dob_year = options[:dob_year]
21
+ @zip = options[:zip]
22
+ @phone_number = options[:phone_number]
23
+ @check_amount = options[:check_amount]
24
+ @identifier = options[:identifier]
25
+ end
26
+
27
+ def process options={}, check_verification=false, identity_verification=false, dl_required=false
28
+ raise 'Transaction not supported'
29
+ end
30
+
31
+ =begin
32
+ def check_no_verification_dl_optional options={}
33
+ process_single_certification_check options, 1710, 'R'
34
+ end
35
+
36
+ def check_no_verification_dl_required options={}
37
+ process_single_certification_check options, 1711, 'R'
38
+ end
39
+
40
+ def check_verification_identity_verification_dl_optional options={}
41
+ process_single_certification_check options, 1712, 'R'
42
+ end
43
+
44
+ def check_verification_identity_verification_dl_required options={}
45
+ process_single_certification_check options, 1713, 'R'
46
+ end
47
+
48
+ def check_verification_only_dl_optional options={}
49
+ process_single_certification_check options, 1714, 'R'
50
+ end
51
+
52
+ def check_verification_only_dl_required options={}
53
+ process_single_certification_check options, 1715, 'R'
54
+ end
55
+
56
+ def identity_verification_only_dl_optional options={}
57
+ process_single_certification_check options, 1716, 'R'
58
+ end
59
+
60
+ def identity_verification_only_dl_required options={}
61
+ process_single_certification_check options, 1717, 'R'
62
+ end
63
+ =end
64
+
65
+ end
66
+
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,85 @@
1
+ module Paya
2
+ module Tel
3
+ module Guaranteed
4
+ class DebitTransaction < Base
5
+ attr_accessor :request_id, :transaction_id, :routing_number, :account_number, :account_type, :company_name, :address_1, :address_2, :city, :state, :dl_state, :dl_number, :dob_year, :zip, :phone_number, :check_amount , :identifier
6
+
7
+ def initialize options={}
8
+ @options = options
9
+ @request_id = options[:request_id]
10
+ @transaction_id = options[:transaction_id]
11
+ @routing_number = options[:routing_number]
12
+ @account_number = options[:account_number]
13
+ @account_type = options[:account_type]
14
+ @company_name = options[:company_name]
15
+ @address_1 = options[:address_1]
16
+ @address_2 = options[:address_2]
17
+ @city = options[:city]
18
+ @state = options[:state]
19
+ @dl_state = options[:dl_state]
20
+ @dl_number = options[:dl_number]
21
+ @dob_year = options[:dob_year]
22
+ @zip = options[:zip]
23
+ @phone_number = options[:phone_number]
24
+ @check_amount = options[:check_amount]
25
+ @identifier = options[:identifier]
26
+ end
27
+
28
+ def process check_verification=false, identity_verification=false, dl_required=false
29
+ if check_verification == false and identity_verification == false and dl_required == false
30
+ check_no_verification_dl_optional
31
+ elsif check_verification == false and identity_verification == false and dl_required == true
32
+ check_no_verification_dl_required
33
+ elsif check_verification == true and identity_verification == true and dl_required == false
34
+ check_verification_identity_verification_dl_optional
35
+ elsif check_verification == true and identity_verification == true and dl_required == true
36
+ check_verification_identity_verification_dl_required
37
+ elsif check_verification == true and identity_verification == false and dl_required == false
38
+ check_verification_only_dl_optional
39
+ elsif check_verification == true and identity_verification == false and dl_required == true
40
+ check_verification_only_dl_required
41
+ elsif check_verification == false and identity_verification == true and dl_required == false
42
+ identity_verification_only_dl_optional
43
+ elsif check_verification == false and identity_verification == true and dl_required == true
44
+ identity_verification_only_dl_required
45
+ else
46
+ raise "Transaction not supported"
47
+ end
48
+ end
49
+
50
+ def check_no_verification_dl_optional
51
+ process_single_check @options, 1210, 'R'
52
+ end
53
+
54
+ def check_no_verification_dl_required
55
+ process_single_check options, 1211, 'R'
56
+ end
57
+
58
+ def check_verification_identity_verification_dl_optional
59
+ process_single_check @options, 1212, 'R'
60
+ end
61
+
62
+ def check_verification_identity_verification_dl_required
63
+ process_single_check @options, 1213, 'R'
64
+ end
65
+
66
+ def check_verification_only_dl_optional
67
+ process_single_check @options, 1214, 'R'
68
+ end
69
+
70
+ def check_verification_only_dl_required
71
+ process_single_check @options, 1215, 'R'
72
+ end
73
+
74
+ def identity_verification_only_dl_optional
75
+ process_single_check @options, 1216, 'R'
76
+ end
77
+
78
+ def identity_verification_only_dl_required
79
+ process_single_check @options, 1217, 'R'
80
+ end
81
+
82
+ end
83
+ end
84
+ end
85
+ end