Skip to content
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

Authorize.net Transaction Fails From Admin Order #24844

Closed
touqeer-verve opened this issue Oct 3, 2019 · 14 comments
Closed

Authorize.net Transaction Fails From Admin Order #24844

touqeer-verve opened this issue Oct 3, 2019 · 14 comments
Assignees
Labels
Component: Admin Component: Authorizenet Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@touqeer-verve
Copy link

touqeer-verve commented Oct 3, 2019

Description of the issue(*)

We successfully create order from frontend with Authorized.net in Magento 2.3.1, but when trying to place an order from admin, i showing me Transaction declined.

Preconditions (*)

  1. Magneto CE 2.3.1 is installed
  2. Authorize.net (a new method, not the direct post) is configured correctly (Production mode). Enable debugging.

Steps to reproduce (*)

  1. Add item in the backend admin order.
  2. Enter the billing address.
  3. Enter the shipping address and shipping type
  4. Enter card details
  5. Submit order

Expected result (*)

  1. Order Should be successfully placed.

Actual result (*)

I am getting the following error when placing an order from admin using authorized.net payment method on 2.3.1
'response' => '{"transactionResponse":{"SupplementalDataQualificationIndicator":0},"messages":{"resultCode":"Error","message":[{"code":"E00076","text":"dataDescriptor contains invalid value."},{"code":"E00076","text":"dataValue contains invalid value."}]}}

@m2-assistant
Copy link

m2-assistant bot commented Oct 3, 2019

Hi @touqeer-verve. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.3-develop instance - upcoming 2.3.x release

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

@touqeer-verve do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
  • no

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Oct 3, 2019
@touqeer-verve
Copy link
Author

touqeer-verve commented Oct 3, 2019

@magento-engcom-team send me 2.3-develop instance credentials.

@ajijshekh123 ajijshekh123 self-assigned this Oct 4, 2019
@m2-assistant
Copy link

m2-assistant bot commented Oct 4, 2019

Hi @ajijshekh123. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@ajijshekh123 ajijshekh123 added Component: Admin Component: Authorizenet Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed labels Oct 4, 2019
@ajijshekh123
Copy link

Give me @magento give me 2.3-develop instance

@magento-engcom-team
Copy link
Contributor

Hi @ajijshekh123. Thank you for your request. I'm working on Magento 2.3-develop instance for you

@magento-engcom-team
Copy link
Contributor

Hi @ajijshekh123, here is your Magento instance.
Admin access: https://i-24844-2-3-develop.instances.magento-community.engineering/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.

@ajijshekh123
Copy link

ajijshekh123 commented Oct 4, 2019

@touqeer-verve - It is displaying an error like "Transaction has been declined. Please try again later."
See attached the video:

OrderFailed_Issue

Please update me on anyone who is fixed the issue Or update me on which issue is found placed order using the Authorize.net payment method.

@ajijshekh123 ajijshekh123 added Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Oct 4, 2019
@ghost ghost unassigned ajijshekh123 Oct 4, 2019
@magento-engcom-team magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Oct 4, 2019
@magento-engcom-team
Copy link
Contributor

✅ Confirmed by @ajijshekh123
Thank you for verifying the issue. Based on the provided information internal tickets MC-21497 were created

Issue Available: @ajijshekh123, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@irajneeshgupta irajneeshgupta self-assigned this Oct 4, 2019
@m2-assistant
Copy link

m2-assistant bot commented Oct 4, 2019

Hi @irajneeshgupta. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:

  • 1. Add/Edit Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 2. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 3. If the issue is not relevant or is not reproducible any more, feel free to close it.


@ghost ghost unassigned irajneeshgupta Oct 29, 2019
@artursson
Copy link

Additional info: (Magento 2.3.3 instance)

The issue reproduces if only 1 Payment Method (new Authorize.Net module) is enabled (available for Order Creating in Admin Panel).

Error:

Transaction has been declined. Please try again later.

@travish
Copy link

travish commented Jan 22, 2020

Reproduced on 2.3.1

It should be noted that the payment.log contains empty values for dataDescriptor and dataValue:

array (
        'opaqueData' => 
        array (
          'dataDescriptor' => '',
          'dataValue' => '',
        ),
      ),

Looks like the missing value comes from vendor/magento/module-authorizenet-acceptjs/view/adminhtml/templates/form/cc.phtml

@tinchodev
Copy link

tinchodev commented Mar 12, 2020

So.. I think I'm seeing the problem.
When the AuthorizeJS CC form is loaded via AJAX new AuthorizenetAcceptjs(config); instanciation at vendor/magento/module-authorizenet-acceptjs/view/adminhtml/templates/payment/script.phtml does not happens, leaving opaqueDataDescriptor and opaqueDataValue form hidden fields blank.
If the page refreshes, all will be good since form will be loaded on DOM Ready.

I had this worked around the follwing way :

For vendor/magento/module-authorizenet-acceptjs/view/adminhtml/templates/payment/script.phtml

Added the follwing lines at the bottom :

<script>
    //<![CDATA[
    require(
        ['jquery'], function ($) {
            $(document).trigger('payment_form_<?= /* @noEscape */ $code ?>_loaded');
        });
    //]]>
</script>

For vendor/magento/module-authorizenet-acceptjs/view/adminhtml/templates/payment/script.phtml

I've replaced :

<script>
    //<![CDATA[
    require(
        [
            'Magento_AuthorizenetAcceptjs/js/authorizenet',
            'jquery',
            'domReady!'
        ], function(AuthorizenetAcceptjs, $) {
            var config = <?= /* @noEscape */ $block->getPaymentConfig() ?>,
                form = $('#payment_form_<?= /* @noEscape */ $block->escapeJs($block->escapeHtml($block->getMethodCode())) ?>');

            config.active = form.length > 0 && !form.is(':hidden');
            new AuthorizenetAcceptjs(config);
        });
    //]]>
</script>

with :

<script>
    //<![CDATA[
    require(
        [
            'Magento_AuthorizenetAcceptjs/js/authorizenet',
            'jquery',
            'domReady!'
        ], function (AuthorizenetAcceptjs, $) {
            let formId = 'payment_form_<?= /* @noEscape */ $block->escapeJs($block->escapeHtml($block->getMethodCode())) ?>';
            $(document).on(formId+'_loaded', function () {
                let config = <?= /* @noEscape */ $block->getPaymentConfig() ?>;
                let authorizeForm = $('#'+formId);
                config.active = authorizeForm.length > 0 && !authorizeForm.is(':hidden');
                new AuthorizenetAcceptjs(config);
            });
        });
    //]]>
</script>

If this is good enough, I'll create a PR to Magento_AuthorizenetAcceptjs repo, unfortunatelly I was not able fo find it.

Hope it helps.

@m2-assistant
Copy link

m2-assistant bot commented Apr 14, 2020

Hi @ihor-sviziev. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:

  • 1. Add/Edit Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 2. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 3. If the issue is not relevant or is not reproducible any more, feel free to close it.


@ghost ghost moved this from Ready for Dev to Dev in Progress in Community Backlog Apr 14, 2020
@ihor-sviziev
Copy link
Contributor

Hi @touqeer-verve ,
According to following announcement this extension was already removed from 2.4 version:
https://community.magento.com/t5/Magento-DevBlog/Deprecation-of-Magento-core-payment-integrations/ba-p/426445

All future collaboration related to this extension should be on Marketplace using "Contacts" or "Bug reports" related to this extension.

I'm closing this issue.

@ghost ghost moved this from Dev in Progress to Done (last 30 days) in Community Backlog Apr 14, 2020
@magento-engcom-team magento-engcom-team removed this from Done (last 30 days) in Community Backlog Apr 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Admin Component: Authorizenet Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

9 participants