Imagination-Media / magento2-payment-request

Add the W3C payment request on Magento 2
Open Software License 3.0
12 stars 3 forks source link

It does not work anymore in Magento 2.3.5 #1

Open kamzata opened 4 years ago

kamzata commented 4 years ago

It doesn't work and it throws this error on console:

Uncaught TypeError: Failed to construct 'PaymentRequest': At least one payment method is required
    at Object.init (paymentRequest.js:230)
    at HTMLButtonElement.<anonymous> ((index):541)
    at HTMLButtonElement.dispatch (jquery.js:5232)
    at HTMLButtonElement.elemData.handle (jquery.js:4884)
kamzata commented 4 years ago

Furthermore, it adds now this warn on console:

Fallback to JQueryUI Compat activated. Your store is missing a dependency for a jQueryUI widget. Identifying and addressing the dependency will drastically improve the performance of your site.

due to vendor/imaginationmedia/magento2-payment-request/view/frontend/web/js/sidebar.js 'jquery/ui', declaration at line 20.

kamzata commented 4 years ago

By the way... I'm using the official Braintree Magento module

igor-imaginemage commented 4 years ago

Hi @kamzata, today I published some adjustments for the Braintree integration, but nothing related to a specific Magento version. Our demo website (https://innovations.imaginationmedia.com/) is running Magento 2.3.5-p1 and I'm not having this same issue.

Could you try to use this new release version?

kamzata commented 4 years ago

With great pleasure...

By the way... as strongly recommended by Braintree, I'm using the official Braintree Gene module ( https://marketplace.magento.com/paypal-module-braintree.html ) with Magento 2.3.5-p1. I enabled Braintree cards payment, Paypal Express through Braintree, Google Pay, and Apple Pay. I don't remember at the time I wrote the first post if I was already using this module, sorry.

Anyway...

Just installed the 1.0.1 version and set it up to work with just Braintree, not Paypal Express. I just enabled Mastercard and Visa Debit and Credit card.

Every page

I got these errors:

Uncaught Error: [object Object] at Object.<anonymous> (customer-data.js:95) at fire (jquery.js:3238) at Object.fireWith [as rejectWith] (jquery.js:3368) at done (jquery.js:9848) at XMLHttpRequest.callback (jquery.js:10317) customer-data.js:95

and

GET https://example.com/customer/section/load/?sections=cart%2Cdirectory-data%2Cpayment-request%2Cmessages&force_new_section_timestamp=false&_=1593040827160 500 jquery.js:10260

and

Fallback to JQueryUI Compat activated. Your store is missing a dependency for a jQueryUI widget. Identifying and addressing the dependency will drastically improve the performance of your site. compat.js:43

Checkout page

I got also this:

Uncaught Error: Mismatched anonymous define() module: function ($, paymentRequest) { 'use strict'; if (paymentRequest.isAvailable()) { $("#paymentRequestButton").click(function () { paymentRequest.init(); }); } else { $("#paymentRequestButton").click(function () { window.location.href = "https://dev.tecnicman.com/checkout/"; }); } } http://requirejs.org/docs/errors.html#mismatch at makeError (require.js:166) at intakeDefines (require.js:1221) at require.js:1408 require.js:166

kamzata commented 4 years ago

Do you have any plans to update the compatibility with Magento 2.4.0? Thanks