Skip to content

Commit f3430a8

Browse files
Supported new parameters in Screen Order API
1 parent f6af5c8 commit f3430a8

5 files changed

Lines changed: 17 additions & 12 deletions

File tree

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,11 @@ To learn more about installation, usage, and code examples, please visit the dev
2828
| ---------------------------------------------- |
2929
| FraudlabsproRuby::Api::Order::CREDIT_CARD |
3030
| FraudlabsproRuby::Api::Order::PAYPAL |
31-
| FraudlabsproRuby::Api::Order::GOOGLE_CHECKOUT |
3231
| FraudlabsproRuby::Api::Order::CASH_ON_DELIVERY |
33-
| FraudlabsproRuby::Api::Order::MONEY_ORDER |
34-
| FraudlabsproRuby::Api::Order::WIRE_TRANSFER |
3532
| FraudlabsproRuby::Api::Order::BANK_DEPOSIT |
36-
| FraudlabsproRuby::Api::Order::BITCOIN |
33+
| FraudlabsproRuby::Api::Order::GIFT_CARD |
34+
| FraudlabsproRuby::Api::Order::CRYPTO |
35+
| FraudlabsproRuby::Api::Order::WIRE_TRANSFER |
3736
| FraudlabsproRuby::Api::Order::OTHERS |
3837

3938

docs/source/code.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,15 @@ Retrieve geolocation information for an IP address.
109109
| last_name | string | (optional) User's last name. |
110110
| first_name | string | (optional) User's first name. |
111111
| username | string | (optional) User's username. |
112-
| password | string | (optional) User's password. |
113112
| email | string | (optional) User's email address. |
114113
| phone | string | (optional) User's phone number. |
115114
| bill_addr | string | (optional) Street address of billing address. |
116115
| bill_city | string | (optional) City of billing address. |
117116
| bill_state | string | (optional) State of billing address. It supports state codes, e.g. NY (New York), for state or province of United States or Canada.|
118117
| bill_country | string | (optional) Country of billing address. It requires the input of ISO-3166 alpha-2 country code, e.g. US for United States.|
119118
| bill_zip_code | string | (optional) Postal or ZIP code of billing address. |
119+
| ship_last_name | string | (optional) Receiver's last name. |
120+
| ship_first_name | string | (optional) Receiver's first name. |
120121
| ship_addr | string | (optional) Street address of shipping address. |
121122
| ship_city | string | (optional) City of shipping address. |
122123
| ship_state | string | (optional) State of shipping address. It supports state codes, e.g. NY - New York, for state or province of United States or Canada. |
@@ -131,7 +132,8 @@ Retrieve geolocation information for an IP address.
131132
| quantity | integer | (optional) Total quantity of the transaction. |
132133
| currency | string | (optional) Currency code used in the transaction. It requires the input of<br/> ISO-4217 (3 characters) currency code, e.g. USD for US Dollar. |
133134
| department | string | (optional) Merchant identifier to uniquely identify a product or service department. |
134-
| payment_mode | string | (optional) Payment mode of transaction. Valid values: creditcard \| affirm \| paypal \| googlecheckout \| bitcoin \| cod \| moneyorder \| wired \|<br/> bankdeposit \| elviauthorized \| paymitco \| cybersource \| sezzle \| viabill \| amazonpay \| pmnts_gateway \| giftcard \| ewayrapid \| others. |
135+
| payment_gateway | string | (optional) The name of payment gateway used to capture the payment. |
136+
| payment_mode | string | (optional) Payment mode of transaction. Valid values: creditcard \| paypal \| cod \| bankdeposit \| giftcard \| crypto \| wired \| others. |
135137
136138
:return: Returns the geolocation information in array. Refer below table for the fields avaliable in the array
137139
:rtype: array

docs/source/quickstart.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,12 @@ result = FraudlabsproRuby::Api::Order.validate(
4444
quantity: '1',
4545
currency: 'USD',
4646
payment_mode: FraudlabsproRuby::Api::Order::CREDIT_CARD,
47+
payment_gateway: FraudlabsproRuby::Api::Order::CREDIT_CARD,
4748
card_number: '4556553172971283',
4849

4950
# Shipping information
51+
ship_first_name: 'Hector',
52+
ship_last_name: 'Henderson',
5053
ship_addr: '4469 Chestnut Street',
5154
ship_city: 'Tampa',
5255
ship_state: 'FL',

lib/fraudlabspro_ruby/api/order.rb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,11 @@ class Order
1616
# Payment methods.
1717
CREDIT_CARD = 'CREDITCARD'
1818
PAYPAL = 'PAYPAL';
19-
GOOGLE_CHECKOUT = 'GOOGLECHECKOUT';
2019
CASH_ON_DELIVERY = 'COD';
21-
MONEY_ORDER = 'MONEYORDER';
22-
WIRE_TRANSFER = 'WIRED';
2320
BANK_DEPOSIT = 'BANKDEPOSIT';
24-
BITCOIN = 'BITCOIN';
21+
GIFT_CARD = 'GIFTCARD';
22+
CRYPTO = 'CRYPTO';
23+
WIRE_TRANSFER = 'WIRED';
2524
OTHERS = 'OTHERS';
2625

2726
# ID types.
@@ -63,7 +62,6 @@ def self.validate(params = {})
6362
'first_name' => params[:first_name] || '',
6463
'last_name' => params[:last_name] || '',
6564
'username_hash' => do_hash(params[:username]) || '',
66-
'password_hash' => do_hash(params[:password]) || '',
6765
'email' => params[:email] || '',
6866
'email_domain' => email_domain || '',
6967
'user_phone' => params[:phone] || '',
@@ -80,6 +78,7 @@ def self.validate(params = {})
8078
'quantity' => params[:quantity] || 1,
8179
'currency' => params[:currency] || 'USD',
8280
'department' => params[:department] || '',
81+
'payment_gateway' => params[:payment_gateway] || '',
8382
'payment_mode' => params[:payment_mode] || '',
8483

8584
# Credit card information.
@@ -89,6 +88,8 @@ def self.validate(params = {})
8988
'cvv_result' => params[:card_cvv] || '',
9089

9190
# Shipping information.
91+
'ship_first_name' => params[:ship_first_name] || '',
92+
'ship_last_name' => params[:ship_last_name] || '',
9293
'ship_addr' => params[:ship_addr] || '',
9394
'ship_city' => params[:ship_city] || '',
9495
'ship_state' => params[:ship_state] || '',

lib/fraudlabspro_ruby/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module FraudlabsproRuby
2-
VERSION = "4.0.0"
2+
VERSION = "4.0.1"
33
end

0 commit comments

Comments
 (0)