30241

Create MasterCard tokenization API

Question:

I have a mobile app containing payment method via MasterCard. I have this tutorial:

<a href="https://ap-gateway.mastercard.com/api/documentation/apiDocumentation/rest-json/version/latest/api.html?locale=en_US" rel="nofollow">https://ap-gateway.mastercard.com/api/documentation/apiDocumentation/rest-json/version/latest/api.html?locale=en_US</a>

I want to create Tokenization which contains customer's master detail, I have followed this tutorial part:

<a href="https://ap-gateway.mastercard.com/api/documentation/apiDocumentation/rest-json/version/latest/operation/Tokenization%3A%20Create%20or%20Update%20Token%20(with%20system-generated%20token).html?locale=en_US" rel="nofollow">https://ap-gateway.mastercard.com/api/documentation/apiDocumentation/rest-json/version/latest/operation/Tokenization%3a Create or Update Token (with system-generated token).html?locale=en_US</a>

I tried with :

<strong>POST</strong> https://ap-gateway.mastercard.com/api/rest/version/41/merchant/{{MyMerchantID}}/token

<strong>Params:</strong>

{ "sourceOfFunds": { "type": "CARD", "provided": { "card":{ "number": "5123450000000008", "expiry": { "month": "05", "year": "17" } } }

Note: The number is a mastercard test number.

I am always get this error:

error cause "INVALID_REQUEST" explanation "Invalid credentials." result "ERROR"

I followed the params in second URL. Can anyone help? Are the params correct or I missed something?

Answer1:

In your configuration file, you need to set the following:

$configArray["merchantId"] = "[merchantId]";

// API username in the format below where Merchant ID is the same as above

$configArray["apiUsername"] = "merchant.[merchantId]";

// API password which can be configured in Merchant Administration

$configArray["password"] = "your api password";

Setting the above parameters in the config file will solve your problem

Recommend

  • Tokenize bank info with Stripe iOS SDK
  • Convert dataframe column to list of lists and convert back to dataframe, while maintaining ID associ
  • Can you render a page with multiple forms instead of one form for a jQuery, Rails 3 update?
  • Is it mandatory to have a doGet or doPost method?
  • Command line installation of Code Signing certificates, .p12 files, and mobileprovisions
  • What is the default HTTP verb in WebApi ? GET or POST?
  • Where these are stored?
  • Mixing WebForms and MVC: What should I do with the MasterPage?
  • Magento get URL before current
  • How to get links to open in the native browser in iOS Meteor apps?
  • Application level floating views with navigation in Android
  • TFS 2015 - Waiting for an agent to be requested
  • How to synchronize jQuery dialog box to act like alert() of Javascript
  • Object and struct member access and address offset calculation
  • Transactional Create with Validation in ServiceStack Redis Client
  • How to Cache Real-time Data?
  • How to clear text inside text field when radio button is select
  • Scrapy recursive link crawler
  • Ajax Loaded meta Tags
  • Body moving without any force applied? (Box2d)
  • How can I send an e-mail from a vbs script
  • What is Eclipse's Declaration View used for?
  • Get object from AWS S3 as a stream
  • Java applet as stand-alone Windows application?
  • MySQL WHERE-condition in procedure ignored
  • what is the difference between the asp.net mvc application and asp.net web application
  • Adding custom controls to a full screen movie
  • Jquery - Jquery Wysiwyg return html as a string
  • SVN: Merging two branches together
  • Invalid access key error using credentials redeemed from an amazon open id token
  • How do I rollback to a specific git commit
  • Comma separated Values
  • retrieve vertices with no linked edge in arangodb
  • using conditional logic : check if record exists; if it does, update it, if not, create it
  • Error creating VM instance in Google Compute Engine
  • Hits per day in Google Big Query
  • Understanding cpu registers
  • how does django model after text[] in postgresql [duplicate]
  • Add sale price programmatically to product variations
  • Append folder name and increment by 1 using batch script