@@ -20,11 +20,11 @@ You can validate your order as below:
2020
2121``` python
2222# import SDK to use the function
23- from fraudlabspro.fraudvalidation import FraudValidation
23+ from fraudlabspro.order import Order
2424
2525# Configure your API key
2626api_key = ' YOUR_API_KEY'
27- fraud_validation = FraudValidation (api_key)
27+ order = Order (api_key)
2828
2929# Order Details
3030dict1 = {
@@ -34,7 +34,7 @@ dict1 = {
3434 ' currency' : ' USD' ,
3535 ' amount' : ' 42' ,
3636 ' quantity' : 1 ,
37- ' paymentGateway' : ' stripe'
37+ ' paymentGateway' : ' stripe' ,
3838 ' paymentMethod' : ' creditcard'
3939 },
4040 ' card' : {
@@ -49,7 +49,7 @@ dict1 = {
4949 ' city' : ' West Palm Beach' ,
5050 ' state' : ' FL' ,
5151 ' postcode' : ' 33401' ,
52- ' country' : ' US' ,
52+ ' country' : ' US'
5353 },
5454 ' shipping' : {
5555 ' firstName' : ' Hector' ,
@@ -58,12 +58,13 @@ dict1 = {
5858 ' city' : ' Tampa' ,
5959 ' state' : ' FL' ,
6060 ' postcode' : ' 33602' ,
61- ' country' : ' US' ,
61+ ' country' : ' US'
6262 }
6363}
6464
6565# Sends the order details to FraudLabs Pro
66- result = fraud_validation.validate(dict1)
66+ result = order.validate(dict1)
67+ print (result)
6768```
6869
6970### Get Transaction
@@ -72,19 +73,19 @@ You can get the details of a transaction as below:
7273
7374``` python
7475# import SDK to use the function
75- from fraudlabspro.fraudvalidation import FraudValidation
76+ from fraudlabspro.order import Order
7677
7778# Configure your API key
7879api_key = ' YOUR_API_KEY'
79- fraud_validation = FraudValidation (api_key)
80+ order = Order (api_key)
8081
8182# Values to get transaction details
8283get_transaction_variables = {
83- ' id' : ' 20180705-WISXW2 ' ,
84+ ' id' : < fraudlabspro_id >
8485}
8586
8687# Send the values to FraudLabs Pro
87- result = fraud_validation .get_transaction(get_transaction_variables)
88+ result = order .get_transaction(get_transaction_variables)
8889```
8990
9091### Feedback an order
@@ -93,21 +94,21 @@ You can approve, reject or ignore a transaction as below:
9394
9495``` python
9596 # import SDK to use the function
96- from fraudlabspro.fraudvalidation import FraudValidation
97+ from fraudlabspro.order import Order
9798
9899# Configure your API key
99100api_key = ' YOUR_API_KEY'
100- fraud_validation = FraudValidation (api_key)
101+ order = Order (api_key)
101102
102103# Set feedback of the particular order
103104feedback_variables = {
104- ' id' : ' 20180705-WISXW2 ' ,
105+ ' id' : < fraudlabspro_id > ,
105106 # Three actions available: APPROVE, REJECT, REJECT_BLACKLIST
106107 ' action' : ' APPROVE' ,
107- ' notes' : ' This is for testing purpose.' ,
108+ ' notes' : ' This is for testing purpose.'
108109}
109110
110- result = fraud_validation .feedback(feedback_variables)
111+ result = order .feedback(feedback_variables)
111112```
112113
113114### Send SMS Verification
0 commit comments