MastercardMasterpassMerchant

MasterPass™ is MasterCard’s integrated digital wallet and checkout solution. 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.

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. The MasterPass solution is simple, secure and easy for merchants to integrate into their existing website or application.

Installation

Add this line to your application's Gemfile:

gem 'mastercard_masterpass_merchant'

And then execute:

$ bundle

Or install it yourself as:

$ gem install mastercard_masterpass_merchant

Usage

Set MasterCard Configuration using Consumer Key & Private Key from developer's site and call API:

require 'mastercard_core_sdk'
require 'mastercard_masterpass_merchant'

MasterCardApiConfiguration.consumer_key = <Consumer Key>
MasterCardApiConfiguration.private_key = <Private Key>
MasterCardApiConfiguration.sandbox = false  #By default SANDBOX environment is set, Set sandbox to false to use Production environment

request_token_response = RequestTokenApi.create(<URL>)```

OR

config = ApiConfigBuilder.new.name().consumer_key().private_key().host_url().build

request_token_response = RequestTokenApi.create(, config)```

Copyright (c) 2016, MasterCard International Incorporated. See LICENSE for details.

LICENSE

Copyright (c) 2016, MasterCard International Incorporated. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the MasterCard International Incorporated nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.