Skip to content

Commit f6af5c8

Browse files
Update README.md
1 parent c4ef3de commit f6af5c8

1 file changed

Lines changed: 2 additions & 173 deletions

File tree

README.md

Lines changed: 2 additions & 173 deletions
Original file line numberDiff line numberDiff line change
@@ -16,179 +16,8 @@ Below are the features of this Ruby module:
1616

1717
This module requires API key to function. You may subscribe a free API key at https://www.fraudlabspro.com
1818

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-
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)
19221

19322

19423
# Reference

0 commit comments

Comments
 (0)