paya 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
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,68 @@
1
+ module Paya
2
+ module Tel
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
+ @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
+ end
67
+ end
68
+ end
@@ -0,0 +1,85 @@
1
+ module Paya
2
+ module Tel
3
+ module NonGuaranteed
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, 2210, 'R'
52
+ end
53
+
54
+ def check_no_verification_dl_required
55
+ process_single_check @options, 2211, 'R'
56
+ end
57
+
58
+ def check_verification_identity_verification_dl_optional
59
+ process_single_check @options, 2212, 'R'
60
+ end
61
+
62
+ def check_verification_identity_verification_dl_required
63
+ process_single_check @options, 2213, 'R'
64
+ end
65
+
66
+ def check_verification_only_dl_optional
67
+ process_single_check @options, 2214, 'R'
68
+ end
69
+
70
+ def check_verification_only_dl_required
71
+ process_single_check @options, 2215, 'R'
72
+ end
73
+
74
+ def identity_verification_only_dl_optional
75
+ process_single_check @options, 2216, 'R'
76
+ end
77
+
78
+ def identity_verification_only_dl_required
79
+ process_single_check @options, 2217, 'R'
80
+ end
81
+
82
+ end
83
+ end
84
+ end
85
+ end
@@ -0,0 +1,3 @@
1
+ module Paya
2
+ VERSION = "0.9.0"
3
+ end
@@ -0,0 +1,68 @@
1
+ module Paya
2
+ module Web
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
+ end
67
+ end
68
+ end
@@ -0,0 +1,68 @@
1
+ module Paya
2
+ module Web
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
+ @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, 2310, 'R'
34
+ end
35
+
36
+ def check_no_verification_dl_required options={}
37
+ process_single_certification_check options, 2311, 'R'
38
+ end
39
+
40
+ def check_verification_identity_verification_dl_optional options={}
41
+ process_single_certification_check options, 2312, 'R'
42
+ end
43
+
44
+ def check_verification_identity_verification_dl_required options={}
45
+ process_single_certification_check options, 2313, 'R'
46
+ end
47
+
48
+ def check_verification_only_dl_optional options={}
49
+ process_single_certification_check options, 2314, 'R'
50
+ end
51
+
52
+ def check_verification_only_dl_required options={}
53
+ process_single_certification_check options, 2315, 'R'
54
+ end
55
+
56
+ def identity_verification_only_dl_optional options={}
57
+ process_single_certification_check options, 2316, 'R'
58
+ end
59
+
60
+ def identity_verification_only_dl_required options={}
61
+ process_single_certification_check options, 2317, 'R'
62
+ end
63
+ =end
64
+
65
+ end
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,68 @@
1
+ module Paya
2
+ module Web
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
+ @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
+ end
67
+ end
68
+ end
@@ -0,0 +1,85 @@
1
+ module Paya
2
+ module Web
3
+ module NonGuaranteed
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, 2310, 'R'
52
+ end
53
+
54
+ def check_no_verification_dl_required
55
+ process_single_check @options, 2311, 'R'
56
+ end
57
+
58
+ def check_verification_identity_verification_dl_optional
59
+ process_single_check @options, 2312, 'R'
60
+ end
61
+
62
+ def check_verification_identity_verification_dl_required
63
+ process_single_check @options, 2313, 'R'
64
+ end
65
+
66
+ def check_verification_only_dl_optional
67
+ process_single_check @options, 2314, 'R'
68
+ end
69
+
70
+ def check_verification_only_dl_required
71
+ process_single_check @options, 2315, 'R'
72
+ end
73
+
74
+ def identity_verification_only_dl_optional
75
+ process_single_check @options, 2316, 'R'
76
+ end
77
+
78
+ def identity_verification_only_dl_required
79
+ process_single_check @options, 2317, 'R'
80
+ end
81
+
82
+ end
83
+ end
84
+ end
85
+ end