tlconnor-activemerchant 1.23.1 → 1.23.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -69,7 +69,7 @@ module ActiveMerchant #:nodoc:
|
|
69
69
|
access_token = options.delete(:access_token)
|
70
70
|
access_secret = options.delete(:access_secret)
|
71
71
|
|
72
|
-
{'X-PAYPAL-AUTHORIZATION' => x_pp_authorization_header(access_token, access_secret)}
|
72
|
+
{'X-PAYPAL-AUTHORIZATION' => x_pp_authorization_header(options[:login], options[:password], access_token, access_secret)}
|
73
73
|
else
|
74
74
|
{}
|
75
75
|
end
|
@@ -646,22 +646,22 @@ module ActiveMerchant #:nodoc:
|
|
646
646
|
(date.is_a?(Date) ? date.to_time : date).utc.iso8601
|
647
647
|
end
|
648
648
|
|
649
|
-
def x_pp_authorization_header(access_token, access_secret)
|
649
|
+
def x_pp_authorization_header(login, password, access_token, access_secret)
|
650
650
|
timestamp = Time.now.to_i.to_s
|
651
|
-
signature = x_pp_authorization_signature(timestamp, access_token, access_secret)
|
651
|
+
signature = x_pp_authorization_signature(timestamp, login, password, access_token, access_secret)
|
652
652
|
"token=#{access_token},signature=#{signature},timestamp=#{timestamp}"
|
653
653
|
end
|
654
654
|
|
655
|
-
def x_pp_authorization_signature(timestamp, access_token, access_secret)
|
655
|
+
def x_pp_authorization_signature(timestamp, login, password, access_token, access_secret)
|
656
656
|
# no query params, but if there were, this is where they'd go
|
657
657
|
query_params = {}
|
658
658
|
key = [
|
659
|
-
URI.encode(
|
659
|
+
URI.encode(password),
|
660
660
|
URI.encode(access_secret),
|
661
661
|
].join("&")
|
662
662
|
|
663
663
|
params = query_params.dup.merge({
|
664
|
-
"oauth_consumer_key" =>
|
664
|
+
"oauth_consumer_key" => login,
|
665
665
|
"oauth_version" => "1.0",
|
666
666
|
"oauth_signature_method" => "HMAC-SHA1",
|
667
667
|
"oauth_token" => access_token,
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tlconnor-activemerchant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 79
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 23
|
9
|
-
-
|
10
|
-
version: 1.23.
|
9
|
+
- 2
|
10
|
+
version: 1.23.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Tobias Luetke
|