Magento2: Module Vault rest api helpExtending Magento REST Api with a custom module fails on routeReport ID: webapi-560e30f44811c; Message: Class name does not exis in Magento2Passing Array in REST Api Magento2 (Post Method)Magento 2 Rest api POST JSON TypeProcessor errorMagento2 - A simple custom API moduleHow to pass data to update Order tracking number in magento 2 using REST API?Get pending orders for a specific customer using REST API Magento 2How can I create a plugin class for product save method when it is called from API?“Class mixed does not exist” with only one array param in the body in Magento 2Get error message by Report ID in magento2 Programmatically

How do I deal with an unproductive colleague in a small company?

Am I breaking OOP practice with this architecture?

Ambiguity in the definition of entropy

Avoiding the "not like other girls" trope?

How to compactly explain secondary and tertiary characters without resorting to stereotypes?

Why is consensus so controversial in Britain?

Apex Framework / library for consuming REST services

Why doesn't using multiple commands with a || or && conditional work?

What is a romance in Latin?

Is the myth that if you can play one instrument, you can learn another instrument with ease true?

How could indestructible materials be used in power generation?

What method can I use to design a dungeon difficult enough that the PCs can't make it through without killing them?

Detention in 1997

How much of data wrangling is a data scientist's job?

Size of subfigure fitting its content (tikzpicture)

CAST throwing error when run in stored procedure but not when run as raw query

Is it inappropriate for a student to attend their mentor's dissertation defense?

Expand and Contract

Why didn't Miles's spider sense work before?

Zip/Tar file compressed to larger size?

Forgetting the musical notes while performing in concert

How do conventional missiles fly?

What killed these X2 caps?

ssTTsSTtRrriinInnnnNNNIiinngg



Magento2: Module Vault rest api help


Extending Magento REST Api with a custom module fails on routeReport ID: webapi-560e30f44811c; Message: Class name does not exis in Magento2Passing Array in REST Api Magento2 (Post Method)Magento 2 Rest api POST JSON TypeProcessor errorMagento2 - A simple custom API moduleHow to pass data to update Order tracking number in magento 2 using REST API?Get pending orders for a specific customer using REST API Magento 2How can I create a plugin class for product save method when it is called from API?“Class mixed does not exist” with only one array param in the body in Magento 2Get error message by Report ID in magento2 Programmatically













3















I have created a webapi.xml in module vault:



<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">

<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>


</routes>


Give this type of error :-




this is a result:"message": "Internal Error. Details are available in
Magento log file. Report ID: webapi-5b7c371e39aa0" }




in my log file i see this error: -



Error:
main.CRITICAL: Report ID: webapi-5b7c371e39aa0; Message: Class MagentoVaultApiDataPaymentTokenSearchResultsInterfa does not exist "exception":"
[object] (Exception(code: -1): Report ID: webapi-5b7c371e39aa0; Message: Class \Magento\Vault\Api\Data\PaymentTokenSearchResultsInterfa does not exist at /<dir>/vendor/magento/framework/Webapi/ErrorProcessor.php:205, ReflectionException(code: -1): Class \Magento\Vault\Api\Data\PaymentTokenSearchResultsInterfa does not exist at /<dir>/vendor/magento/framework/Reflection/MethodsMap.php:155)" []


Can help me?










share|improve this question




























    3















    I have created a webapi.xml in module vault:



    <routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">

    <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>


    </routes>


    Give this type of error :-




    this is a result:"message": "Internal Error. Details are available in
    Magento log file. Report ID: webapi-5b7c371e39aa0" }




    in my log file i see this error: -



    Error:
    main.CRITICAL: Report ID: webapi-5b7c371e39aa0; Message: Class MagentoVaultApiDataPaymentTokenSearchResultsInterfa does not exist "exception":"
    [object] (Exception(code: -1): Report ID: webapi-5b7c371e39aa0; Message: Class \Magento\Vault\Api\Data\PaymentTokenSearchResultsInterfa does not exist at /<dir>/vendor/magento/framework/Webapi/ErrorProcessor.php:205, ReflectionException(code: -1): Class \Magento\Vault\Api\Data\PaymentTokenSearchResultsInterfa does not exist at /<dir>/vendor/magento/framework/Reflection/MethodsMap.php:155)" []


    Can help me?










    share|improve this question


























      3












      3








      3








      I have created a webapi.xml in module vault:



      <routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">

      <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>


      </routes>


      Give this type of error :-




      this is a result:"message": "Internal Error. Details are available in
      Magento log file. Report ID: webapi-5b7c371e39aa0" }




      in my log file i see this error: -



      Error:
      main.CRITICAL: Report ID: webapi-5b7c371e39aa0; Message: Class MagentoVaultApiDataPaymentTokenSearchResultsInterfa does not exist "exception":"
      [object] (Exception(code: -1): Report ID: webapi-5b7c371e39aa0; Message: Class \Magento\Vault\Api\Data\PaymentTokenSearchResultsInterfa does not exist at /<dir>/vendor/magento/framework/Webapi/ErrorProcessor.php:205, ReflectionException(code: -1): Class \Magento\Vault\Api\Data\PaymentTokenSearchResultsInterfa does not exist at /<dir>/vendor/magento/framework/Reflection/MethodsMap.php:155)" []


      Can help me?










      share|improve this question
















      I have created a webapi.xml in module vault:



      <routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">

      <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>


      </routes>


      Give this type of error :-




      this is a result:"message": "Internal Error. Details are available in
      Magento log file. Report ID: webapi-5b7c371e39aa0" }




      in my log file i see this error: -



      Error:
      main.CRITICAL: Report ID: webapi-5b7c371e39aa0; Message: Class MagentoVaultApiDataPaymentTokenSearchResultsInterfa does not exist "exception":"
      [object] (Exception(code: -1): Report ID: webapi-5b7c371e39aa0; Message: Class \Magento\Vault\Api\Data\PaymentTokenSearchResultsInterfa does not exist at /<dir>/vendor/magento/framework/Webapi/ErrorProcessor.php:205, ReflectionException(code: -1): Class \Magento\Vault\Api\Data\PaymentTokenSearchResultsInterfa does not exist at /<dir>/vendor/magento/framework/Reflection/MethodsMap.php:155)" []


      Can help me?







      module api rest magento2.2.4 vault






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 21 hours ago









      Manoj Deswal

      4,40791744




      4,40791744










      asked Aug 21 '18 at 16:14









      Francisco BrasFrancisco Bras

      264




      264




















          2 Answers
          2






          active

          oldest

          votes


















          2














          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






          share|improve this answer






























            0














            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.






            share|improve this answer























              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
              );



              );













              draft saved

              draft discarded


















              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









              2














              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






              share|improve this answer



























                2














                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






                share|improve this answer

























                  2












                  2








                  2







                  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






                  share|improve this answer













                  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







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Sep 3 '18 at 14:59









                  Dmitri PortenkoDmitri Portenko

                  474315




                  474315























                      0














                      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.






                      share|improve this answer



























                        0














                        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.






                        share|improve this answer

























                          0












                          0








                          0







                          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.






                          share|improve this answer













                          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.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered 22 hours ago









                          Adam CrosslandAdam Crossland

                          11




                          11



























                              draft saved

                              draft discarded
















































                              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.




                              draft saved


                              draft discarded














                              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





















































                              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







                              Popular posts from this blog

                              Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

                              Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

                              Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form