authorizenet 1.9.2 → 1.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NzllOWZlMzBjYTM2ZGY2ODA0MmVjMTA1ZDMyODZmZTIzNzY3ZDk3YQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OGRkMWUxNmJjZTkxNGUyZTQ2NGE3M2UzNTMxM2ViMjQzZDEzZDhhYg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YmRlMTUwZjZhMWJlMjMwYTIzMDdmYzk5MTEzYWNlYThkNWY4M2IxODQ0N2E1
|
10
|
+
N2ZhNWM5ZTI5YzM1YTIyN2EzYTJmN2NhNTI0NWVkZWIwYmVmMjU5ZjRmMDU2
|
11
|
+
MjNiNjE3ODk1NjhmMWQ1NWU2MWQ1MTA2YTlkNTFlMmQyMTY3YjQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MTVmMGZlZmJiNTg3YTJlMWQzMWM2YjRkMjY2ZWFjZjQ3Y2I5OWNjMjRmNmU2
|
14
|
+
NjVlOGViNGJkNjQ5YmZjZWUzMzJkNmMyOWY1NjY2NGFjMDc4NzFkNWMzZDQz
|
15
|
+
N2NkNWFlNmQ4NGE5OTJlNzEwOGVmOWQ5ZGUzMTVkMWQzYzA5YTM=
|
@@ -54,12 +54,17 @@ module AuthorizeNet::API
|
|
54
54
|
|
55
55
|
end
|
56
56
|
|
57
|
-
def initialize(api_login_id, api_transaction_key, options = {})
|
57
|
+
def initialize(api_login_id = nil, api_transaction_key = nil, options = {})
|
58
58
|
super
|
59
59
|
end
|
60
|
-
|
60
|
+
|
61
|
+
def setOAuthOptions()
|
62
|
+
super
|
63
|
+
end
|
64
|
+
|
61
65
|
def make_request(request,responseClass,type)
|
62
|
-
|
66
|
+
setOAuthOptions()
|
67
|
+
unless responseClass.nil? or request.nil?
|
63
68
|
begin
|
64
69
|
@xml = serialize(request,type)
|
65
70
|
respXml = send_request(@xml)
|
@@ -79,8 +84,13 @@ module AuthorizeNet::API
|
|
79
84
|
builder = Nokogiri::XML::Builder.new(:encoding => 'utf-8') do |x|
|
80
85
|
x.send(type.to_sym, :xmlns => XML_NAMESPACE) {
|
81
86
|
x.merchantAuthentication {
|
82
|
-
|
83
|
-
|
87
|
+
if !@access_token.blank?
|
88
|
+
x.accessToken @access_token
|
89
|
+
end
|
90
|
+
if !@api_login_id.blank? || (@access_token.blank? && @api_login_id.blank?)
|
91
|
+
x.name @api_login_id
|
92
|
+
x.transactionKey @api_transaction_key
|
93
|
+
end
|
84
94
|
}
|
85
95
|
x.clientId clientId
|
86
96
|
x.send:insert, doc.root.element_children
|
@@ -1 +1 @@
|
|
1
|
-
clientId: sdk-ruby-1.9.
|
1
|
+
clientId: sdk-ruby-1.9.3
|
@@ -784,6 +784,7 @@ end
|
|
784
784
|
# impersonationAuthentication - ImpersonationAuthenticationType
|
785
785
|
# fingerPrint - FingerPrintType
|
786
786
|
# mobileDeviceId - SOAP::SOAPString
|
787
|
+
# accessToken - SOAP::SOAPString
|
787
788
|
class MerchantAuthenticationType
|
788
789
|
include ROXML
|
789
790
|
xml_accessor :name
|
@@ -793,8 +794,9 @@ end
|
|
793
794
|
xml_accessor :impersonationAuthentication, :as => ImpersonationAuthenticationType
|
794
795
|
xml_accessor :fingerPrint, :as => FingerPrintType
|
795
796
|
xml_accessor :mobileDeviceId
|
797
|
+
xml_accessor :accessToken
|
796
798
|
|
797
|
-
def initialize(name = nil, transactionKey = nil, sessionToken = nil, password = nil, impersonationAuthentication = nil, fingerPrint = nil, mobileDeviceId = nil)
|
799
|
+
def initialize(name = nil, transactionKey = nil, sessionToken = nil, password = nil, impersonationAuthentication = nil, fingerPrint = nil, mobileDeviceId = nil, accessToken = nil)
|
798
800
|
@name = name
|
799
801
|
@transactionKey = transactionKey
|
800
802
|
@sessionToken = sessionToken
|
@@ -802,6 +804,7 @@ end
|
|
802
804
|
@impersonationAuthentication = impersonationAuthentication
|
803
805
|
@fingerPrint = fingerPrint
|
804
806
|
@mobileDeviceId = mobileDeviceId
|
807
|
+
@accessToken = accessToken
|
805
808
|
end
|
806
809
|
end
|
807
810
|
|
@@ -1,7 +1,9 @@
|
|
1
1
|
module AuthorizeNet::API
|
2
2
|
class Transaction < ApiTransaction
|
3
|
-
|
4
|
-
|
3
|
+
attr_accessor :access_token
|
4
|
+
attr_accessor :options_OAuth
|
5
|
+
|
6
|
+
def initialize(api_login_id = nil, api_transaction_key = nil, options = {})
|
5
7
|
super
|
6
8
|
end
|
7
9
|
|
@@ -87,6 +87,24 @@ module AuthorizeNet
|
|
87
87
|
end
|
88
88
|
end
|
89
89
|
|
90
|
+
def setOAuthOptions()
|
91
|
+
if !@options_OAuth.blank?
|
92
|
+
@options_OAuth = @@option_defaults.merge(@options_OAuth)
|
93
|
+
@verify_ssl = options_OAuth[:verify_ssl]
|
94
|
+
@reference_id = options_OAuth[:reference_id]
|
95
|
+
|
96
|
+
@gateway = case options_OAuth[:gateway].to_s
|
97
|
+
when 'sandbox', 'test'
|
98
|
+
Gateway::TEST
|
99
|
+
when 'production', 'live'
|
100
|
+
Gateway::LIVE
|
101
|
+
else
|
102
|
+
@gateway = options_OAuth[:gateway]
|
103
|
+
options_OAuth[:gateway]
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
90
108
|
# Checks if the transaction has been configured for the sandbox or not. Return FALSE if the
|
91
109
|
# transaction is running against the production, TRUE otherwise.
|
92
110
|
def test?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: authorizenet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Authorize.Net
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|