workarea-usaepay 1.0.42 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/workarea/payment/authorize/credit_card.decorator +1 -1
- data/app/models/workarea/payment/credit_card_data.rb +3 -1
- data/lib/usaepay/bogus_usaepay.rb +1 -1
- data/lib/usaepay/gateway.rb +5 -1
- data/lib/workarea/usaepay/version.rb +1 -1
- data/test/system/workarea/storefront/accounts/credit_cards_system_test.decorator +0 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ce85dd707b183bf1a4746b1dbfd5448a981bbd72949357caf9b447630b66458
|
4
|
+
data.tar.gz: 3003b42f85f918938da4087d5dace9cccc7e0bbf231c3595c906cbd80ee3f58b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5e5ec191ae8e123f089c6affb0a1c1c610b430c0b501de926d36d744588a3c12c5818b8e225e9191e9d7d4c844e7638148aac960fb4bcb3d1ebf84c8271266a
|
7
|
+
data.tar.gz: 5e43141ae55a43718bfcbd3aa11cb67f6e88f6f9370bf538242d0289a9bcc19011ee0adcb4605b10a03e7db07579f1b34e817bc57c345d787816391a397c2777
|
@@ -2,9 +2,11 @@ module Workarea
|
|
2
2
|
class Payment
|
3
3
|
module CreditCardData
|
4
4
|
def transaction_args
|
5
|
+
ip_address = options[:checkout]&.order&.ip_address
|
5
6
|
{
|
6
7
|
order_id: tender.payment.id,
|
7
|
-
billing_address: billing_address
|
8
|
+
billing_address: billing_address,
|
9
|
+
ip_address: ip_address
|
8
10
|
}
|
9
11
|
end
|
10
12
|
|
@@ -4,7 +4,7 @@ module ActiveMerchant
|
|
4
4
|
def verify(paysource, options)
|
5
5
|
case normalize(paysource)
|
6
6
|
when /1$/
|
7
|
-
Response.new(true, SUCCESS_MESSAGE, {:billingid => '1'}, :test => true, :authorization => AUTHORIZATION)
|
7
|
+
Response.new(true, SUCCESS_MESSAGE, {:billingid => '1', :token => '1'}, :test => true, :authorization => AUTHORIZATION)
|
8
8
|
when /2$/
|
9
9
|
Response.new(false, FAILURE_MESSAGE, {:billingid => nil, :error => FAILURE_MESSAGE }, :test => true, :error_code => STANDARD_ERROR_CODE[:processing_error])
|
10
10
|
else
|
data/lib/usaepay/gateway.rb
CHANGED
@@ -7,10 +7,14 @@ module ActiveMerchant
|
|
7
7
|
|
8
8
|
|
9
9
|
def authorize(money, credit_card, options = {})
|
10
|
+
billing_address = options[:billing_address] || options[:address]
|
11
|
+
|
10
12
|
post = {}
|
13
|
+
post[:ip] = options[:ip_address] if options[:ip_address].present?
|
14
|
+
post[:name] = billing_address[:name] if billing_address.present?
|
11
15
|
add_amount(post, money)
|
12
16
|
add_invoice(post, options)
|
13
|
-
|
17
|
+
add_address_for_type(:billing, post, credit_card, billing_address) if billing_address
|
14
18
|
if credit_card.is_a? String
|
15
19
|
add_token(post, credit_card)
|
16
20
|
else
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: workarea-usaepay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gunasekaran.Raja
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: workarea
|