mastercard_psp_payment 1.0.0 → 1.1.0

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
  SHA1:
3
- metadata.gz: 82a7ceb0830b93a631af697f53a0b62c8366ac9d
4
- data.tar.gz: 13b97bd9370ec0d1ee2407469873c3f7cdef8812
3
+ metadata.gz: 5c9e7bf04c39bd6f7a95228ec447c528f67aa9e9
4
+ data.tar.gz: 1a7cfbede76410a4911ca4d870c5364b611d0f87
5
5
  SHA512:
6
- metadata.gz: 67e7da3fe5e72ad0f1a51482a9a4ff15d63ccedc3f550a75969adfdc322f34a567aa8740450f3e9d066bf44343bfb86f7cb7dd88529b107094b1d1b09d516169
7
- data.tar.gz: d30874fbc593b13ea98e8aebe67d4ce42e84c432ea9cfc88ec93f7843762db241d36e25c448ced4ca0f508e8cfb97149075c5ed467e583bf2456e9cf950041a2
6
+ metadata.gz: 4f05c82a35e0973a2f59c21ed032071f9adee747fa43a3195e06e3ac0d49a4403b90e83280fa8f072576a4f44a8e8f3d4de3c62afeb203b72c9d9c60e8be55e5
7
+ data.tar.gz: 1b9d43ed6c71e64354800efe968df788fde0f6535da20a9bac67d9e2aaf42f90fb47ef002574848b2432890088154680512ed71f6a1c098a39a84ab367c39f74
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2017, MasterCard International Incorporated
1
+ Copyright (c) 2018, MasterCard International Incorporated
2
2
  All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without modification, are
data/README.md CHANGED
@@ -1,11 +1,12 @@
1
1
  # MastercardPspPayment
2
- Masterpass™ is Mastercard’s integrated digital wallet and checkout solution.
3
- Masterpass enables consumers to store and manage their payment, shipping, and loyalty program information in their Masterpass Wallet, and to quickly and seamlessly access this information to make secure payments wherever they see the "Buy with MasterPass" button on a merchant website or mobile application.
2
+ Masterpass™ is Mastercard’s integrated digital wallet and checkout solution.
3
+ Masterpass enables consumers to store and manage their payment, shipping, and loyalty program information
4
+ in their Masterpass Wallet, and to quickly and seamlessly access this information to make secure payments
5
+ wherever they see the "Buy with MasterPass" button on a merchant website or mobile application.
4
6
 
5
- From a cardholder's perspective, Masterpass significantly speeds up the checkout process, removing the need to re-enter payment, shipping or loyalty program details during checkout.
6
- The Masterpass solution is simple, secure and easy for merchants to integrate into their existing website or application.
7
-
8
- For more information, refer [Masterpass PSP Integration](https://developer.mastercard.com/documentation/masterpass-integration-psp).
7
+ From a cardholder's perspective, Masterpass significantly speeds up the checkout process, removing the need
8
+ to re-enter payment, shipping or loyalty program details during checkout.
9
+ The Masterpass solution is simple, secure and easy for merchants to integrate into their existing website or application.
9
10
 
10
11
  ## Installation
11
12
 
@@ -23,12 +24,11 @@ Or install it yourself as:
23
24
 
24
25
  $ gem install mastercard_psp_payment
25
26
 
26
-
27
27
  ## Copyright
28
- Copyright (c) 2017, Mastercard International Incorporated. See LICENSE for details.
28
+ Copyright (c) 2018, Mastercard International Incorporated. See LICENSE for details.
29
29
 
30
30
  ## LICENSE
31
- Copyright (c) 2017, Mastercard International Incorporated. All rights reserved.
31
+ Copyright (c) 2018, Mastercard International Incorporated. All rights reserved.
32
32
 
33
33
  Redistribution and use in source and binary forms, with or without modification, are
34
34
  permitted provided that the following conditions are met:
@@ -11,7 +11,7 @@ module MastercardPspPayment
11
11
  include MastercardPspPayment::Tracker
12
12
 
13
13
 
14
- # PSP PaymentData Service :
14
+ # PSP PaymentData Service
15
15
  # This service is used by PSP to retrieve the consumer's payment, shipping address, and personal information.
16
16
  # @param transaction_id This is a transaction identifier.
17
17
  # @param api_config Optional ApiConfig object specifying configuration : consumer key, private key, host URL.
@@ -20,6 +20,9 @@ module MastercardPspPayment
20
20
  path = "/masterpass/psp-paymentdata/{transactionId}"
21
21
  service_request = ServiceRequest.new
22
22
  service_request.path_params["transactionId"] = transaction_id
23
+
24
+
25
+
23
26
  service_request.content_type = "application/json"
24
27
  api_client = ApiClient.new(api_config)
25
28
  api_client.api_tracker = SdkApiTracker.new
@@ -194,7 +194,7 @@ module MastercardPspPayment
194
194
  to_hash.to_s
195
195
  end
196
196
 
197
- # to_body is an alias to to_body (backward compatibility))
197
+ # to_body is an alias to to_body (backward compatibility)
198
198
  def to_body
199
199
  to_hash
200
200
  end
@@ -194,7 +194,7 @@ module MastercardPspPayment
194
194
  to_hash.to_s
195
195
  end
196
196
 
197
- # to_body is an alias to to_body (backward compatibility))
197
+ # to_body is an alias to to_body (backward compatibility)
198
198
  def to_body
199
199
  to_hash
200
200
  end
@@ -19,7 +19,7 @@ module MastercardPspPayment
19
19
  xml_accessor :brand_name, :from =>"brandName"
20
20
 
21
21
  # @!attribute account_number
22
- # @return [String] the PAN.
22
+ # @return [String] the card number, also known as Primary Account Number (PAN).
23
23
  xml_accessor :account_number, :from =>"accountNumber"
24
24
 
25
25
  # @!attribute card_holder_name
@@ -27,11 +27,11 @@ module MastercardPspPayment
27
27
  xml_accessor :card_holder_name, :from =>"cardHolderName"
28
28
 
29
29
  # @!attribute expiry_month
30
- # @return [Integer] the expiration month displayed on the payment card.
30
+ # @return [Integer] the PAN expiration month, returned as a one or two digit integer. No leading zero is required for single digit months e.g. April is 4.
31
31
  xml_accessor :expiry_month, :from =>"expiryMonth"
32
32
 
33
33
  # @!attribute expiry_year
34
- # @return [Integer] the expiration year displayed on the payment card.
34
+ # @return [Integer] the PAN expiration year, returned as a four digit integer.
35
35
  xml_accessor :expiry_year, :from =>"expiryYear"
36
36
 
37
37
  # @!attribute billing_address
@@ -42,6 +42,10 @@ module MastercardPspPayment
42
42
  # @return [String] the last four digit of actual card number.
43
43
  xml_accessor :last_four, :from =>"lastFour"
44
44
 
45
+ # @!attribute card_type
46
+ # @return [String] the card type (CREDIT/DEBIT) used in checkout. Available only for combo card transactions.
47
+ xml_accessor :card_type, :from =>"cardType"
48
+
45
49
 
46
50
  # Attribute mapping from ruby-style variable name to JSON key.
47
51
  def self.attribute_map
@@ -53,7 +57,8 @@ module MastercardPspPayment
53
57
  :expiry_month => :expiryMonth ,
54
58
  :expiry_year => :expiryYear ,
55
59
  :billing_address => :billingAddress ,
56
- :last_four => :lastFour
60
+ :last_four => :lastFour ,
61
+ :card_type => :cardType
57
62
 
58
63
  }
59
64
  end
@@ -97,6 +102,10 @@ module MastercardPspPayment
97
102
  self.last_four = attributes[:last_four]
98
103
  end
99
104
 
105
+ if attributes.has_key?(:card_type)
106
+ self.card_type = attributes[:card_type]
107
+ end
108
+
100
109
  end
101
110
 
102
111
 
@@ -113,7 +122,8 @@ module MastercardPspPayment
113
122
  expiry_month == o.expiry_month &&
114
123
  expiry_year == o.expiry_year &&
115
124
  billing_address == o.billing_address &&
116
- last_four == o.last_four
125
+ last_four == o.last_four &&
126
+ card_type == o.card_type
117
127
  end
118
128
 
119
129
  # @see the `==` method
@@ -123,7 +133,7 @@ module MastercardPspPayment
123
133
 
124
134
  # Calculate hash code according to all attributes.
125
135
  def hash
126
- [brand_id, brand_name, account_number, card_holder_name, expiry_month, expiry_year, billing_address, last_four].hash
136
+ [brand_id, brand_name, account_number, card_holder_name, expiry_month, expiry_year, billing_address, last_four, card_type].hash
127
137
  end
128
138
 
129
139
  # build the object from hash
@@ -185,7 +195,7 @@ module MastercardPspPayment
185
195
  to_hash.to_s
186
196
  end
187
197
 
188
- # to_body is an alias to to_body (backward compatibility))
198
+ # to_body is an alias to to_body (backward compatibility)
189
199
  def to_body
190
200
  to_hash
191
201
  end
@@ -235,7 +245,8 @@ module MastercardPspPayment
235
245
  :expiry_month => 'Integer',
236
246
  :expiry_year => 'Integer',
237
247
  :billing_address => 'Address',
238
- :last_four => 'String'
248
+ :last_four => 'String',
249
+ :card_type => 'String'
239
250
 
240
251
  }
241
252
  end
@@ -153,7 +153,7 @@ module MastercardPspPayment
153
153
  to_hash.to_s
154
154
  end
155
155
 
156
- # to_body is an alias to to_body (backward compatibility))
156
+ # to_body is an alias to to_body (backward compatibility)
157
157
  def to_body
158
158
  to_hash
159
159
  end
@@ -147,7 +147,7 @@ module MastercardPspPayment
147
147
  to_hash.to_s
148
148
  end
149
149
 
150
- # to_body is an alias to to_body (backward compatibility))
150
+ # to_body is an alias to to_body (backward compatibility)
151
151
  def to_body
152
152
  to_hash
153
153
  end
@@ -155,7 +155,7 @@ module MastercardPspPayment
155
155
  to_hash.to_s
156
156
  end
157
157
 
158
- # to_body is an alias to to_body (backward compatibility))
158
+ # to_body is an alias to to_body (backward compatibility)
159
159
  def to_body
160
160
  to_hash
161
161
  end
@@ -1,3 +1,3 @@
1
1
  module MastercardPspPayment
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mastercard_psp_payment
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mastercard
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-17 00:00:00.000000000 Z
11
+ date: 2018-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mastercard_core_sdk
@@ -124,7 +124,7 @@ dependencies:
124
124
  - - "~>"
125
125
  - !ruby/object:Gem::Version
126
126
  version: '5.0'
127
- description: SDK for Payment Service Provider(PSP) to make payments
127
+ description: Mastercard Masterpass Checkout Integration SDK for Payment Service Provider(PSP).
128
128
  email:
129
129
  - merchant_support@masterpass.com
130
130
  executables: []
@@ -145,7 +145,7 @@ files:
145
145
  - lib/mastercard_psp_payment/models/tokenization.rb
146
146
  - lib/mastercard_psp_payment/tracker/sdk_api_tracker.rb
147
147
  - lib/mastercard_psp_payment/version.rb
148
- homepage: https://developer.mastercard.com/documentation/masterpass-integration-psp
148
+ homepage: https://developer.mastercard.com
149
149
  licenses:
150
150
  - Mastercard
151
151
  metadata: {}
@@ -168,5 +168,5 @@ rubyforge_project:
168
168
  rubygems_version: 2.4.5.1
169
169
  signing_key:
170
170
  specification_version: 4
171
- summary: Masterpass Payment Service Provider(PSP) Payment SDK
171
+ summary: Masterpass Payment Service Provider(PSP) Payment SDK.
172
172
  test_files: []