fraudlabspro_ruby 4.0.0 → 4.0.1
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 +4 -4
- data/README.md +5 -177
- data/lib/fraudlabspro_ruby/api/order.rb +6 -5
- data/lib/fraudlabspro_ruby/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 486c924794b9bc2cbc50600be9217de8b4ca7e6a8e4d4e13e8c6ac0e2d399772
|
4
|
+
data.tar.gz: ffcfc769d26491207132e6f982a49b7c4ec2d566d95b8944579bc20b2f7e65ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eca6230b61d98b13b69e9ff1e80d304e983bbcc9276a66ebfcf736a09ec5852f99fd403a0086896b79617ee7586c000f0ceb61a0a2e09bb26f837769b4576ed7
|
7
|
+
data.tar.gz: f1dc37493073b91b1f48b4e906279b3b85346bc05376688a53a87cce2bdcd101f9ab125f7abcfc42c64ea7b4f79d3991ce1724b0c71555e6f8e65c4ec5b0a441
|
data/README.md
CHANGED
@@ -16,179 +16,8 @@ Below are the features of this Ruby module:
|
|
16
16
|
|
17
17
|
This module requires API key to function. You may subscribe a free API key at https://www.fraudlabspro.com
|
18
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. Valid values: creditcard, affirm, paypal, googlecheckout, bitcoin, cod, moneyorder, wired, bankdeposit, elviauthorized, paymitco, cybersource, sezzle, viabill, amazonpay, pmnts_gateway, giftcard, others. |
|
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
|
-
| 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: '+123456789',
|
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
|
-
|
19
|
+
# Developer Documentation
|
20
|
+
To learn more about installation, usage, and code examples, please visit the developer documentation at [https://fraudlabspro-ruby.readthedocs.io/en/latest/index.html.](https://fraudlabspro-ruby.readthedocs.io/en/latest/index.html)
|
192
21
|
|
193
22
|
|
194
23
|
# Reference
|
@@ -199,12 +28,11 @@ result = FraudlabsproRuby::Api::SMSVerification.verifySMS(
|
|
199
28
|
| ---------------------------------------------- |
|
200
29
|
| FraudlabsproRuby::Api::Order::CREDIT_CARD |
|
201
30
|
| FraudlabsproRuby::Api::Order::PAYPAL |
|
202
|
-
| FraudlabsproRuby::Api::Order::GOOGLE_CHECKOUT |
|
203
31
|
| FraudlabsproRuby::Api::Order::CASH_ON_DELIVERY |
|
204
|
-
| FraudlabsproRuby::Api::Order::MONEY_ORDER |
|
205
|
-
| FraudlabsproRuby::Api::Order::WIRE_TRANSFER |
|
206
32
|
| FraudlabsproRuby::Api::Order::BANK_DEPOSIT |
|
207
|
-
| FraudlabsproRuby::Api::Order::
|
33
|
+
| FraudlabsproRuby::Api::Order::GIFT_CARD |
|
34
|
+
| FraudlabsproRuby::Api::Order::CRYPTO |
|
35
|
+
| FraudlabsproRuby::Api::Order::WIRE_TRANSFER |
|
208
36
|
| FraudlabsproRuby::Api::Order::OTHERS |
|
209
37
|
|
210
38
|
|
@@ -16,12 +16,11 @@ module FraudlabsproRuby
|
|
16
16
|
# Payment methods.
|
17
17
|
CREDIT_CARD = 'CREDITCARD'
|
18
18
|
PAYPAL = 'PAYPAL';
|
19
|
-
GOOGLE_CHECKOUT = 'GOOGLECHECKOUT';
|
20
19
|
CASH_ON_DELIVERY = 'COD';
|
21
|
-
MONEY_ORDER = 'MONEYORDER';
|
22
|
-
WIRE_TRANSFER = 'WIRED';
|
23
20
|
BANK_DEPOSIT = 'BANKDEPOSIT';
|
24
|
-
|
21
|
+
GIFT_CARD = 'GIFTCARD';
|
22
|
+
CRYPTO = 'CRYPTO';
|
23
|
+
WIRE_TRANSFER = 'WIRED';
|
25
24
|
OTHERS = 'OTHERS';
|
26
25
|
|
27
26
|
# ID types.
|
@@ -63,7 +62,6 @@ module FraudlabsproRuby
|
|
63
62
|
'first_name' => params[:first_name] || '',
|
64
63
|
'last_name' => params[:last_name] || '',
|
65
64
|
'username_hash' => do_hash(params[:username]) || '',
|
66
|
-
'password_hash' => do_hash(params[:password]) || '',
|
67
65
|
'email' => params[:email] || '',
|
68
66
|
'email_domain' => email_domain || '',
|
69
67
|
'user_phone' => params[:phone] || '',
|
@@ -80,6 +78,7 @@ module FraudlabsproRuby
|
|
80
78
|
'quantity' => params[:quantity] || 1,
|
81
79
|
'currency' => params[:currency] || 'USD',
|
82
80
|
'department' => params[:department] || '',
|
81
|
+
'payment_gateway' => params[:payment_gateway] || '',
|
83
82
|
'payment_mode' => params[:payment_mode] || '',
|
84
83
|
|
85
84
|
# Credit card information.
|
@@ -89,6 +88,8 @@ module FraudlabsproRuby
|
|
89
88
|
'cvv_result' => params[:card_cvv] || '',
|
90
89
|
|
91
90
|
# Shipping information.
|
91
|
+
'ship_first_name' => params[:ship_first_name] || '',
|
92
|
+
'ship_last_name' => params[:ship_last_name] || '',
|
92
93
|
'ship_addr' => params[:ship_addr] || '',
|
93
94
|
'ship_city' => params[:ship_city] || '',
|
94
95
|
'ship_state' => params[:ship_state] || '',
|
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: 4.0.
|
4
|
+
version: 4.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- fraudlabspro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-30 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
|
- !ruby/object:Gem::Version
|
55
55
|
version: '0'
|
56
56
|
requirements: []
|
57
|
-
rubygems_version: 3.
|
57
|
+
rubygems_version: 3.5.9
|
58
58
|
signing_key:
|
59
59
|
specification_version: 4
|
60
60
|
summary: FraudLabs Pro Ruby SDK
|