CyberSource / CyberSource/cybersource-rest-samples-node

Error on cardinal commerce - An unknown error has occurred on 3DS auth

Open
#70 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
43
Forks
66
Avg merge
23m
Merged PRs (30d)
2

Description

Hello, I have implement the REST API using this here . I am getting the response as expecting

{
  acsUrl: 'https://merchantacsstag.cardinalcommerce.com/MerchantACSWeb/pareq.jsp?vaa=b&gold=AAAAAAAAAAAAAAAAAAAAAAA...',
  pareq: 'eNpVkdtSwjAQhu/zFIzjdZ18=',
  md: 'UFAHURXleGnAlycLuJ7jPNRPEXeX1W2i3A9TNUKnNGvcdjMTXN',
  TermUrl: 'http://localhost:5001/card/callback'
}

And I am uing these here in this form (ejs)

<body>
  <div class="loader" id="loader" style="display: none"></div>
  <form id="acsform" action="<%= acsUrl %>" method="POST">
    <input type="hidden" name="PaReq" value="<%= pareq %>">
    <input type="hidden" name="TermUrl" value="<%= TermUrl %>">
    <input type="hidden" name="MD" value="<%= md %>">
  </form>
  <script>
    function showLoaderAndSubmitForm() {
      document.getElementById("loader").style.display = "block";
      setTimeout(function () {
        document.getElementById("acsform").submit();
      }, 1000); // Adjust the delay as needed
    }
    window.onload = showLoaderAndSubmitForm;
  </script>
</body>

Results to this shown on this screenshot

Screenshot 2023-12-05 005941

But after entering the OTP I am getting this error:

Screenshot 2023-12-05 010100

What can be causing error?
Do you have any complete Javascript REST API sample code with 3DS authentication?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Samples/PayerAuthentication/enroll-with-pending-authentication.js and compare its 3DS response handling with the posted EJS ACS form. Reproduce the OTP flow using the shown PaReq, TermUrl, MD, and acsUrl values, then identify the cause of the post-authentication error or document the missing complete JavaScript sample.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
api, payments
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.