mastercard_masterpass_merchant 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +24 -0
- data/README.md +74 -0
- data/lib/mastercard_masterpass_merchant.rb +182 -0
- data/lib/mastercard_masterpass_merchant/api/checkout_api.rb +41 -0
- data/lib/mastercard_masterpass_merchant/api/decryption_api.rb +40 -0
- data/lib/mastercard_masterpass_merchant/api/express_checkout_api.rb +42 -0
- data/lib/mastercard_masterpass_merchant/api/merchant_initialization_api.rb +40 -0
- data/lib/mastercard_masterpass_merchant/api/postback_api.rb +39 -0
- data/lib/mastercard_masterpass_merchant/api/precheckout_data_api.rb +42 -0
- data/lib/mastercard_masterpass_merchant/api/session_key_signing_api.rb +40 -0
- data/lib/mastercard_masterpass_merchant/api/shopping_cart_api.rb +40 -0
- data/lib/mastercard_masterpass_merchant/models/acceptance_option.rb +177 -0
- data/lib/mastercard_masterpass_merchant/models/address.rb +243 -0
- data/lib/mastercard_masterpass_merchant/models/address_extension_point.rb +176 -0
- data/lib/mastercard_masterpass_merchant/models/authentication_options.rb +265 -0
- data/lib/mastercard_masterpass_merchant/models/base_card.rb +221 -0
- data/lib/mastercard_masterpass_merchant/models/brands.rb +165 -0
- data/lib/mastercard_masterpass_merchant/models/card.rb +244 -0
- data/lib/mastercard_masterpass_merchant/models/card_extension.rb +189 -0
- data/lib/mastercard_masterpass_merchant/models/card_type.rb +174 -0
- data/lib/mastercard_masterpass_merchant/models/card_types.rb +166 -0
- data/lib/mastercard_masterpass_merchant/models/checkout.rb +259 -0
- data/lib/mastercard_masterpass_merchant/models/checkout_dsrp.rb +210 -0
- data/lib/mastercard_masterpass_merchant/models/checkout_extension.rb +259 -0
- data/lib/mastercard_masterpass_merchant/models/contact.rb +275 -0
- data/lib/mastercard_masterpass_merchant/models/date_of_birth.rb +199 -0
- data/lib/mastercard_masterpass_merchant/models/decryption_request.rb +199 -0
- data/lib/mastercard_masterpass_merchant/models/decryption_response.rb +165 -0
- data/lib/mastercard_masterpass_merchant/models/detail.rb +176 -0
- data/lib/mastercard_masterpass_merchant/models/details.rb +176 -0
- data/lib/mastercard_masterpass_merchant/models/dsrp.rb +199 -0
- data/lib/mastercard_masterpass_merchant/models/dsrp_extension.rb +189 -0
- data/lib/mastercard_masterpass_merchant/models/dsrp_options.rb +188 -0
- data/lib/mastercard_masterpass_merchant/models/error.rb +222 -0
- data/lib/mastercard_masterpass_merchant/models/errors.rb +174 -0
- data/lib/mastercard_masterpass_merchant/models/express_checkout_request.rb +276 -0
- data/lib/mastercard_masterpass_merchant/models/express_checkout_response.rb +201 -0
- data/lib/mastercard_masterpass_merchant/models/extension_point.rb +163 -0
- data/lib/mastercard_masterpass_merchant/models/installment.rb +221 -0
- data/lib/mastercard_masterpass_merchant/models/installment_option.rb +198 -0
- data/lib/mastercard_masterpass_merchant/models/installment_options.rb +166 -0
- data/lib/mastercard_masterpass_merchant/models/installments.rb +176 -0
- data/lib/mastercard_masterpass_merchant/models/issuers.rb +165 -0
- data/lib/mastercard_masterpass_merchant/models/merchant_initialization_extension.rb +201 -0
- data/lib/mastercard_masterpass_merchant/models/merchant_initialization_request.rb +199 -0
- data/lib/mastercard_masterpass_merchant/models/merchant_initialization_response.rb +177 -0
- data/lib/mastercard_masterpass_merchant/models/merchant_initialization_response_extension.rb +165 -0
- data/lib/mastercard_masterpass_merchant/models/merchant_transaction.rb +274 -0
- data/lib/mastercard_masterpass_merchant/models/merchant_transactions.rb +176 -0
- data/lib/mastercard_masterpass_merchant/models/option.rb +197 -0
- data/lib/mastercard_masterpass_merchant/models/pairing_data_type.rb +186 -0
- data/lib/mastercard_masterpass_merchant/models/pairing_data_types.rb +188 -0
- data/lib/mastercard_masterpass_merchant/models/payment_acceptance.rb +166 -0
- data/lib/mastercard_masterpass_merchant/models/payment_acceptance_types_extension.rb +166 -0
- data/lib/mastercard_masterpass_merchant/models/payment_options_extensions.rb +178 -0
- data/lib/mastercard_masterpass_merchant/models/precheckout_card.rb +288 -0
- data/lib/mastercard_masterpass_merchant/models/precheckout_cards.rb +188 -0
- data/lib/mastercard_masterpass_merchant/models/precheckout_data.rb +259 -0
- data/lib/mastercard_masterpass_merchant/models/precheckout_data_request.rb +178 -0
- data/lib/mastercard_masterpass_merchant/models/precheckout_data_response.rb +211 -0
- data/lib/mastercard_masterpass_merchant/models/precheckout_reward_program.rb +243 -0
- data/lib/mastercard_masterpass_merchant/models/precheckout_shipping_address.rb +298 -0
- data/lib/mastercard_masterpass_merchant/models/precheckout_shipping_addresses.rb +188 -0
- data/lib/mastercard_masterpass_merchant/models/private_data.rb +177 -0
- data/lib/mastercard_masterpass_merchant/models/private_datas.rb +166 -0
- data/lib/mastercard_masterpass_merchant/models/reward_program.rb +221 -0
- data/lib/mastercard_masterpass_merchant/models/reward_programs.rb +188 -0
- data/lib/mastercard_masterpass_merchant/models/risk_decisioning.rb +178 -0
- data/lib/mastercard_masterpass_merchant/models/session_key_signing_request.rb +199 -0
- data/lib/mastercard_masterpass_merchant/models/session_key_signing_response.rb +210 -0
- data/lib/mastercard_masterpass_merchant/models/shipping_address.rb +265 -0
- data/lib/mastercard_masterpass_merchant/models/shopping_cart.rb +210 -0
- data/lib/mastercard_masterpass_merchant/models/shopping_cart_item.rb +210 -0
- data/lib/mastercard_masterpass_merchant/models/shopping_cart_request.rb +189 -0
- data/lib/mastercard_masterpass_merchant/models/shopping_cart_request_extension_point.rb +165 -0
- data/lib/mastercard_masterpass_merchant/models/shopping_cart_response.rb +177 -0
- data/lib/mastercard_masterpass_merchant/models/tokenization.rb +188 -0
- data/lib/mastercard_masterpass_merchant/models/types.rb +174 -0
- data/lib/mastercard_masterpass_merchant/models/wallet.rb +177 -0
- data/lib/mastercard_masterpass_merchant/tracker/sdk_api_tracker.rb +57 -0
- data/lib/mastercard_masterpass_merchant/version.rb +3 -0
- metadata +240 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b832a005c2b2059f7e95b99fb4482a5bfc028efb
|
4
|
+
data.tar.gz: 01f10a26ff80075ffdef52d534d309addd52ef9b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a71cd218b6df2dcffabc1208e3321c0f85854e0769ade412f087bcd8e57076c7eaee5471462a4c3bf00e2587d3b468de75e5788c0311cc3f493168b769aae963
|
7
|
+
data.tar.gz: 1dd49fbc91cb1b21cc45591787a5b27429eca465e43d72024e01613d615e7156c2da4ab12fbb7e4926995c08fa382f245c86a93a96ae19ba0faf3c0d08498126
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
Copyright (c) 2016, MasterCard International Incorporated
|
2
|
+
All rights reserved.
|
3
|
+
|
4
|
+
Redistribution and use in source and binary forms, with or without modification, are
|
5
|
+
permitted provided that the following conditions are met:
|
6
|
+
|
7
|
+
Redistributions of source code must retain the above copyright notice, this list of
|
8
|
+
conditions and the following disclaimer.
|
9
|
+
Redistributions in binary form must reproduce the above copyright notice, this list of
|
10
|
+
conditions and the following disclaimer in the documentation and/or other materials
|
11
|
+
provided with the distribution.
|
12
|
+
Neither the name of the MasterCard International Incorporated nor the names of its
|
13
|
+
contributors may be used to endorse or promote products derived from this software
|
14
|
+
without specific prior written permission.
|
15
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
16
|
+
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
17
|
+
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
|
18
|
+
SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
19
|
+
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
20
|
+
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
21
|
+
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
22
|
+
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
23
|
+
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
24
|
+
SUCH DAMAGE.
|
data/README.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# MastercardMasterpassMerchant
|
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.
|
6
|
+
|
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.
|
10
|
+
|
11
|
+
## Installation
|
12
|
+
|
13
|
+
Add this line to your application's Gemfile:
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
gem 'mastercard_masterpass_merchant'
|
17
|
+
```
|
18
|
+
|
19
|
+
And then execute:
|
20
|
+
|
21
|
+
$ bundle
|
22
|
+
|
23
|
+
Or install it yourself as:
|
24
|
+
|
25
|
+
$ gem install mastercard_masterpass_merchant
|
26
|
+
|
27
|
+
## Usage
|
28
|
+
Set MasterCard Configuration using Consumer Key & Private Key from developer's site and call API:
|
29
|
+
|
30
|
+
```
|
31
|
+
require 'mastercard_core_sdk'
|
32
|
+
require 'mastercard_masterpass_merchant'
|
33
|
+
|
34
|
+
MasterCardApiConfiguration.consumer_key = <Consumer Key>
|
35
|
+
MasterCardApiConfiguration.private_key = <Private Key>
|
36
|
+
MasterCardApiConfiguration.sandbox = false #By default SANDBOX environment is set, Set sandbox to false to use Production environment
|
37
|
+
|
38
|
+
request_token_response = RequestTokenApi.create(<URL>)```
|
39
|
+
|
40
|
+
OR
|
41
|
+
|
42
|
+
```
|
43
|
+
config = ApiConfigBuilder.new.name(<Environment Name>).consumer_key(<Consumer Key>).private_key(<Private Key>).host_url(<Host URL>).build
|
44
|
+
|
45
|
+
request_token_response = RequestTokenApi.create(<URL>, config)```
|
46
|
+
|
47
|
+
##Copyright
|
48
|
+
|
49
|
+
Copyright (c) 2016, MasterCard International Incorporated. See LICENSE for details.
|
50
|
+
|
51
|
+
##LICENSE
|
52
|
+
Copyright (c) 2016, MasterCard International Incorporated. All rights reserved.
|
53
|
+
|
54
|
+
Redistribution and use in source and binary forms, with or without modification, are
|
55
|
+
permitted provided that the following conditions are met:
|
56
|
+
|
57
|
+
Redistributions of source code must retain the above copyright notice, this list of
|
58
|
+
conditions and the following disclaimer.
|
59
|
+
Redistributions in binary form must reproduce the above copyright notice, this list of
|
60
|
+
conditions and the following disclaimer in the documentation and/or other materials
|
61
|
+
provided with the distribution.
|
62
|
+
Neither the name of the MasterCard International Incorporated nor the names of its
|
63
|
+
contributors may be used to endorse or promote products derived from this software
|
64
|
+
without specific prior written permission.
|
65
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
66
|
+
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
67
|
+
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
|
68
|
+
SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
69
|
+
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
70
|
+
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
71
|
+
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
72
|
+
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
73
|
+
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
74
|
+
SUCH DAMAGE.
|
@@ -0,0 +1,182 @@
|
|
1
|
+
# Common files
|
2
|
+
require_relative 'mastercard_masterpass_merchant/version'
|
3
|
+
require_relative 'mastercard_masterpass_merchant/tracker/sdk_api_tracker'
|
4
|
+
|
5
|
+
# Models
|
6
|
+
|
7
|
+
require_relative 'mastercard_masterpass_merchant/models/merchant_initialization_request'
|
8
|
+
|
9
|
+
require_relative 'mastercard_masterpass_merchant/models/merchant_initialization_response'
|
10
|
+
|
11
|
+
require_relative 'mastercard_masterpass_merchant/models/shopping_cart_request'
|
12
|
+
|
13
|
+
require_relative 'mastercard_masterpass_merchant/models/shopping_cart_request_extension_point'
|
14
|
+
|
15
|
+
require_relative 'mastercard_masterpass_merchant/models/shopping_cart'
|
16
|
+
|
17
|
+
require_relative 'mastercard_masterpass_merchant/models/shopping_cart_item'
|
18
|
+
|
19
|
+
require_relative 'mastercard_masterpass_merchant/models/shopping_cart_response'
|
20
|
+
|
21
|
+
require_relative 'mastercard_masterpass_merchant/models/checkout'
|
22
|
+
|
23
|
+
require_relative 'mastercard_masterpass_merchant/models/card'
|
24
|
+
|
25
|
+
require_relative 'mastercard_masterpass_merchant/models/shipping_address'
|
26
|
+
|
27
|
+
require_relative 'mastercard_masterpass_merchant/models/authentication_options'
|
28
|
+
|
29
|
+
require_relative 'mastercard_masterpass_merchant/models/precheckout_data_request'
|
30
|
+
|
31
|
+
require_relative 'mastercard_masterpass_merchant/models/pairing_data_types'
|
32
|
+
|
33
|
+
require_relative 'mastercard_masterpass_merchant/models/pairing_data_type'
|
34
|
+
|
35
|
+
require_relative 'mastercard_masterpass_merchant/models/precheckout_data_response'
|
36
|
+
|
37
|
+
require_relative 'mastercard_masterpass_merchant/models/precheckout_data'
|
38
|
+
|
39
|
+
require_relative 'mastercard_masterpass_merchant/models/reward_programs'
|
40
|
+
|
41
|
+
require_relative 'mastercard_masterpass_merchant/models/precheckout_reward_program'
|
42
|
+
|
43
|
+
require_relative 'mastercard_masterpass_merchant/models/precheckout_cards'
|
44
|
+
|
45
|
+
require_relative 'mastercard_masterpass_merchant/models/precheckout_card'
|
46
|
+
|
47
|
+
require_relative 'mastercard_masterpass_merchant/models/card_extension'
|
48
|
+
|
49
|
+
require_relative 'mastercard_masterpass_merchant/models/payment_acceptance_types_extension'
|
50
|
+
|
51
|
+
require_relative 'mastercard_masterpass_merchant/models/card_types'
|
52
|
+
|
53
|
+
require_relative 'mastercard_masterpass_merchant/models/card_type'
|
54
|
+
|
55
|
+
require_relative 'mastercard_masterpass_merchant/models/contact'
|
56
|
+
|
57
|
+
require_relative 'mastercard_masterpass_merchant/models/date_of_birth'
|
58
|
+
|
59
|
+
require_relative 'mastercard_masterpass_merchant/models/precheckout_shipping_addresses'
|
60
|
+
|
61
|
+
require_relative 'mastercard_masterpass_merchant/models/precheckout_shipping_address'
|
62
|
+
|
63
|
+
require_relative 'mastercard_masterpass_merchant/models/reward_program'
|
64
|
+
|
65
|
+
require_relative 'mastercard_masterpass_merchant/models/address'
|
66
|
+
|
67
|
+
require_relative 'mastercard_masterpass_merchant/models/address_extension_point'
|
68
|
+
|
69
|
+
require_relative 'mastercard_masterpass_merchant/models/base_card'
|
70
|
+
|
71
|
+
require_relative 'mastercard_masterpass_merchant/models/merchant_transactions'
|
72
|
+
|
73
|
+
require_relative 'mastercard_masterpass_merchant/models/merchant_transaction'
|
74
|
+
|
75
|
+
require_relative 'mastercard_masterpass_merchant/models/merchant_initialization_extension'
|
76
|
+
|
77
|
+
require_relative 'mastercard_masterpass_merchant/models/payment_options_extensions'
|
78
|
+
|
79
|
+
require_relative 'mastercard_masterpass_merchant/models/installments'
|
80
|
+
|
81
|
+
require_relative 'mastercard_masterpass_merchant/models/installment'
|
82
|
+
|
83
|
+
require_relative 'mastercard_masterpass_merchant/models/brands'
|
84
|
+
|
85
|
+
require_relative 'mastercard_masterpass_merchant/models/issuers'
|
86
|
+
|
87
|
+
require_relative 'mastercard_masterpass_merchant/models/installment_options'
|
88
|
+
|
89
|
+
require_relative 'mastercard_masterpass_merchant/models/payment_acceptance'
|
90
|
+
|
91
|
+
require_relative 'mastercard_masterpass_merchant/models/acceptance_option'
|
92
|
+
|
93
|
+
require_relative 'mastercard_masterpass_merchant/models/types'
|
94
|
+
|
95
|
+
require_relative 'mastercard_masterpass_merchant/models/dsrp_extension'
|
96
|
+
|
97
|
+
require_relative 'mastercard_masterpass_merchant/models/dsrp_options'
|
98
|
+
|
99
|
+
require_relative 'mastercard_masterpass_merchant/models/option'
|
100
|
+
|
101
|
+
require_relative 'mastercard_masterpass_merchant/models/merchant_initialization_response_extension'
|
102
|
+
|
103
|
+
require_relative 'mastercard_masterpass_merchant/models/checkout_extension'
|
104
|
+
|
105
|
+
require_relative 'mastercard_masterpass_merchant/models/tokenization'
|
106
|
+
|
107
|
+
require_relative 'mastercard_masterpass_merchant/models/risk_decisioning'
|
108
|
+
|
109
|
+
require_relative 'mastercard_masterpass_merchant/models/wallet'
|
110
|
+
|
111
|
+
require_relative 'mastercard_masterpass_merchant/models/checkout_dsrp'
|
112
|
+
|
113
|
+
require_relative 'mastercard_masterpass_merchant/models/dsrp'
|
114
|
+
|
115
|
+
require_relative 'mastercard_masterpass_merchant/models/private_datas'
|
116
|
+
|
117
|
+
require_relative 'mastercard_masterpass_merchant/models/private_data'
|
118
|
+
|
119
|
+
require_relative 'mastercard_masterpass_merchant/models/installment_option'
|
120
|
+
|
121
|
+
require_relative 'mastercard_masterpass_merchant/models/extension_point'
|
122
|
+
|
123
|
+
require_relative 'mastercard_masterpass_merchant/models/errors'
|
124
|
+
|
125
|
+
require_relative 'mastercard_masterpass_merchant/models/express_checkout_request'
|
126
|
+
|
127
|
+
require_relative 'mastercard_masterpass_merchant/models/express_checkout_response'
|
128
|
+
|
129
|
+
require_relative 'mastercard_masterpass_merchant/models/error'
|
130
|
+
|
131
|
+
require_relative 'mastercard_masterpass_merchant/models/details'
|
132
|
+
|
133
|
+
require_relative 'mastercard_masterpass_merchant/models/detail'
|
134
|
+
|
135
|
+
require_relative 'mastercard_masterpass_merchant/models/decryption_request'
|
136
|
+
|
137
|
+
require_relative 'mastercard_masterpass_merchant/models/decryption_response'
|
138
|
+
|
139
|
+
require_relative 'mastercard_masterpass_merchant/models/session_key_signing_request'
|
140
|
+
|
141
|
+
require_relative 'mastercard_masterpass_merchant/models/session_key_signing_response'
|
142
|
+
|
143
|
+
|
144
|
+
# APIs
|
145
|
+
|
146
|
+
|
147
|
+
require_relative 'mastercard_masterpass_merchant/api/checkout_api'
|
148
|
+
|
149
|
+
require_relative 'mastercard_masterpass_merchant/api/session_key_signing_api'
|
150
|
+
|
151
|
+
require_relative 'mastercard_masterpass_merchant/api/precheckout_data_api'
|
152
|
+
|
153
|
+
require_relative 'mastercard_masterpass_merchant/api/express_checkout_api'
|
154
|
+
|
155
|
+
require_relative 'mastercard_masterpass_merchant/api/decryption_api'
|
156
|
+
|
157
|
+
require_relative 'mastercard_masterpass_merchant/api/postback_api'
|
158
|
+
|
159
|
+
require_relative 'mastercard_masterpass_merchant/api/merchant_initialization_api'
|
160
|
+
|
161
|
+
require_relative 'mastercard_masterpass_merchant/api/shopping_cart_api'
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
module MastercardMasterpassMerchant
|
167
|
+
class << self
|
168
|
+
# Customize default settings for the SDK using block.
|
169
|
+
# MastercardMasterpassMerchant.configure do |config|
|
170
|
+
# config.username = "xxx"
|
171
|
+
# config.password = "xxx"
|
172
|
+
# end
|
173
|
+
# If no block given, return the default Configuration object.
|
174
|
+
def configure
|
175
|
+
if block_given?
|
176
|
+
yield(Configuration.default)
|
177
|
+
else
|
178
|
+
Configuration.default
|
179
|
+
end
|
180
|
+
end
|
181
|
+
end
|
182
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'uri'
|
2
|
+
require 'mastercard_core_sdk'
|
3
|
+
require_relative '../../mastercard_masterpass_merchant/models/checkout'
|
4
|
+
|
5
|
+
|
6
|
+
module MastercardMasterpassMerchant
|
7
|
+
module Api
|
8
|
+
|
9
|
+
class CheckoutApi
|
10
|
+
include MastercardCoreSdk::Core, MastercardCoreSdk::Client, MastercardCoreSdk::Exceptions
|
11
|
+
include MastercardMasterpassMerchant::Tracker
|
12
|
+
|
13
|
+
|
14
|
+
# Check out service
|
15
|
+
# This service is used to retrieve consumer's payment, shipping address, reward and 3-D Secure information from MasterPass. The checkout resource URL supplied by MasterPass must be decoded and consumed by the merchant as provided by MasterPass.
|
16
|
+
# @param pathid Checkout identifier.
|
17
|
+
# @param oauth_token Access token, which is used to retrieve checkout data.
|
18
|
+
# @param api_config Optional ApiConfig object specifying configuration : consumer key, private key, host URL.
|
19
|
+
# @return [Checkout]
|
20
|
+
def self.show(pathid, oauth_token, api_config = nil)
|
21
|
+
path = "/masterpass/v6/checkout/{pathid}"
|
22
|
+
service_request = ServiceRequest.new
|
23
|
+
service_request.path_params["pathid"] = pathid
|
24
|
+
|
25
|
+
service_request.headers["oauth_token"] = oauth_token
|
26
|
+
|
27
|
+
|
28
|
+
service_request.content_type = "application/xml"
|
29
|
+
api_client = ApiClient.new(api_config)
|
30
|
+
api_client.api_tracker = SdkApiTracker.new
|
31
|
+
api_client.error_handler = ErrorHandler.new
|
32
|
+
return api_client.call(path, service_request, "GET",Checkout)
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
|
41
|
+
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'uri'
|
2
|
+
require 'mastercard_core_sdk'
|
3
|
+
require_relative '../../mastercard_masterpass_merchant/models/decryption_response'
|
4
|
+
require_relative '../../mastercard_masterpass_merchant/models/decryption_request'
|
5
|
+
|
6
|
+
|
7
|
+
module MastercardMasterpassMerchant
|
8
|
+
module Api
|
9
|
+
|
10
|
+
class DecryptionApi
|
11
|
+
include MastercardCoreSdk::Core, MastercardCoreSdk::Client, MastercardCoreSdk::Exceptions
|
12
|
+
include MastercardMasterpassMerchant::Tracker
|
13
|
+
|
14
|
+
|
15
|
+
# Decryption Service
|
16
|
+
# Decryption Service Android SDK.
|
17
|
+
# @param decryption_request Decryption Service.
|
18
|
+
# @param api_config Optional ApiConfig object specifying configuration : consumer key, private key, host URL.
|
19
|
+
# @return [DecryptionResponse]
|
20
|
+
def self.create(decryption_request, api_config = nil)
|
21
|
+
path = "/masterpass/v6/decrypt"
|
22
|
+
service_request = ServiceRequest.new
|
23
|
+
|
24
|
+
|
25
|
+
service_request.body = decryption_request
|
26
|
+
|
27
|
+
service_request.content_type = "application/xml"
|
28
|
+
api_client = ApiClient.new(api_config)
|
29
|
+
api_client.api_tracker = SdkApiTracker.new
|
30
|
+
api_client.error_handler = ErrorHandler.new
|
31
|
+
return api_client.call(path, service_request, "POST",DecryptionResponse)
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
|
40
|
+
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'uri'
|
2
|
+
require 'mastercard_core_sdk'
|
3
|
+
require_relative '../../mastercard_masterpass_merchant/models/express_checkout_response'
|
4
|
+
require_relative '../../mastercard_masterpass_merchant/models/express_checkout_request'
|
5
|
+
|
6
|
+
|
7
|
+
module MastercardMasterpassMerchant
|
8
|
+
module Api
|
9
|
+
|
10
|
+
class ExpressCheckoutApi
|
11
|
+
include MastercardCoreSdk::Core, MastercardCoreSdk::Client, MastercardCoreSdk::Exceptions
|
12
|
+
include MastercardMasterpassMerchant::Tracker
|
13
|
+
|
14
|
+
|
15
|
+
# Express Checkout Service
|
16
|
+
# This provides qualified merchants with ability to provide the express checkout experience (wherein the consumer does not have to have log into the MasterPass wallet and thereby remains within the merchant experience throughout the transaction) to its MasterPass consumers.
|
17
|
+
# @param oauth_token Long access token, which is used to retrieve precheckout data.
|
18
|
+
# @param express_checkout_request Express Checkout Request.
|
19
|
+
# @param api_config Optional ApiConfig object specifying configuration : consumer key, private key, host URL.
|
20
|
+
# @return [ExpressCheckoutResponse]
|
21
|
+
def self.create(oauth_token, express_checkout_request, api_config = nil)
|
22
|
+
path = "/masterpass/v6/expresscheckout"
|
23
|
+
service_request = ServiceRequest.new
|
24
|
+
|
25
|
+
service_request.headers["oauth_token"] = oauth_token
|
26
|
+
|
27
|
+
service_request.body = express_checkout_request
|
28
|
+
|
29
|
+
service_request.content_type = "application/xml"
|
30
|
+
api_client = ApiClient.new(api_config)
|
31
|
+
api_client.api_tracker = SdkApiTracker.new
|
32
|
+
api_client.error_handler = ErrorHandler.new
|
33
|
+
return api_client.call(path, service_request, "POST",ExpressCheckoutResponse)
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
|
42
|
+
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'uri'
|
2
|
+
require 'mastercard_core_sdk'
|
3
|
+
require_relative '../../mastercard_masterpass_merchant/models/merchant_initialization_response'
|
4
|
+
require_relative '../../mastercard_masterpass_merchant/models/merchant_initialization_request'
|
5
|
+
|
6
|
+
|
7
|
+
module MastercardMasterpassMerchant
|
8
|
+
module Api
|
9
|
+
|
10
|
+
class MerchantInitializationApi
|
11
|
+
include MastercardCoreSdk::Core, MastercardCoreSdk::Client, MastercardCoreSdk::Exceptions
|
12
|
+
include MastercardMasterpassMerchant::Tracker
|
13
|
+
|
14
|
+
|
15
|
+
# Merchant Initialization Service
|
16
|
+
# This service is used to secure Lightbox connections between merchant and MasterPass. This service requires a request token (OAuthToken). This service call should be used when shopping cart service is not called, for example, pairing outside of checkout flow.
|
17
|
+
# @param merchant_initialization_request Merchant Initialization request.
|
18
|
+
# @param api_config Optional ApiConfig object specifying configuration : consumer key, private key, host URL.
|
19
|
+
# @return [MerchantInitializationResponse]
|
20
|
+
def self.create(merchant_initialization_request, api_config = nil)
|
21
|
+
path = "/masterpass/v6/merchant-initialization"
|
22
|
+
service_request = ServiceRequest.new
|
23
|
+
|
24
|
+
|
25
|
+
service_request.body = merchant_initialization_request
|
26
|
+
|
27
|
+
service_request.content_type = "application/xml"
|
28
|
+
api_client = ApiClient.new(api_config)
|
29
|
+
api_client.api_tracker = SdkApiTracker.new
|
30
|
+
api_client.error_handler = ErrorHandler.new
|
31
|
+
return api_client.call(path, service_request, "POST",MerchantInitializationResponse)
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
|
40
|
+
|