amazon_pay 2.2.0 → 2.3.1

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,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 294f94d2300bab4c088fe8f4609bcf25ae97b615cff07c7d5603e272a579c7d7
4
- data.tar.gz: 8a438dbee412d742240305b6e338cb0be4ffff769d84d1fe3bb13a4ffdc035e7
3
+ metadata.gz: 5006fc46afb9dbe16ea7eace5e0df898a01c1eccbb5098043bbd6704bb5b5a0c
4
+ data.tar.gz: fe496a06f31ad3c7365680eb67b0011c879974e821487e4a7c72be775c591ac6
5
5
  SHA512:
6
- metadata.gz: 348548089b4b8290b71a429b6fcb7b1836c2a8cf411387419d9c9c480e9c9cab652b04b9a45868afb8bb69cd1283348e61c46953691bef29d4635756513301f2
7
- data.tar.gz: 2f0f99a204da9a5e9119470fc7b5502f080199e794c0d3ef170f6b58a6d8e63c672ee2625196dbe6cae4d6e12d16b234135584805db2e20e06cb5b2259bb0f44
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
@@ -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[4][1] == COMMON_NAME
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
@@ -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")
@@ -1,5 +1,5 @@
1
1
  module AmazonPay
2
- VERSION = "2.2.0"
2
+ VERSION = "2.3.1"
3
3
  SDK_NAME = "amazon-pay-sdk-ruby"
4
4
  API_VERSION = "2013-01-01"
5
5
  end
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.2.0
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-26 00:00:00.000000000 Z
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