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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 24926851ec2fa052825a8b86c71264aacf016778320e20626695256fbd24312a
4
- data.tar.gz: b4b86d36a8444791127fd6ac2c7b72607be485466cace87e17d37a21221fa198
3
+ metadata.gz: 3ce85dd707b183bf1a4746b1dbfd5448a981bbd72949357caf9b447630b66458
4
+ data.tar.gz: 3003b42f85f918938da4087d5dace9cccc7e0bbf231c3595c906cbd80ee3f58b
5
5
  SHA512:
6
- metadata.gz: 492deb8c6356d86e48ce7c5964dbda4662d3b644897ce17831196e219048bf95d76aa52f89f53e2ccf05593bd3b32fe85323e247f56ac491abe7367a0a67f355
7
- data.tar.gz: a260ca9631d4389bfc06a7c0d77f7eb888283355c997eb1632323e48b617272b29c2112948deba56c328fba90660988c48c26d7d62a5523229e0f1b774da2b65
6
+ metadata.gz: a5e5ec191ae8e123f089c6affb0a1c1c610b430c0b501de926d36d744588a3c12c5818b8e225e9191e9d7d4c844e7638148aac960fb4bcb3d1ebf84c8271266a
7
+ data.tar.gz: 5e43141ae55a43718bfcbd3aa11cb67f6e88f6f9370bf538242d0289a9bcc19011ee0adcb4605b10a03e7db07579f1b34e817bc57c345d787816391a397c2777
@@ -13,7 +13,7 @@ module Workarea
13
13
  gateway.authorize( #[8]
14
14
  transaction.amount.cents, #[9]
15
15
  payment_source,
16
- transaction_args #[10]
16
+ transaction_args
17
17
  )
18
18
  end
19
19
 
@@ -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
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Workarea
2
2
  module Usaepay
3
- VERSION = "1.0.42".freeze
3
+ VERSION = "1.2.0".freeze
4
4
  end
5
5
  end
@@ -52,7 +52,6 @@ module Workarea
52
52
  end
53
53
 
54
54
  refute(page.has_content?('Success'))
55
- assert(page.has_content?(I18n.t('workarea.payment.store_credit_card_failure')))
56
55
  end
57
56
  end
58
57
  end
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.42
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-06-17 00:00:00.000000000 Z
11
+ date: 2020-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: workarea