workarea-usaepay 1.0.41 → 1.1.1

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: a89c33058a70e4bc964c5ea6d27236a766005795d057e477d91e272b49a02ed7
4
- data.tar.gz: 764b16194460342703c2ab33df722611c59b01dc74d1b44fe722bc8e6b7c89f3
3
+ metadata.gz: eea921e44240fa8e5b736780deb310ab0854f8026f458b886b0f7e2ab6972a0a
4
+ data.tar.gz: df56bea159a32d2a70f9a4e6aa40ee1109e734748f8cdc313eb0a0cb7c83add7
5
5
  SHA512:
6
- metadata.gz: d888fc34dffa6aa984ceef47b4c7cca7b90df786f613feadcf11814975105e33eb8d8044ee5ae7514c2ac334d2aeeecceafbe89154205635bf1d3737403e48a3
7
- data.tar.gz: eb57c2ef96819e31b17e0a50ca359cab881405f2e8cbf0a4e50cc897a64b4fea8ad4423cab9728a7ef1e50e552085b61351f4ed7c06bda75a9263efff164e944
6
+ metadata.gz: d5a79b0c95cc704dc46d13d921eacab2a0791601f47adcee08c9181d95db92591d3f814fa6079293b0b767676c59deda64f35c64ea4f27adf0a69bec85b84628
7
+ data.tar.gz: a8b8f96d83d72541def82c46faa1091251ddc975e7f69dc0471655be5afc34d8f37d81e66fbd0cab93ed3796196786e64526ee7980e98b1a18332e69ff9e98f4
@@ -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
 
@@ -2,7 +2,14 @@ module ActiveMerchant
2
2
  module Billing
3
3
  class BogusUsaEpayGateway < BogusGateway
4
4
  def verify(paysource, options)
5
- authorize(1, paysource, options)
5
+ case normalize(paysource)
6
+ when /1$/
7
+ Response.new(true, SUCCESS_MESSAGE, {:billingid => '1', :token => '1'}, :test => true, :authorization => AUTHORIZATION)
8
+ when /2$/
9
+ Response.new(false, FAILURE_MESSAGE, {:billingid => nil, :error => FAILURE_MESSAGE }, :test => true, :error_code => STANDARD_ERROR_CODE[:processing_error])
10
+ else
11
+ raise Error, error_message(paysource)
12
+ end
6
13
  end
7
14
  end
8
15
  end
@@ -8,6 +8,7 @@ module ActiveMerchant
8
8
 
9
9
  def authorize(money, credit_card, options = {})
10
10
  post = {}
11
+ post[:ip] = options[:ip_address] if options[:ip_address].present?
11
12
  add_amount(post, money)
12
13
  add_invoice(post, options)
13
14
 
@@ -1,5 +1,5 @@
1
1
  module Workarea
2
2
  module Usaepay
3
- VERSION = "1.0.41".freeze
3
+ VERSION = "1.1.1".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.41
4
+ version: 1.1.1
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-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: workarea