Skip to content

[GraphQl] Return full credit card type in the CustomerPaymentTokens query #32744

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 18 commits into
base: 2.4-develop
Choose a base branch
from

Conversation

Usik2203
Copy link
Contributor

@Usik2203 Usik2203 commented Apr 14, 2021

Description (*)

This PR add possibitity return full credit card type and fix issue #32368
Query

query {
  customerPaymentTokens {
    items {
      details
      public_hash
      payment_method_code
      type
    }
  }
}

Before

Braintree

{
  "data": {
    "customerPaymentTokens": {
      "items": [
        {
          "details": "{\"type\":\"VI\",\"maskedCC\":\"1111\",\"expirationDate\":\"09\\/2022\"}",
          "public_hash": "377c1514e0...",
          "payment_method_code": "braintree",
          "type": "card"
        }
      ]
    }
  }
}

Payflow Pro

{
  "data": {
    "customerPaymentTokens": {
      "items": [
        {
          "details": "{\"cc_type\":\"AE\",\"cc_exp_year\":2023,\"cc_exp_month\":3,\"cc_last_4\":\"8431\"}",
          "public_hash": "27f7503a714aa77cbdc4ab25fc8eb29b182905e969974bea893bcf6b3d41a87c",
          "payment_method_code": "payflowpro",
          "type": "card"
        }
      ]
    }
  }
}

Actual result

Braintree

{
  "data": {
    "customerPaymentTokens": {
      "items": [
        {
          "details": "{\"type\":\"Visa\",\"maskedCC\":\"1111\",\"expirationDate\":\"09\\/2022\"}",
          "public_hash": "377c1514e0...",
          "payment_method_code": "braintree",
          "type": "card"
        }
      ]
    }
  }
}

Payflow Pro

{
  "data": {
    "customerPaymentTokens": {
      "items": [
        {
          "details": "{\"cc_type\":\"American Express\",\"cc_exp_year\":2023,\"cc_exp_month\":3,\"cc_last_4\":\"8431\"}",
          "public_hash": "27f7503a714aa77cbdc4ab25fc8eb29b182905e969974bea893bcf6b3d41a87c",
          "payment_method_code": "payflowpro",
          "type": "card"
        }
      ]
    }
  }
}

Fixed Issues (if relevant)

  1. Fixes Return full credit card type in the CustomerPaymentTokens query. #32368

@m2-assistant
Copy link

m2-assistant bot commented Apr 14, 2021

Hi @Usik2203. Thank you for your contribution
Here are some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here

ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review.

For more details, please, review the Magento Contributor Guide documentation.

⚠️ According to the Magento Contribution requirements, all Pull Requests must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@magento-engcom-team magento-engcom-team added Component: VaultGraphQl Release Line: 2.4 Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner labels Apr 14, 2021
@gabrieldagama gabrieldagama added the Priority: P3 May be fixed according to the position in the backlog. label Apr 15, 2021
@dmytro-ch dmytro-ch self-assigned this Apr 16, 2021
@dmytro-ch
Copy link
Contributor

@magento run Functional Tests B2B , Integration Tests

@dmytro-ch dmytro-ch added the Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. label Apr 16, 2021
@Usik2203
Copy link
Contributor Author

@magento run all tests

@dmytro-ch
Copy link
Contributor

@magento run Functional Tests B2B , Functional Tests EE

@dmytro-ch
Copy link
Contributor

@magento run Functional Tests B2B

@magento-automated-testing
Copy link

No builds to run for your request.

@dmytro-ch
Copy link
Contributor

@magento run all tests

@dmytro-ch
Copy link
Contributor

@magento run Functional Tests EE

@engcom-Charlie
Copy link
Contributor

@magento run Functional Tests B2B, Functional Tests CE, Functional Tests EE

@engcom-Charlie
Copy link
Contributor

@magento run all tests

@engcom-Charlie
Copy link
Contributor

@magento run Functional Tests B2B, Functional Tests CE, Functional Tests EE, WebAPI Tests

@engcom-Charlie
Copy link
Contributor

@magento run all tests

@engcom-Dash
Copy link
Contributor

@magento run all tests

@engcom-Dash
Copy link
Contributor

@magento run all tests

@engcom-Dash
Copy link
Contributor

@magento run all tests

@engcom-Dash
Copy link
Contributor

@magento run all tests

@engcom-Dash
Copy link
Contributor

@magento run all tests

@engcom-Dash
Copy link
Contributor

@magento run Functional Tests B2B, Integration Tests

@engcom-Dash
Copy link
Contributor

@magento run all tests

@engcom-Dash
Copy link
Contributor

@magento run Unit Tests, Functional Tests B2B

@engcom-Dash
Copy link
Contributor

Moving to merge in progress.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Award: bug fix Award: test coverage Component: VaultGraphQl Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner Priority: P3 May be fixed according to the position in the backlog. Progress: ready for testing Release Line: 2.4 Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround.
Projects
Status: Merge in Progress
Development

Successfully merging this pull request may close these issues.

Return full credit card type in the CustomerPaymentTokens query.
10 participants