amazon_pay 2.2.0 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.txt +31 -0
- data/lib/amazon_pay/client.rb +20 -1
- data/lib/amazon_pay/ipn_handler.rb +2 -2
- data/lib/amazon_pay/request.rb +1 -0
- data/lib/amazon_pay/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5006fc46afb9dbe16ea7eace5e0df898a01c1eccbb5098043bbd6704bb5b5a0c
|
4
|
+
data.tar.gz: fe496a06f31ad3c7365680eb67b0011c879974e821487e4a7c72be775c591ac6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6c6b42f8616e9b940da9f9f1ac17d6ab1f48722431f9c83f749a3f3846cae6b308e114cd725ba2626ed246a2e9e33cba78fe0e4cdaa371f6c401378b65e9edb
|
7
|
+
data.tar.gz: e328413add4c82388f6f5c2a77ebb9849cff732aaa710dc010f10c5cf6978f1514bd854e6144d6cdd674afc601789e4990dff62a8d0f3311f3d4b4590c333af8
|
data/CHANGES.txt
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
2.3.1 May 2018
|
2
|
+
- Modify ipn_handler to work with new Cert format
|
3
|
+
- Add CHANGES file
|
4
|
+
|
5
|
+
2.3.0 April 2018
|
6
|
+
- Add GetMerchantAccountStatus
|
7
|
+
|
8
|
+
2.2.1 March 2018
|
9
|
+
- Create new Timestamp parameter on every request
|
10
|
+
|
11
|
+
2.2.0 Jan 2018
|
12
|
+
- Add ListOrderReference
|
13
|
+
- Add ListOrderReferenceByNextToken
|
14
|
+
|
15
|
+
2.1.0 Jan 2018
|
16
|
+
- Add Logging
|
17
|
+
- Add SetOrderAttribute
|
18
|
+
|
19
|
+
2.0.0 Feb 2017
|
20
|
+
- Pay with Amazon to Amazon Pay rebranding
|
21
|
+
|
22
|
+
1.x - 2015
|
23
|
+
- Update README
|
24
|
+
- Update documentation links
|
25
|
+
- Change Login with Amazon API class and method name
|
26
|
+
- Add one time transaction and subscriptions api flow
|
27
|
+
- Add marketplace api support
|
28
|
+
- Add client helper method
|
29
|
+
- Add get user info api
|
30
|
+
- Separate post request from client
|
31
|
+
- Initial release
|
data/lib/amazon_pay/client.rb
CHANGED
@@ -92,7 +92,6 @@ module AmazonPay
|
|
92
92
|
'AWSAccessKeyId' => @access_key,
|
93
93
|
'SignatureMethod' => 'HmacSHA256',
|
94
94
|
'SignatureVersion' => '2',
|
95
|
-
'Timestamp' => Time.now.utc.iso8601,
|
96
95
|
'Version' => AmazonPay::API_VERSION
|
97
96
|
}
|
98
97
|
|
@@ -444,6 +443,26 @@ module AmazonPay
|
|
444
443
|
operation(parameters, {})
|
445
444
|
end
|
446
445
|
|
446
|
+
# Returns status of the merchant
|
447
|
+
# @optional merchant_id [String]
|
448
|
+
# @optional mws_auth_token [String]
|
449
|
+
def get_merchant_account_status(
|
450
|
+
merchant_id: @merchant_id,
|
451
|
+
mws_auth_token: nil
|
452
|
+
)
|
453
|
+
|
454
|
+
parameters = {
|
455
|
+
'Action' => 'GetMerchantAccountStatus',
|
456
|
+
'SellerId' => merchant_id
|
457
|
+
}
|
458
|
+
|
459
|
+
optional = {
|
460
|
+
'MWSAuthToken' => mws_auth_token
|
461
|
+
}
|
462
|
+
|
463
|
+
operation(parameters, optional)
|
464
|
+
end
|
465
|
+
|
447
466
|
# Returns details about the Order Reference object and its current state
|
448
467
|
# @see https://pay.amazon.com/documentation/apireference/201751630#201751970
|
449
468
|
# @param amazon_order_reference_id [String]
|
@@ -223,8 +223,8 @@ module AmazonPay
|
|
223
223
|
|
224
224
|
def validate_subject(certificate_subject)
|
225
225
|
subject = certificate_subject.to_a
|
226
|
-
unless
|
227
|
-
subject
|
226
|
+
unless
|
227
|
+
subject.rassoc(COMMON_NAME)
|
228
228
|
then
|
229
229
|
msg = 'Error - Unable to verify certificate subject issued by Amazon'
|
230
230
|
raise IpnWasNotAuthenticError, msg
|
data/lib/amazon_pay/request.rb
CHANGED
@@ -68,6 +68,7 @@ module AmazonPay
|
|
68
68
|
# the post url.
|
69
69
|
def build_post_url
|
70
70
|
@optional.map { |k, v| @parameters[k] = v unless v.nil? }
|
71
|
+
@parameters['Timestamp'] = Time.now.utc.iso8601 unless @parameters.has_key?('Timestamp')
|
71
72
|
@parameters = @default_hash.merge(@parameters)
|
72
73
|
post_url = @parameters.sort.map { |k, v| "#{k}=#{custom_escape(v)}" }.join('&')
|
73
74
|
post_body = ['POST', @mws_endpoint.to_s, "/#{@sandbox_str}/#{AmazonPay::API_VERSION}", post_url].join("\n")
|
data/lib/amazon_pay/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: amazon_pay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- AmazonPay
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-02
|
11
|
+
date: 2018-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: AmazonPay Ruby SDK
|
14
14
|
email: amazon-pay-sdk@amazon.com
|
@@ -16,6 +16,7 @@ executables: []
|
|
16
16
|
extensions: []
|
17
17
|
extra_rdoc_files: []
|
18
18
|
files:
|
19
|
+
- CHANGES.txt
|
19
20
|
- LICENSE
|
20
21
|
- NOTICE
|
21
22
|
- README.md
|