Skip to content

Commit c1df83a

Browse files
Update README.md
1 parent 6ef2b90 commit c1df83a

File tree

1 file changed

+2
-234
lines changed

1 file changed

+2
-234
lines changed

README.md

Lines changed: 2 additions & 234 deletions
Original file line numberDiff line numberDiff line change
@@ -16,240 +16,8 @@ Below are the features of this Java 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-
| email | string | User's username. |
34-
| password | string | User's password. |
35-
| email | string | User's email address. |
36-
| user_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-
| number | string | Billing credit card number or BIN number. |
50-
| 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-
| 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-
import com.fraudlabspro.*;
60-
import java.util.Hashtable;
61-
62-
public class Main {
63-
64-
public static void main(String[] args) {
65-
// Configures FraudLabs Pro API key
66-
FraudLabsPro.APIKEY = "YOUR_API_KEY";
67-
68-
// Screen Order API
69-
Order order = new Order();
70-
71-
// Sets order details
72-
Hashtable<String, String> data = new Hashtable<>();
73-
74-
data.put("ip", "146.112.62.105"); // IP parameter is mandatory
75-
data.put("first_name", "Hector");
76-
data.put("last_name", "Henderson");
77-
data.put("email", "hh5566@gmail.com");
78-
data.put("user_phone", "561-628-8674");
79-
80-
// Billing information
81-
data.put("bill_addr", "1766 PowderHouse Road");
82-
data.put("bill_city", "West Palm Beach");
83-
data.put("bill_state", "FL");
84-
data.put("bill_country", "US");
85-
data.put("bill_zip_code", "33401");
86-
data.put("number", "4556553172971283");
87-
88-
// Order information
89-
data.put("user_order_id", "67398");
90-
data.put("user_order_memo", "Online shop");
91-
data.put("amount", "79.89");
92-
data.put("quantity", "1");
93-
data.put("currency", "USD");
94-
data.put("payment_mode", order.CREDIT_CARD); // Please refer reference section for full list of payment methods
95-
96-
// Shipping information
97-
data.put("ship_addr", "4469 Chestnut Street");
98-
data.put("ship_city", "Tampa");
99-
data.put("ship_state", "FL");
100-
data.put("ship_zip_code", "33602");
101-
data.put("ship_country", "US");
102-
103-
String result = order.validate(data); // Sends order details to FraudLabs Pro
104-
}
105-
}
106-
```
107-
108-
109-
110-
### Get Transaction
111-
112-
#### Parameter Properties
113-
114-
| Parameter Name | Parameter Type | Description |
115-
| -------------- | -------------- | ------------------------------------------------------------ |
116-
| id | string | FraudLabs Pro transaction ID or Order ID. |
117-
| id_type | string | ID type. Either: **[objectOfOrder].FLP_ID** or **[objectOfOrder].ORDER_ID** |
118-
119-
```
120-
import com.fraudlabspro.*;
121-
import java.util.Hashtable;
122-
123-
public class Main {
124-
125-
public static void main(String[] args) {
126-
// Configures FraudLabs Pro API key
127-
FraudLabsPro.APIKEY = "YOUR_API_KEY";
128-
129-
// Get Order Result API
130-
Order orderResults = new Order();
131-
132-
// Sets order ID to return all available information regarding the order
133-
Hashtable<String, String> data = new Hashtable<>();
134-
data.put("id", "20180709-NHAEUK");
135-
data.put("id_type", orderResults.FLP_ID);
136-
137-
String result = orderResults.getTransaction(data); // Obtains order results from FraudLabs Pro
138-
}
139-
}
140-
```
141-
142-
143-
144-
### Feedback
145-
146-
#### Object Properties
147-
148-
| Property Name | Property Type | Description |
149-
| ------------- | ------------- | ------------------------------------------------------------ |
150-
| id | string | Unique transaction ID generated from **Validate** function. |
151-
| action | string | Perform APPROVE, REJECT, or REJECT_BLACKLIST action to transaction. Refer to [reference section](#feedback-status) for status code. |
152-
| note | string | Notes for the feedback request. |
153-
154-
```
155-
import com.fraudlabspro.*;
156-
import java.util.Hashtable;
157-
158-
public class Main {
159-
160-
public static void main(String[] args) {
161-
// Configures FraudLabs Pro API key
162-
FraudLabsPro.APIKEY = "YOUR_API_KEY";
163-
164-
// Feedback Order API
165-
Order fb = new Order();
166-
167-
// Sets feedback details
168-
Hashtable<String, String> data = new Hashtable<>();
169-
data.put("id", "20180709-NHAEUK");
170-
data.put("action", fb.APPROVE); // Please refer to reference section for full list of feedback statuses
171-
data.put("note", "This customer made a valid purchase before.");
172-
173-
String result = fb.feedback(data); // Sends feedback details to FraudLabs Pro
174-
}
175-
}
176-
```
177-
178-
179-
180-
## SMS Verification
181-
182-
### Send SMS Verification
183-
184-
#### Object Properties
185-
186-
| Property Name | Property Type | Description |
187-
| ------------- | ------------- | ------------------------------------------------------------ |
188-
| tel | string | The recipient mobile phone number in E164 format which is a plus followed by just numbers with no spaces or parentheses. |
189-
| 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. |
190-
| otp_timeout | integer | Timeout feature for OTP value in seconds. Default is 3600 seconds(1 hour). Max timeout is 86400 seconds(24 hours). |
191-
| 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. |
192-
193-
```
194-
import com.fraudlabspro.*;
195-
import java.util.Hashtable;
196-
197-
public class Main {
198-
199-
public static void main(String[] args) {
200-
// Configures FraudLabs Pro API key
201-
FraudLabsPro.APIKEY = "YOUR_API_KEY";
202-
203-
// Send SMS Verification API
204-
SMSVerification sms = new SMSVerification();
205-
206-
// Sets SMS details for authentication purpose
207-
Hashtable<String, String> data = new Hashtable<>();
208-
data.put("tel", "+123456789");
209-
data.put("country_code", "US");
210-
data.put("mesg", "Hi, your OTP is <otp>.");
211-
data.put("otp_timeout", 3600);
212-
213-
String result = sms.sendSMS(data);
214-
}
215-
}
216-
```
217-
218-
219-
220-
### Get SMS Verification Result
221-
222-
#### Object Properties
223-
224-
| Property Name | Property Type | Description |
225-
| ------------- | ------------- | ------------------------------------------------------------ |
226-
| tran_id | string | The unique ID that was returned by the Send SMS Verification that triggered the OTP sms. |
227-
| otp | string | The OTP that was sent to the recipient’s phone. |
228-
229-
```
230-
import com.fraudlabspro.*;
231-
import java.util.Hashtable;
232-
233-
public class Main {
234-
235-
public static void main(String[] args) {
236-
// Configures FraudLabs Pro API key
237-
FraudLabsPro.APIKEY = "YOUR_API_KEY";
238-
239-
// Get Verification Result API
240-
SMSVerification verification = new SMSVerification();
241-
242-
// Sets transaction ID and otp details for verification purpose
243-
Hashtable<String, String> data = new Hashtable<>();
244-
data.put("tran_id", "UNIQUE_TRANS_ID");
245-
data.put("otp", "OTP_RECEIVED");
246-
247-
String result = verification.verifySMS(data);
248-
}
249-
}
250-
```
251-
252-
19+
# Developer Documentation
20+
To learn more about installation, usage, and code examples, please visit the developer documentation at [https://fraudlabspro-java.readthedocs.io/en/latest/index.html.](https://fraudlabspro-java.readthedocs.io/en/latest/index.html)
25321

25422
# Reference
25523

0 commit comments

Comments
 (0)