Magento2: Module Vault rest api help
I create a webapi.xml in module vault:
<route url="/V1/vault/items" method="GET">
<service class="MagentoVaultApiPaymentTokenManagementInterface" method="getListByCustomerId"/>
<resources>
<resource ref="self" />
</resources>
<data>
<parameter name="customerId" force="true">%customer_id%</parameter>
</data>
</route>
this is a result:
"message": "Internal Error. Details are available in Magento log file. Report ID: webapi-5b7c371e39aa0"
}
Error:
main.CRITICAL: Report ID: webapi-5b7c371e39aa0; Message: Class MagentoVaultApiDataPaymentTokenSearchResultsInterfa does not exist {"exception":"[object] (Exception(code: -1): Report ID: webapi-5b7c371e39aa0; Message: Class MagentoVaultApiDataPaymentTokenSearchResultsInterfa does not exist at //vendor/magento/framework/Webapi/ErrorProcessor.php:205, ReflectionException(code: -1): Class MagentoVaultApiDataPaymentTokenSearchResultsInterfa does not exist at //vendor/magento/framework/Reflection/MethodsMap.php:155)"}
Can help me?
module api rest magento2.2.4 vault
add a comment |
I create a webapi.xml in module vault:
<route url="/V1/vault/items" method="GET">
<service class="MagentoVaultApiPaymentTokenManagementInterface" method="getListByCustomerId"/>
<resources>
<resource ref="self" />
</resources>
<data>
<parameter name="customerId" force="true">%customer_id%</parameter>
</data>
</route>
this is a result:
"message": "Internal Error. Details are available in Magento log file. Report ID: webapi-5b7c371e39aa0"
}
Error:
main.CRITICAL: Report ID: webapi-5b7c371e39aa0; Message: Class MagentoVaultApiDataPaymentTokenSearchResultsInterfa does not exist {"exception":"[object] (Exception(code: -1): Report ID: webapi-5b7c371e39aa0; Message: Class MagentoVaultApiDataPaymentTokenSearchResultsInterfa does not exist at //vendor/magento/framework/Webapi/ErrorProcessor.php:205, ReflectionException(code: -1): Class MagentoVaultApiDataPaymentTokenSearchResultsInterfa does not exist at //vendor/magento/framework/Reflection/MethodsMap.php:155)"}
Can help me?
module api rest magento2.2.4 vault
add a comment |
I create a webapi.xml in module vault:
<route url="/V1/vault/items" method="GET">
<service class="MagentoVaultApiPaymentTokenManagementInterface" method="getListByCustomerId"/>
<resources>
<resource ref="self" />
</resources>
<data>
<parameter name="customerId" force="true">%customer_id%</parameter>
</data>
</route>
this is a result:
"message": "Internal Error. Details are available in Magento log file. Report ID: webapi-5b7c371e39aa0"
}
Error:
main.CRITICAL: Report ID: webapi-5b7c371e39aa0; Message: Class MagentoVaultApiDataPaymentTokenSearchResultsInterfa does not exist {"exception":"[object] (Exception(code: -1): Report ID: webapi-5b7c371e39aa0; Message: Class MagentoVaultApiDataPaymentTokenSearchResultsInterfa does not exist at //vendor/magento/framework/Webapi/ErrorProcessor.php:205, ReflectionException(code: -1): Class MagentoVaultApiDataPaymentTokenSearchResultsInterfa does not exist at //vendor/magento/framework/Reflection/MethodsMap.php:155)"}
Can help me?
module api rest magento2.2.4 vault
I create a webapi.xml in module vault:
<route url="/V1/vault/items" method="GET">
<service class="MagentoVaultApiPaymentTokenManagementInterface" method="getListByCustomerId"/>
<resources>
<resource ref="self" />
</resources>
<data>
<parameter name="customerId" force="true">%customer_id%</parameter>
</data>
</route>
this is a result:
"message": "Internal Error. Details are available in Magento log file. Report ID: webapi-5b7c371e39aa0"
}
Error:
main.CRITICAL: Report ID: webapi-5b7c371e39aa0; Message: Class MagentoVaultApiDataPaymentTokenSearchResultsInterfa does not exist {"exception":"[object] (Exception(code: -1): Report ID: webapi-5b7c371e39aa0; Message: Class MagentoVaultApiDataPaymentTokenSearchResultsInterfa does not exist at //vendor/magento/framework/Webapi/ErrorProcessor.php:205, ReflectionException(code: -1): Class MagentoVaultApiDataPaymentTokenSearchResultsInterfa does not exist at //vendor/magento/framework/Reflection/MethodsMap.php:155)"}
Can help me?
module api rest magento2.2.4 vault
module api rest magento2.2.4 vault
asked Aug 21 '18 at 16:14
Francisco BrasFrancisco Bras
264
264
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Looks like there is an issue in Magento 2 core.
/**
* Lists payment tokens that match specified search criteria.
*
* @param int $customerId Customer ID.
* @return MagentoVaultApiDataPaymentTokenSearchResultsInterface Payment token search result interface.
* @since 100.1.0
*/
public function getListByCustomerId($customerId);
return value is MagentoVaultApiDataPaymentTokenSearchResultsInterface
but actually it returns MagentoVaultApiDataPaymentTokenInterface
. So set correct return type fix the issue.
Here you can check working sample https://github.com/troublediehard/mma-customapi
add a comment |
We needed to import tokens into the vault using the rest Api, so we knocked this module together: https://packagist.org/packages/zero1/vault-web-api hopefully it helps.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f239125%2fmagento2-module-vault-rest-api-help%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Looks like there is an issue in Magento 2 core.
/**
* Lists payment tokens that match specified search criteria.
*
* @param int $customerId Customer ID.
* @return MagentoVaultApiDataPaymentTokenSearchResultsInterface Payment token search result interface.
* @since 100.1.0
*/
public function getListByCustomerId($customerId);
return value is MagentoVaultApiDataPaymentTokenSearchResultsInterface
but actually it returns MagentoVaultApiDataPaymentTokenInterface
. So set correct return type fix the issue.
Here you can check working sample https://github.com/troublediehard/mma-customapi
add a comment |
Looks like there is an issue in Magento 2 core.
/**
* Lists payment tokens that match specified search criteria.
*
* @param int $customerId Customer ID.
* @return MagentoVaultApiDataPaymentTokenSearchResultsInterface Payment token search result interface.
* @since 100.1.0
*/
public function getListByCustomerId($customerId);
return value is MagentoVaultApiDataPaymentTokenSearchResultsInterface
but actually it returns MagentoVaultApiDataPaymentTokenInterface
. So set correct return type fix the issue.
Here you can check working sample https://github.com/troublediehard/mma-customapi
add a comment |
Looks like there is an issue in Magento 2 core.
/**
* Lists payment tokens that match specified search criteria.
*
* @param int $customerId Customer ID.
* @return MagentoVaultApiDataPaymentTokenSearchResultsInterface Payment token search result interface.
* @since 100.1.0
*/
public function getListByCustomerId($customerId);
return value is MagentoVaultApiDataPaymentTokenSearchResultsInterface
but actually it returns MagentoVaultApiDataPaymentTokenInterface
. So set correct return type fix the issue.
Here you can check working sample https://github.com/troublediehard/mma-customapi
Looks like there is an issue in Magento 2 core.
/**
* Lists payment tokens that match specified search criteria.
*
* @param int $customerId Customer ID.
* @return MagentoVaultApiDataPaymentTokenSearchResultsInterface Payment token search result interface.
* @since 100.1.0
*/
public function getListByCustomerId($customerId);
return value is MagentoVaultApiDataPaymentTokenSearchResultsInterface
but actually it returns MagentoVaultApiDataPaymentTokenInterface
. So set correct return type fix the issue.
Here you can check working sample https://github.com/troublediehard/mma-customapi
answered Sep 3 '18 at 14:59
Dmitri PortenkoDmitri Portenko
474315
474315
add a comment |
add a comment |
We needed to import tokens into the vault using the rest Api, so we knocked this module together: https://packagist.org/packages/zero1/vault-web-api hopefully it helps.
add a comment |
We needed to import tokens into the vault using the rest Api, so we knocked this module together: https://packagist.org/packages/zero1/vault-web-api hopefully it helps.
add a comment |
We needed to import tokens into the vault using the rest Api, so we knocked this module together: https://packagist.org/packages/zero1/vault-web-api hopefully it helps.
We needed to import tokens into the vault using the rest Api, so we knocked this module together: https://packagist.org/packages/zero1/vault-web-api hopefully it helps.
answered 7 mins ago
Adam CrosslandAdam Crossland
11
11
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f239125%2fmagento2-module-vault-rest-api-help%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown