创建MasterCard标记化API

问题描述 投票:0回答:1

我有一个包含万事达卡付款方式的移动应用程序。我有这个教程:

https://ap-gateway.mastercard.com/api/documentation/apiDocumentation/rest-json/version/latest/api.html?locale=en_US

我想创建包含客户主要细节的令牌化,我已经按照本教程部分进行了操作:

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

我尝试过:

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

PARAMS:

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

注意:该号码是万事达卡测试号码。

我总是得到这个错误:

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

我在第二个URL中跟踪了params。有人可以帮忙吗? params是正确的还是我错过了什么?

api mastercard
1个回答
0
投票

在配置文件中,您需要设置以下内容:

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

// API用户名,格式如下,其中商家ID与上述相同

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

//可以在Merchant Administration中配置的API密码

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

在配置文件中设置上述参数将解决您的问题

© www.soinside.com 2019 - 2024. All rights reserved.