Magento2: Issue in order placement

Created on 11 Oct 2019  路  27Comments  路  Source: magento/magento2

FIRST CONDITION

Preconditions (*)

  1. Magento 2.3.3 CE ( Recently upgraded from Magento 2.3.1 CE to Magento 2.3.3 CE )
  2. Paypal Express checkout enabled.
  3. Email settings configured.

Steps to reproduce (*)

  1. Add a fews products to the cart from the frontend.
  2. Go to checkout and fill up address details.
  3. Place order with PayPal express checkout

Expected result (*)

  1. The Order Should be placed.
  2. Order Confirmation Email Should be received.

Actual result (*)

  1. Order is placed at the backend, can see the order in order grid.
  2. Order confirmation email is not received.

SECOND CONDITION

Preconditions (*)

  1. Magento 2.3.3 CE ( Recently upgraded from Magento 2.3.1 CE to Magento 2.3.3 CE )
  2. Global payments enabled.
  3. Email settings configured.

Steps to reproduce (*)

  1. Add a fews products to the cart from the frontend.
  2. Go to checkout and fill up address details.
  3. Place order with Credit/Debit card

Expected result (*)

  1. The Order Should be placed.
  2. Order Confirmation Email Should be received.

Actual result (*)

  1. Order cannot be placed, getting following exception:

webapi-5da06b5728929; Message: Property "DisableTmpl" does not have accessor method "getDisableTmpl" in class "Magento\Quote\Api\Data\PaymentInterface". {"exception":"[object] (Exception(code: 0): Report ID: webapi-5da06b5728929; Message: Property "DisableTmpl" does not have accessor method "getDisableTmpl" in class "Magento\Quote\Api\Data\PaymentInterface". at /vendor/magento/framework/Webapi/ErrorProcessor.php:208, LogicException(code: 0): Property "DisableTmpl" does not have accessor method "getDisableTmpl" in class "Magento\Quote\Api\Data\PaymentInterface". at /vendor/magento/framework/Reflection/NameFinder.php:100)"} []

  1. Order confirmation email is not received.
Format is valid duplicate

All 27 comments

Hi @soumyamol-mathew. 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.

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

  • [ ] yes
  • [ ] no

Hi
I enabled the Cash on Delivery, still the order confirmation mail is not receiving. I also tried to send emails via sales->order->view->send mail , but no luck.

Facing the same issue on M2.3.3 when attempting to checkout with Paypal

@mystix Have you tried to send emails via sales->order->view->send mail ??

@mystix Have you tried to send emails via sales->order->view->send mail ??

It says "You sent the order email.", but no email gets sent out. No errors are logged either.

@mystix are you using non-ASCII characters in your email? If yes, then could be related to https://github.com/magento/magento2/issues/24902 which was fixed in https://github.com/magento/magento2/issues/24957

@elvinristi Thank You!!!

@elvinristi @magento-admin

We are still having issue with the Global Payments, the same issue that @soumyamol-mathew has mentioned above.

Is the magento team already working on a fix for this? Is it possible to get a patch for the issue?

@justinpappalil reported https://github.com/magento/magento2/issues/24902 issue was fixed in pull request https://github.com/magento/magento2/issues/24957 which was merged to 2.3-develop branch and is marked to be included in M2.3.4 release .

Until then code patch is needed as done here in lib/internal/Magento/Framework/Mail/Template/TransportBuilder.php:

@elvinristi Have added the code patch, PayPal express checkout is working fine.

However, I am still facing an issue with global Payments extension.
Global Payments Extension, version: 3.0.0
Magento Version: 2.3.3
PHP Version: 7.2.22

When I try to place an order I am getting the following exception:
webapi-5da06b5728929; Message: Property "DisableTmpl" does not have accessor method "getDisableTmpl" in class "Magento\Quote\Api\Data\PaymentInterface". {"exception":"[object] (Exception(code: 0): Report ID: webapi-5da06b5728929; Message: Property "DisableTmpl" does not have accessor method "getDisableTmpl" in class "Magento\Quote\Api\Data\PaymentInterface". at /vendor/magento/framework/Webapi/ErrorProcessor.php:208, LogicException(code: 0): Property "DisableTmpl" does not have accessor method "getDisableTmpl" in class "Magento\Quote\Api\Data\PaymentInterface". at /vendor/magento/framework/Reflection/NameFinder.php:100)"} []

@soumyamol-mathew, I don't think Global Payments Extension is part of clean Magento release- you need to reach out to them on this probably: https://github.com/globalpayments

cc @slogsdon

@mystix are you using non-ASCII characters in your email? If yes, then could be related to #24902 which was fixed in #24957

Thanks @elvinristi, patch https://github.com/magento/magento2/pull/24906/files#diff-dfb3ee5a7f863458afea75f5524cd2e5R398 fixes my "You sent the order email." issue.

Still doesn't solve my Paypal checkout issue though :(

In /var/www/magento/var/log/exception.log:

[2019-10-14 14:13:39] main.CRITICAL: Report ID: webapi-5da48293103e5; Message: Property "DisableTmpl" does not have accessor method "getDisableTmpl" in class "Magento\Quote\Api\Data\PaymentInterface". {"exception":"[object] (Exception(code: 0): Report ID: webapi-5da48293103e5; Message: Property \"DisableTmpl\" does not have accessor method \"getDisableTmpl\" in class \"Magento\\Quote\\Api\\Data\\PaymentInterface\". at /var/www/magento/vendor/magento/framework/Webapi/ErrorProcessor.php:208, LogicException(code: 0): Property \"DisableTmpl\" does not have accessor method \"getDisableTmpl\" in class \"Magento\\Quote\\Api\\Data\\PaymentInterface\". at /var/www/magento/vendor/magento/framework/Reflection/NameFinder.php:100)"} []

PHP 7.3.10
Magento 2.3.3

The error
Property "DisableTmpl" does not have accessor method "getDisableTmpl" in class "Magento\Quote\Api\Data\PaymentInterface"

Seems to be triggered when the following JSON payload:

{"cartId":"188593","paymentMethod":{"method":"paypal_express","po_number":null,"additional_data":null,"__disableTmpl":{"title":true}},"billingAddress":{"customerAddressId":"1695","countryId":"SG","regionCode":null,"region":null,"customerId":"4092","street":["Home1"],"company":null,"telephone":"91234567","fax":null,"postcode":"000001","city":"Singapore","firstname":"First","lastname":"Last","middlename":null,"prefix":null,"suffix":null,"customAttributes":[]}}

is sent to this REST endpoint:
/rest/default/V1/carts/mine/set-payment-information

This payload is sent to the endpoint when the Continue to Payment button is clicked on the final checkout step (for shops with a PayPal Express setup)

[UPDATE]
"__disableTmpl": { "title": true } in the JSON payload appears to be set in vendor/magento/module-checkout/view/frontend/web/js/action/select-payment-method.js

@mystix , I am facing the same issue with the Global Payments

@elvinristi Have added the code patch, PayPal express checkout is working fine.

However, I am still facing an issue with global Payments extension.
Global Payments Extension, version: 3.0.0
Magento Version: 2.3.3
PHP Version: 7.2.22

When I try to place an order I am getting the following exception:
webapi-5da06b5728929; Message: Property "DisableTmpl" does not have accessor method "getDisableTmpl" in class "Magento\Quote\Api\Data\PaymentInterface". {"exception":"[object] (Exception(code: 0): Report ID: webapi-5da06b5728929; Message: Property "DisableTmpl" does not have accessor method "getDisableTmpl" in class "Magento\Quote\Api\Data\PaymentInterface". at /vendor/magento/framework/Webapi/ErrorProcessor.php:208, LogicException(code: 0): Property "DisableTmpl" does not have accessor method "getDisableTmpl" in class "Magento\Quote\Api\Data\PaymentInterface". at /vendor/magento/framework/Reflection/NameFinder.php:100)"} []

@soumyamol-mathew , @mystix - do you have in your codebase HPS\Heartland (https://github.com/hps/heartland-magento2-module)?

Might be that this module doesn't use native approach on setting payment data on javascript side which seems to be cleaned out by vendor/magento/module-checkout/view/frontend/web/js/action/set-payment-information-extended.js

    var filterTemplateData = function (data) {
        return _.each(data, function (value, key, list) {
            if (_.isArray(value) || _.isObject(value)) {
                list[key] = filterTemplateData(value);
            }

            if (key === '__disableTmpl') {
                delete list[key];
            }
        });
    };

@soumyamol-mathew , @mystix - do you have in your codebase HPS\Heartland (https://github.com/hps/heartland-magento2-module)?

@elvinristi I'm not running that extension unfortunately.

@mystix, ok, which one you use?

@mystix, ok, which one you use?

I'm just using stock PayPal Express checkout

@soumyamol-mathew , @mystix - do you have in your codebase HPS\Heartland (https://github.com/hps/heartland-magento2-module)?

@elvinristi I am using the Global Payments extension https://marketplace.magento.com/realexpayments-hpp.html

@soumyamol-mathew @elvinristi My team at Global Payments manages the Heartland Magento 2 integration but doesn't manage the Global Payments Magento 2 integration at this time. That being said, I can help run this down.

@soumyamol-mathew Let's use your other open issue on globalpayments/php-sdk to track this.

@soumyamol-mathew @slogsdon @elvinristi
since the module doesn't use native approach to setting payment data, you have to delete __disableTmpl property from paymentData. I had this issue on another third party payment method. I deleted this property by the following

if (Object.prototype.hasOwnProperty.call(paymentData, '__disableTmpl')) { delete paymentData.__disableTmpl; }

I hope it helps for you as well.

@muhammadmasoom

if (Object.prototype.hasOwnProperty.call(paymentData, '__disableTmpl')) { delete paymentData.__disableTmpl; }

Where do I include this code?

@soumyamol-mathew
I don't have global payments extension code, give me a link of their repo, so I can point out

I did changes in view/frontend/web/js/action/set-payment-method.js of my extension.

@soumyamol-mathew , @mystix - do you have in your codebase HPS\Heartland (https://github.com/hps/heartland-magento2-module)?

Might be that this module doesn't use native approach on setting payment data on javascript side which seems to be cleaned out by vendor/magento/module-checkout/view/frontend/web/js/action/set-payment-information-extended.js

    var filterTemplateData = function (data) {
        return _.each(data, function (value, key, list) {
            if (_.isArray(value) || _.isObject(value)) {
                list[key] = filterTemplateData(value);
            }

            if (key === '__disableTmpl') {
                delete list[key];
            }
        });
    };

You are absolutely right @elvinristi , my theme had a js override which was messing with
vendor/magento/module-checkout/view/frontend/web/js/action/set-payment-information.js

The correct callchain for PaylPal Express checkout should be:

  • vendor/magento/module-paypal/view/frontend/web/js/action/set-payment-method.js
  • vendor/magento/module-checkout/view/frontend/web/js/action/set-payment-information.js
  • vendor/magento/module-checkout/view/frontend/web/js/action/set-payment-information-extended.js

My theme override was causing the callchain to stop at
vendor/magento/module-paypal/view/frontend/web/js/action/set-payment-method.js

which caused everything to choke and die because __disableTmpl wasn't being filtered out of the JSON payload.

Thanks for the tip. Cheers!

We also had this issue with paypal express and the standard paypal module.

I eventually commented out this

/**

  • @api
    */
    define([
    '../model/quote'
    ], function (quote) {
    'use strict';
return function (paymentMethod) {
  /**

  • if (paymentMethod) {
    paymentMethod.__disableTmpl = {
    title: true
    };
    }
    */
    quote.paymentMethod(paymentMethod);
    };
    });

in vendor/magento/module-checkout/view/frontend/web/js/action/select-payment-method.js

It still failed with PHP 7.3 but switching to 7.2 allowed it to work.
It gets the shop back up for now, after 24hrs down.

Hi @engcom-Charlie. 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: :point_down:

  • [ ] 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.

@soumyamol-mathew this issue was fixed in pull request #24906 which was merged to 2.3-develop branch and it will be included in Magento 2.3.4release .
So i have to close this issue as a duplicate.
Thanks for your report!

Was this page helpful?
0 / 5 - 0 ratings