UNPKG

mastercard-mastercom

Version:

Core functionality for MasterCard API

1 lines 3.02 kB
{"name":"mastercard-mastercom","version":"6.0.0","description":"Core functionality for MasterCard API","main":"index.js","scripts":{"test":"XUNIT_FILE=test/test-reports.xml mocha --timeout 0 --recursive --reporter xunit-file"},"repository":{"type":"git","url":"git@ldntools.labs.mastercard.com:open-api/sdk-core-nodejs.git"},"keywords":["MasterCard","API"],"dependencies":{"mastercard-api-core":"1.4.x"},"devDependencies":{"chai":"^3.5.0","chai-string":"^1.2.0","mocha":"^2.4.5","system-sleep":"^1.3.6","xunit-file":"^1.0.0"},"author":{"name":"MasterCard Worldwide","email":"APISupport@mastercard.com","url":"https://developer.mastercard.com"},"license":"BSD-2-Clause","readme":"\n Node.js Module for mastercard-mastercom\n\n\nWhat is it?\n------------\nA Node.js module for the `mastercard-mastercom` API. \nIf you have not already got an account sign up at https://developer.mastercard.com.\n\n\nInstallation\n------------\nIf you haven't done so, you first need to install the `mastercard-mastercom` module.\nYou can install it using node's package manager (NPM) with the following command:\n\n npm install mastercard-mastercom\n\n \nUsing the SDK\n--------------\nTo run an API request you first need to initialize the MasterCardAPI.\nYou only need to do initialize MasterCardAPI once per application instance.\n \n var mastercom = require('mastercard-mastercom');\n var MasterCardAPI = mastercom.MasterCardAPI;\n \n var consumerKey = \"your consumer key\"; // You should copy this from \"My Keys\" on your project page e.g. UTfbhDCSeNYvJpLL5l028sWL9it739PYh6LU5lZja15xcRpY!fd209e6c579dc9d7be52da93d35ae6b6c167c174690b72fa\n var keyStorePath = \"path to your .p12 private key file\"; // e.g. /Users/yourname/project/sandbox.p12 | C:\\Users\\yourname\\project\\sandbox.p12\n var keyAlias = \"keyalias\"; // For production: change this to the key alias you chose when you created your production key\n var keyPassword = \"keystorepassword\"; // For production: change this to the key alias you chose when you created your production key\n \n // You only need to do initialize MasterCardAPI once\n var authentication = new MasterCardAPI.OAuth(consumerKey, keyStorePath, keyAlias, keyPassword);\n MasterCardAPI.init({\n sandbox: true,\n authentication: authentication\n });\n \nFor examples and documentation see https://developer.mastercard.com\n\n\nLicensing\n---------\nPlease see LICENSE.txt for details.\n\n \nDocumentation\n-------------\nFor more detailed information on the API with examples visit the online\ndocumentation at https://developer.mastercard.com\n\n \nSupport\n-------\nPlease see https://developer.mastercard.com for information.\n\n \nCopyright\n---------\nCopyright (c) 2013 - 2016 MasterCard International Incorporated\nAll rights reserved.","readmeFilename":"README.md","_id":"mastercard-mastercom@6.0.0","_shasum":"935d78a5176638d13c406145419f8eaaa620e9d7","_from":"."}