fraudlabspro_ruby 3.1.0 → 3.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: f13a8ceb0b3dc2ba34d874840930ea3870916dc9
4
- data.tar.gz: be08a9cee073918594434fb3671e7ccf547c8110
2
+ SHA256:
3
+ metadata.gz: ce63cd1d224a5b69461301381e934360fab6b5fae58cd802620d7f73202eebc4
4
+ data.tar.gz: cdfba056851afa8539330cb390650c6ae193009a1e3ebae9904e4ed44d37b449
5
5
  SHA512:
6
- metadata.gz: f9f992402e754102073961be160817bb026ac98915472277e62221e07939b954d8bcafb35d1dfec7a57c877c99f1390d6995b0c781632d8d95515742041801dc
7
- data.tar.gz: 0b9acee02577d286db3cf48562044de137a6920104cf118a5eeda61b0e212b5902c6f8122b1bfffcb9a33827d7e76f59fd4ce5ad2e0db38f3bae2182fbdbd644
6
+ metadata.gz: c659af986848af1a23d8c11bec9b873ebe3f3af03a699e88d6b46bc77c99c21651c20e543acbe68befe8cc4d9b07aed28107140ef7c8e0270f2e82efa70d986a
7
+ data.tar.gz: 6e3e84a10103410c47884954b56a6108fc7e2655ed18cbb3755eebae23fad15a816a61ee7e520188d1328749d19ef2d6bd32893242ec5dd120ce25e7c73b3014
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
- source "https://rubygems.org"
2
-
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
-
5
- # Specify your gem's dependencies in fraudlabspro_ruby.gemspec
6
- gemspec
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in fraudlabspro_ruby.gemspec
6
+ gemspec
@@ -1,17 +1,17 @@
1
- PATH
2
- remote: .
3
- specs:
4
- fraudlabspro_ruby (3.1.0)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
-
10
- PLATFORMS
11
- x64-mingw32
12
-
13
- DEPENDENCIES
14
- fraudlabspro_ruby!
15
-
16
- BUNDLED WITH
17
- 1.16.1
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ fraudlabspro_ruby (3.1.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+
10
+ PLATFORMS
11
+ x64-mingw32
12
+
13
+ DEPENDENCIES
14
+ fraudlabspro_ruby!
15
+
16
+ BUNDLED WITH
17
+ 1.16.1
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2018 FraudLabsPro.com
3
+ Copyright (c) 2020 FraudLabsPro.com
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,223 +1,225 @@
1
- FraudLabs Pro Ruby SDK
2
- ========================
3
- This Ruby module enables user to easily implement fraud detection feature into their solution using the API from https://www.fraudlabspro.com.
4
-
5
- Below are the features of this PHP module:
6
- - Fraud analysis and scoring
7
- - IP address geolocation & proxy validation
8
- - Email address validation
9
- - Credit card issuing bank validation
10
- - Transaction velocity validation
11
- - Device transaction validation
12
- - Blacklist validation
13
- - Custom rules trigger
14
- - Email notification of fraud orders
15
- - Mobile app notification of fraud orders
16
-
17
- This module requires API key to function. You may subscribe a free API key at https://www.fraudlabspro.com
18
-
19
-
20
-
21
-
22
- Usage Example
23
- ============
24
- ### Validate Order
25
-
26
- #### Object Properties
27
-
28
- | Property Name | Property Type | Description |
29
- | ------------------- | ------------- | ------------------------------------------------------------ |
30
- | ip | string | IP address of online transaction. It supports both IPv4 and IPv6 address format. |
31
- | first_name | string | User's first name. |
32
- | last_name | string | User's last name. |
33
- | username | string | User's username. |
34
- | password | string | User's password. |
35
- | email | string | User's email address. |
36
- | phone | string | User's phone number. |
37
- | bill_addr | string | Street address of billing address. |
38
- | bill_city | string | City of billing address. |
39
- | bill_state | string | State of billing address. It supports state codes, e.g. NY (New York), for state or province of United States or Canada. Please refer to [State & Province Codes](https://www.fraudlabspro.com/developer/reference/state-and-province-codes) for complete list. |
40
- | bill_zip_code | string | Postal or ZIP code of billing address. |
41
- | bill_country | string | Country of billing address. It requires the input of ISO-3166 alpha-2 country code, e.g. US for United States. Please refer to [Country Codes](https://www.fraudlabspro.com/developer/reference/country-codes) for complete list. |
42
- | user_order_id | string | Merchant identifier to uniquely identify a transaction. It supports maximum of 15 characters user order id input. |
43
- | user_order_memo | string | Merchant description of an order transaction. It supports maximum of 200 characters. |
44
- | amount | float | Amount of the transaction. |
45
- | quantity | integer | Total quantity of the transaction. |
46
- | currency | string | Currency code used in the transaction. It requires the input of ISO-4217 (3 characters) currency code, e.g. USD for US Dollar. Please refer to [Currency Codes](https://www.fraudlabspro.com/developer/reference/currency-codes) for complete list. |
47
- | department | string | Merchant identifier to uniquely identify a product or service department. |
48
- | payment_mode | string | Payment mode of transaction. Please see [reference section](#payment-method). |
49
- | card_number | string | Billing credit card number or BIN number. |
50
- | card_avs | string | The single character AVS result returned by the credit card processor. Please refer to [AVS & CVV2 Response Codes](https://www.fraudlabspro.com/developer/reference/avs-and-cvv2-response-codes) for details. |
51
- | card_cvv | string | The single character CVV2 result returned by the credit card processor. Please refer to [AVS & CVV2 Response Codes](https://www.fraudlabspro.com/developer/reference/avs-and-cvv2-response-codes) for details. |
52
- | ship_addr | string | Street address of shipping address. |
53
- | ship_city | string | City of shipping address. |
54
- | ship_state | string | State of shipping address. It supports state codes, e.g. NY - New York, for state or province of United States or Canada. Please refer to [State & Province Codes](https://www.fraudlabspro.com/developer/reference/state-and-province-codes) for complete list. |
55
- | ship_zip_code | string | Postal or ZIP code of shipping address. |
56
- | ship_country | string | Country of shipping address. It requires the input of ISO-3166 alpha-2 country code, e.g. US for United States. Please refer to [Country Codes](https://www.fraudlabspro.com/developer/reference/country-codes) for complete list. |
57
-
58
-
59
- ```
60
- require 'fraudlabspro_ruby'
61
-
62
- FraudlabsproRuby::Configuration.api_key = 'YOUR_API_KEY'
63
-
64
- result = FraudlabsproRuby::Api::Order.validate(
65
- ip: '146.112.62.105',
66
- first_name: 'Hector',
67
- last_name: 'Henderson',
68
- email: 'hh5566@gmail.com',
69
- phone: '561-628-8674',
70
-
71
- # Billing information
72
- bill_addr: '1766 PowderHouse Road',
73
- bill_city: 'West Palm Beach',
74
- bill_state: 'FL',
75
- bill_zip_code: '33401',
76
- bill_country: 'US',
77
-
78
- # Order information
79
- user_order_id: '67398',
80
- user_order_memo: 'Online Shop',
81
- amount: '79.89',
82
- quantity: '1',
83
- currency: 'USD',
84
- payment_mode: FraudlabsproRuby::Api::Order::CREDIT_CARD,
85
- card_number: '4556553172971283',
86
-
87
- # Shipping information
88
- ship_addr: '4469 Chestnut Street',
89
- ship_city: 'Tampa',
90
- ship_state: 'FL',
91
- ship_zip_code: '33602',
92
- ship_country: 'US'
93
- )
94
- ```
95
-
96
-
97
-
98
- ### Get Transaction
99
-
100
- #### Parameter Properties
101
-
102
- | Parameter Name | Parameter Type | Description |
103
- | -------------- | -------------- | ------------------------------------------------------------ |
104
- | transaction_id | string | FraudLabs Pro transaction ID or Order ID. |
105
- | id_type | string | ID type. Either: **FraudlabsproRuby::Api::Order::FLP_ID** or **FraudlabsproRuby::Api::Order::ORDER_ID** |
106
-
107
- ```
108
- require 'fraudlabspro_ruby'
109
-
110
- FraudlabsproRuby::Configuration.api_key = 'YOUR_API_KEY'
111
-
112
- result = FraudlabsproRuby::Api::Order.getTransaction(
113
- transaction_id: '20180713-ZNVPV4',
114
- id_type: FraudlabsproRuby::Api::Order::FLP_ID
115
- )
116
- ```
117
-
118
-
119
-
120
- ### Feedback
121
-
122
- #### Object Properties
123
-
124
- | Property Name | Property Type | Description |
125
- | --------------- | ------------- | ------------------------------------------------------------ |
126
- | transaction_id | string | Unique transaction ID generated from **Validate** function. |
127
- | status | string | Perform APPROVE, REJECT, or REJECT_BLACKLIST action to transaction. Refer to [reference section](#feedback-status) for status code. |
128
- | note | string | Notes for the feedback request. |
129
-
130
- ```
131
- require 'fraudlabspro_ruby'
132
-
133
- FraudlabsproRuby::Configuration.api_key = 'YOUR_API_KEY'
134
-
135
- result = FraudlabsproRuby::Api::Order.feedback(
136
- transaction_id: '20180713-ZNVPV4',
137
- status: FraudlabsproRuby::Api::Order::APPROVE
138
- )
139
- ```
140
-
141
-
142
-
143
-
144
- ## SMS Verification
145
-
146
- ### Send SMS Verification
147
-
148
- #### Object Properties
149
-
150
- | Property Name | Property Type | Description |
151
- | ------------- | ------------- | ------------------------------------------------------------ |
152
- | tel | string | The recipient mobile phone number in E164 format which is a plus followed by just numbers with no spaces or parentheses. |
153
- | mesg | string | The message template for the SMS. Add <otp> as placeholder for the actual OTP to be generated. Max length is 140 characters. |
154
- | country_code | string | ISO 3166 country code for the recipient mobile phone number. If parameter is supplied, then some basic telephone number validation is done. |
155
-
156
- ```
157
- require 'fraudlabspro_ruby'
158
-
159
- FraudlabsproRuby::Configuration.api_key = 'YOUR_API_KEY'
160
-
161
- result = FraudlabsproRuby::Api::SMSVerification.sendSMS(
162
- tel: '+15616288674',
163
- mesg: 'Hi, your OTP is <otp>.',
164
- country_code: 'US'
165
- )
166
- ```
167
-
168
-
169
-
170
- ### Get SMS Verification Result
171
-
172
- #### Object Properties
173
-
174
- | Property Name | Property Type | Description |
175
- | ------------- | :-----------: | ------------------------------------------------------------ |
176
- | tran_id | string | The unique ID that was returned by the Send SMS Verification that triggered the OTP sms. |
177
- | otp | string | The OTP that was sent to the recipient’s phone. |
178
-
179
- ```
180
- require 'fraudlabspro_ruby'
181
-
182
- FraudlabsproRuby::Configuration.api_key = 'YOUR_API_KEY'
183
-
184
- result = FraudlabsproRuby::Api::SMSVerification.verifySMS(
185
- tran_id: 'UNIQUE_TRANS_ID',
186
- otp: 'OTP_RECEIVED'
187
- )
188
- ```
189
-
190
-
191
-
192
- # Reference
193
-
194
- #### Payment Method
195
-
196
- | Payment Method |
197
- | ---------------------------------------------- |
198
- | FraudlabsproRuby::Api::Order::CREDIT_CARD |
199
- | FraudlabsproRuby::Api::Order::PAYPAL |
200
- | FraudlabsproRuby::Api::Order::GOOGLE_CHECKOUT |
201
- | FraudlabsproRuby::Api::Order::CASH_ON_DELIVERY |
202
- | FraudlabsproRuby::Api::Order::MONEY_ORDER |
203
- | FraudlabsproRuby::Api::Order::WIRE_TRANSFER |
204
- | FraudlabsproRuby::Api::Order::BANK_DEPOSIT |
205
- | FraudlabsproRuby::Api::Order::BITCOIN |
206
- | FraudlabsproRuby::Api::Order::OTHERS |
207
-
208
-
209
-
210
- #### Feedback Status
211
-
212
- | Feedback Status | Description |
213
- | ---------------------------------------------- | ------------------------------------------- |
214
- | FraudlabsproRuby::Api::Order::APPROVE | Approves an order that under review status. |
215
- | FraudlabsproRuby::Api::Order::REJECT | Rejects an order than under review status. |
216
- | FraudlabsproRuby::Api::Order::REJECT_BLACKLIST | Rejects and blacklists an order. |
217
-
218
-
219
-
220
-
221
- LICENCE
222
- =====================
223
- See the LICENSE file.
1
+ FraudLabs Pro Ruby SDK
2
+ ========================
3
+ This Ruby module enables user to easily implement fraud detection feature into their solution using the API from https://www.fraudlabspro.com.
4
+
5
+ Below are the features of this PHP module:
6
+ - Fraud analysis and scoring
7
+ - IP address geolocation & proxy validation
8
+ - Email address validation
9
+ - Credit card issuing bank validation
10
+ - Transaction velocity validation
11
+ - Device transaction validation
12
+ - Blacklist validation
13
+ - Custom rules trigger
14
+ - Email notification of fraud orders
15
+ - Mobile app notification of fraud orders
16
+
17
+ This module requires API key to function. You may subscribe a free API key at https://www.fraudlabspro.com
18
+
19
+
20
+
21
+
22
+ Usage Example
23
+ ============
24
+ ### Validate Order
25
+
26
+ #### Object Properties
27
+
28
+ | Property Name | Property Type | Description |
29
+ | ------------------- | ------------- | ------------------------------------------------------------ |
30
+ | ip | string | IP address of online transaction. It supports both IPv4 and IPv6 address format. |
31
+ | first_name | string | User's first name. |
32
+ | last_name | string | User's last name. |
33
+ | username | string | User's username. |
34
+ | password | string | User's password. |
35
+ | email | string | User's email address. |
36
+ | phone | string | User's phone number. |
37
+ | bill_addr | string | Street address of billing address. |
38
+ | bill_city | string | City of billing address. |
39
+ | bill_state | string | State of billing address. It supports state codes, e.g. NY (New York), for state or province of United States or Canada. Please refer to [State & Province Codes](https://www.fraudlabspro.com/developer/reference/state-and-province-codes) for complete list. |
40
+ | bill_zip_code | string | Postal or ZIP code of billing address. |
41
+ | bill_country | string | Country of billing address. It requires the input of ISO-3166 alpha-2 country code, e.g. US for United States. Please refer to [Country Codes](https://www.fraudlabspro.com/developer/reference/country-codes) for complete list. |
42
+ | user_order_id | string | Merchant identifier to uniquely identify a transaction. It supports maximum of 15 characters user order id input. |
43
+ | user_order_memo | string | Merchant description of an order transaction. It supports maximum of 200 characters. |
44
+ | amount | float | Amount of the transaction. |
45
+ | quantity | integer | Total quantity of the transaction. |
46
+ | currency | string | Currency code used in the transaction. It requires the input of ISO-4217 (3 characters) currency code, e.g. USD for US Dollar. Please refer to [Currency Codes](https://www.fraudlabspro.com/developer/reference/currency-codes) for complete list. |
47
+ | department | string | Merchant identifier to uniquely identify a product or service department. |
48
+ | payment_mode | string | Payment mode of transaction. Please see [reference section](#payment-method). |
49
+ | card_number | string | Billing credit card number or BIN number. |
50
+ | card_avs | string | The single character AVS result returned by the credit card processor. Please refer to [AVS & CVV2 Response Codes](https://www.fraudlabspro.com/developer/reference/avs-and-cvv2-response-codes) for details. |
51
+ | card_cvv | string | The single character CVV2 result returned by the credit card processor. Please refer to [AVS & CVV2 Response Codes](https://www.fraudlabspro.com/developer/reference/avs-and-cvv2-response-codes) for details. |
52
+ | ship_addr | string | Street address of shipping address. |
53
+ | ship_city | string | City of shipping address. |
54
+ | ship_state | string | State of shipping address. It supports state codes, e.g. NY - New York, for state or province of United States or Canada. Please refer to [State & Province Codes](https://www.fraudlabspro.com/developer/reference/state-and-province-codes) for complete list. |
55
+ | ship_zip_code | string | Postal or ZIP code of shipping address. |
56
+ | ship_country | string | Country of shipping address. It requires the input of ISO-3166 alpha-2 country code, e.g. US for United States. Please refer to [Country Codes](https://www.fraudlabspro.com/developer/reference/country-codes) for complete list. |
57
+
58
+
59
+ ```
60
+ require 'fraudlabspro_ruby'
61
+
62
+ FraudlabsproRuby::Configuration.api_key = 'YOUR_API_KEY'
63
+
64
+ result = FraudlabsproRuby::Api::Order.validate(
65
+ ip: '146.112.62.105',
66
+ first_name: 'Hector',
67
+ last_name: 'Henderson',
68
+ email: 'hh5566@gmail.com',
69
+ phone: '561-628-8674',
70
+
71
+ # Billing information
72
+ bill_addr: '1766 PowderHouse Road',
73
+ bill_city: 'West Palm Beach',
74
+ bill_state: 'FL',
75
+ bill_zip_code: '33401',
76
+ bill_country: 'US',
77
+
78
+ # Order information
79
+ user_order_id: '67398',
80
+ user_order_memo: 'Online Shop',
81
+ amount: '79.89',
82
+ quantity: '1',
83
+ currency: 'USD',
84
+ payment_mode: FraudlabsproRuby::Api::Order::CREDIT_CARD,
85
+ card_number: '4556553172971283',
86
+
87
+ # Shipping information
88
+ ship_addr: '4469 Chestnut Street',
89
+ ship_city: 'Tampa',
90
+ ship_state: 'FL',
91
+ ship_zip_code: '33602',
92
+ ship_country: 'US'
93
+ )
94
+ ```
95
+
96
+
97
+
98
+ ### Get Transaction
99
+
100
+ #### Parameter Properties
101
+
102
+ | Parameter Name | Parameter Type | Description |
103
+ | -------------- | -------------- | ------------------------------------------------------------ |
104
+ | transaction_id | string | FraudLabs Pro transaction ID or Order ID. |
105
+ | id_type | string | ID type. Either: **FraudlabsproRuby::Api::Order::FLP_ID** or **FraudlabsproRuby::Api::Order::ORDER_ID** |
106
+
107
+ ```
108
+ require 'fraudlabspro_ruby'
109
+
110
+ FraudlabsproRuby::Configuration.api_key = 'YOUR_API_KEY'
111
+
112
+ result = FraudlabsproRuby::Api::Order.getTransaction(
113
+ transaction_id: '20180713-ZNVPV4',
114
+ id_type: FraudlabsproRuby::Api::Order::FLP_ID
115
+ )
116
+ ```
117
+
118
+
119
+
120
+ ### Feedback
121
+
122
+ #### Object Properties
123
+
124
+ | Property Name | Property Type | Description |
125
+ | --------------- | ------------- | ------------------------------------------------------------ |
126
+ | transaction_id | string | Unique transaction ID generated from **Validate** function. |
127
+ | status | string | Perform APPROVE, REJECT, or REJECT_BLACKLIST action to transaction. Refer to [reference section](#feedback-status) for status code. |
128
+ | note | string | Notes for the feedback request. |
129
+
130
+ ```
131
+ require 'fraudlabspro_ruby'
132
+
133
+ FraudlabsproRuby::Configuration.api_key = 'YOUR_API_KEY'
134
+
135
+ result = FraudlabsproRuby::Api::Order.feedback(
136
+ transaction_id: '20180713-ZNVPV4',
137
+ status: FraudlabsproRuby::Api::Order::APPROVE
138
+ )
139
+ ```
140
+
141
+
142
+
143
+
144
+ ## SMS Verification
145
+
146
+ ### Send SMS Verification
147
+
148
+ #### Object Properties
149
+
150
+ | Property Name | Property Type | Description |
151
+ | ------------- | ------------- | ------------------------------------------------------------ |
152
+ | tel | string | The recipient mobile phone number in E164 format which is a plus followed by just numbers with no spaces or parentheses. |
153
+ | mesg | string | The message template for the SMS. Add &lt;otp&gt; as placeholder for the actual OTP to be generated. Max length is 140 characters. |
154
+ | otp_timeout | integer | Timeout feature for OTP value in seconds. Default is 3600 seconds(1 hour). Max timeout is 86400 seconds(24 hours). |
155
+ | country_code | string | ISO 3166 country code for the recipient mobile phone number. If parameter is supplied, then some basic telephone number validation is done. |
156
+
157
+ ```
158
+ require 'fraudlabspro_ruby'
159
+
160
+ FraudlabsproRuby::Configuration.api_key = 'YOUR_API_KEY'
161
+
162
+ result = FraudlabsproRuby::Api::SMSVerification.sendSMS(
163
+ tel: '+15616288674',
164
+ mesg: 'Hi, your OTP is <otp>.',
165
+ otp_timeout: 3600,
166
+ country_code: 'US'
167
+ )
168
+ ```
169
+
170
+
171
+
172
+ ### Get SMS Verification Result
173
+
174
+ #### Object Properties
175
+
176
+ | Property Name | Property Type | Description |
177
+ | ------------- | :-----------: | ------------------------------------------------------------ |
178
+ | tran_id | string | The unique ID that was returned by the Send SMS Verification that triggered the OTP sms. |
179
+ | otp | string | The OTP that was sent to the recipient’s phone. |
180
+
181
+ ```
182
+ require 'fraudlabspro_ruby'
183
+
184
+ FraudlabsproRuby::Configuration.api_key = 'YOUR_API_KEY'
185
+
186
+ result = FraudlabsproRuby::Api::SMSVerification.verifySMS(
187
+ tran_id: 'UNIQUE_TRANS_ID',
188
+ otp: 'OTP_RECEIVED'
189
+ )
190
+ ```
191
+
192
+
193
+
194
+ # Reference
195
+
196
+ #### Payment Method
197
+
198
+ | Payment Method |
199
+ | ---------------------------------------------- |
200
+ | FraudlabsproRuby::Api::Order::CREDIT_CARD |
201
+ | FraudlabsproRuby::Api::Order::PAYPAL |
202
+ | FraudlabsproRuby::Api::Order::GOOGLE_CHECKOUT |
203
+ | FraudlabsproRuby::Api::Order::CASH_ON_DELIVERY |
204
+ | FraudlabsproRuby::Api::Order::MONEY_ORDER |
205
+ | FraudlabsproRuby::Api::Order::WIRE_TRANSFER |
206
+ | FraudlabsproRuby::Api::Order::BANK_DEPOSIT |
207
+ | FraudlabsproRuby::Api::Order::BITCOIN |
208
+ | FraudlabsproRuby::Api::Order::OTHERS |
209
+
210
+
211
+
212
+ #### Feedback Status
213
+
214
+ | Feedback Status | Description |
215
+ | ---------------------------------------------- | ------------------------------------------- |
216
+ | FraudlabsproRuby::Api::Order::APPROVE | Approves an order that under review status. |
217
+ | FraudlabsproRuby::Api::Order::REJECT | Rejects an order than under review status. |
218
+ | FraudlabsproRuby::Api::Order::REJECT_BLACKLIST | Rejects and blacklists an order. |
219
+
220
+
221
+
222
+
223
+ LICENCE
224
+ =====================
225
+ See the LICENSE file.
data/Rakefile CHANGED
@@ -1,2 +1,2 @@
1
- require "bundler/gem_tasks"
2
- task :default => :spec
1
+ require "bundler/gem_tasks"
2
+ task :default => :spec
@@ -1,37 +1,37 @@
1
- # coding: utf-8
2
-
3
- lib = File.expand_path("../lib", __FILE__)
4
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
- require "fraudlabspro_ruby/version"
6
-
7
- Gem::Specification.new do |s|
8
- s.name = "fraudlabspro_ruby"
9
- s.version = FraudlabsproRuby::VERSION
10
- s.authors = ["fraudlabspro"]
11
- s.email = ["support@fraudlabspro.com"]
12
- s.summary = "FraudLabs Pro Ruby SDK"
13
- s.description = "A Ruby SDK enables user to easily implement fraud detection feature into their solution using the API from www.fraudlabspro.com"
14
- s.homepage = "https://github.com/fraudlabspro/fraudlabspro-ruby"
15
- s.licenses = ["MIT"]
16
- s.require_paths = ["lib"]
17
- s.extra_rdoc_files = [
18
- "LICENSE.txt",
19
- "README.md"
20
- ]
21
- s.files = [
22
- "Gemfile",
23
- "Gemfile.lock",
24
- "LICENSE.txt",
25
- "README.md",
26
- "Rakefile",
27
- "fraudlabspro_ruby.gemspec",
28
- "lib/fraudlabspro_ruby.rb",
29
- "lib/fraudlabspro_ruby/api.rb",
30
- "lib/fraudlabspro_ruby/api/order.rb",
31
- "lib/fraudlabspro_ruby/api/smsverification.rb",
32
- "lib/fraudlabspro_ruby/configuration.rb",
33
- "lib/fraudlabspro_ruby/version.rb",
34
- "spec/spec_helper.rb",
35
- "spec/fraudlabspro_ruby_spec.rb"
36
- ]
1
+ # coding: utf-8
2
+
3
+ lib = File.expand_path("../lib", __FILE__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require "fraudlabspro_ruby/version"
6
+
7
+ Gem::Specification.new do |s|
8
+ s.name = "fraudlabspro_ruby"
9
+ s.version = FraudlabsproRuby::VERSION
10
+ s.authors = ["fraudlabspro"]
11
+ s.email = ["support@fraudlabspro.com"]
12
+ s.summary = "FraudLabs Pro Ruby SDK"
13
+ s.description = "A Ruby SDK enables user to easily implement fraud detection feature into their solution using the API from www.fraudlabspro.com"
14
+ s.homepage = "https://github.com/fraudlabspro/fraudlabspro-ruby"
15
+ s.licenses = ["MIT"]
16
+ s.require_paths = ["lib"]
17
+ s.extra_rdoc_files = [
18
+ "LICENSE.txt",
19
+ "README.md"
20
+ ]
21
+ s.files = [
22
+ "Gemfile",
23
+ "Gemfile.lock",
24
+ "LICENSE.txt",
25
+ "README.md",
26
+ "Rakefile",
27
+ "fraudlabspro_ruby.gemspec",
28
+ "lib/fraudlabspro_ruby.rb",
29
+ "lib/fraudlabspro_ruby/api.rb",
30
+ "lib/fraudlabspro_ruby/api/order.rb",
31
+ "lib/fraudlabspro_ruby/api/smsverification.rb",
32
+ "lib/fraudlabspro_ruby/configuration.rb",
33
+ "lib/fraudlabspro_ruby/version.rb",
34
+ "spec/spec_helper.rb",
35
+ "spec/fraudlabspro_ruby_spec.rb"
36
+ ]
37
37
  end
@@ -1,8 +1,8 @@
1
- require "fraudlabspro_ruby/api"
2
- require "fraudlabspro_ruby/api/order"
3
- require "fraudlabspro_ruby/api/smsverification"
4
- require "fraudlabspro_ruby/configuration"
5
- require "fraudlabspro_ruby/version"
6
-
7
- module FraudlabsproRuby
8
- end
1
+ require "fraudlabspro_ruby/api"
2
+ require "fraudlabspro_ruby/api/order"
3
+ require "fraudlabspro_ruby/api/smsverification"
4
+ require "fraudlabspro_ruby/configuration"
5
+ require "fraudlabspro_ruby/version"
6
+
7
+ module FraudlabsproRuby
8
+ end
@@ -22,6 +22,7 @@ module FraudlabsproRuby
22
22
  'format' => params[:format] || 'json',
23
23
  'tel' => params[:tel],
24
24
  'mesg' => params[:mesg] || '',
25
+ 'otp_timeout' => params[:otp_timeout] || 3600,
25
26
  'country_code' => params[:country_code] || ''
26
27
  })
27
28
 
@@ -1,9 +1,9 @@
1
- module FraudlabsproRuby
2
- class Configuration
3
- @api_key = ''
4
-
5
- class << self
6
- attr_accessor :api_key
7
- end
8
- end
9
- end
1
+ module FraudlabsproRuby
2
+ class Configuration
3
+ @api_key = ''
4
+
5
+ class << self
6
+ attr_accessor :api_key
7
+ end
8
+ end
9
+ end
@@ -1,3 +1,3 @@
1
- module FraudlabsproRuby
2
- VERSION = "3.1.0"
3
- end
1
+ module FraudlabsproRuby
2
+ VERSION = "3.2.0"
3
+ end
@@ -1,23 +1,23 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
-
3
- describe "FraudlabsproRuby" do
4
- it "work correctly with order validate" do
5
- FraudlabsproRuby::Configuration.api_key = 'YOUR_API_KEY'
6
- result = FraudlabsproRuby::Api::Order.validate(
7
- ip: '146.112.62.105'
8
- )
9
- expect(result).not_to be nil
10
- expect(result.code).to eq '200'
11
- end
12
-
13
- it "work correctly with get transaction" do
14
- FraudlabsproRuby::Configuration.api_key = 'YOUR_API_KEY'
15
- result = FraudlabsproRuby::Api::Order.getTransaction(
16
- transaction_id: '20180713-ZNVPV4',
17
- id_type: FraudlabsproRuby::Api::Order::FLP_ID
18
- )
19
- expect(result).not_to be nil
20
- expect(result.code).to eq '200'
21
- end
22
-
23
- end
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe "FraudlabsproRuby" do
4
+ it "work correctly with order validate" do
5
+ FraudlabsproRuby::Configuration.api_key = 'YOUR_API_KEY'
6
+ result = FraudlabsproRuby::Api::Order.validate(
7
+ ip: '146.112.62.105'
8
+ )
9
+ expect(result).not_to be nil
10
+ expect(result.code).to eq '200'
11
+ end
12
+
13
+ it "work correctly with get transaction" do
14
+ FraudlabsproRuby::Configuration.api_key = 'YOUR_API_KEY'
15
+ result = FraudlabsproRuby::Api::Order.getTransaction(
16
+ transaction_id: '20180713-ZNVPV4',
17
+ id_type: FraudlabsproRuby::Api::Order::FLP_ID
18
+ )
19
+ expect(result).not_to be nil
20
+ expect(result.code).to eq '200'
21
+ end
22
+
23
+ end
@@ -1,13 +1,13 @@
1
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
- $LOAD_PATH.unshift(File.dirname(__FILE__))
3
- require 'rspec'
4
- require 'fraudlabspro_ruby'
5
-
6
- # Requires supporting files with custom matchers and macros, etc,
7
- # in ./support/ and its subdirectories.
8
- Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
9
-
10
- RSpec.configure do |config|
11
-
12
- end
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
3
+ require 'rspec'
4
+ require 'fraudlabspro_ruby'
5
+
6
+ # Requires supporting files with custom matchers and macros, etc,
7
+ # in ./support/ and its subdirectories.
8
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
9
+
10
+ RSpec.configure do |config|
11
+
12
+ end
13
13
  require 'awesome_print'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fraudlabspro_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - fraudlabspro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-16 00:00:00.000000000 Z
11
+ date: 2020-09-03 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A Ruby SDK enables user to easily implement fraud detection feature into
14
14
  their solution using the API from www.fraudlabspro.com
@@ -54,7 +54,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
54
54
  version: '0'
55
55
  requirements: []
56
56
  rubyforge_project:
57
- rubygems_version: 2.6.14
57
+ rubygems_version: 2.7.6.2
58
58
  signing_key:
59
59
  specification_version: 4
60
60
  summary: FraudLabs Pro Ruby SDK