MastercardMerchantCheckout

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.

For more information, refer Masterpass Merchant Integration.

Features

Simplified merchant checkout flow with new Masterpass checkout API services.

Supports Masterpass Standard and Express checkout.

Installation

Add this line to your application's Gemfile:

gem 'mastercard_merchant_checkout'

And then execute:

$ bundle

Or install it yourself as:

$ gem install mastercard_merchant_checkout

Usage

Set configurations for Consumer Key & Private Key from Mastercard's developer's site to call Mastercard's checkout APIs:

require 'mastercard_core_sdk'
require 'mastercard_merchant_checkout'

MasterCardApiConfiguration.consumer_key = <Consumer Key>
MasterCardApiConfiguration.private_key = OpenSSL::PKCS12.new(File.open(<Path to P12 file>), <Password>).key
MasterCardApiConfiguration.sandbox = false  #By default Sandbox environment is set to true, Set sandbox to false to use Production environment.

Copyright (c) 2017, Mastercard International Incorporated. See LICENSE for details.

LICENSE

Copyright (c) 2017, 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.