PAYONE-GmbH / magento-2

PAYONE Payment Extension for Magento 2
28 stars 56 forks source link

CreditCard not initializing - Payone not defined #227

Closed lfritsche closed 5 years ago

lfritsche commented 5 years ago

Hi there Payone Team,

I'm facing an issue using the latest version on M2.2.6, developer mode & Payone methods in test-mode. Every Payone payment method is working fine except for creditcard.

This is the console error:

Uncaught ReferenceError: Unable to process binding "html: function(){return handleIframes() }"
Message: Payone is not defined
    at UiClass.handleIframes (creditcard-method.js:88)
    at html (eval at createBindingsStringEvaluator (knockout.js:2624), <anonymous>:3:64)
    at update (knockout.js:3979)
    at ko.dependentObservable.disposeWhenNodeIsRemoved (knockout.js:3004)
    at evaluateImmediate (knockout.js:1737)
    at Object.ko.computed.ko.dependentObservable (knockout.js:1946)
    at knockout.js:3002
    at Object.arrayForEach (knockout.js:151)
    at applyBindingsToNodeInternal (knockout.js:2974)
    at applyBindingsToNodeAndDescendantsInternal (knockout.js:2854)
    at applyBindingsToDescendantsInternal (knockout.js:2836)
    at applyBindingsToNodeAndDescendantsInternal (knockout.js:2863)
    at applyBindingsToDescendantsInternal (knockout.js:2836)
    at applyBindingsToNodeAndDescendantsInternal (knockout.js:2863)
    at Object.ko.applyBindings (knockout.js:3065)
    at _super (wrapper.js:73)

And as you can see in the screenshot below no Iframe was loaded: image

Any idea what could cause the error of Payone not being defined?

Thank you in advance! Leander

T-Kuchel commented 5 years ago

Hello @lfritsche ,

this can be caused by several things. Wrong configuration of the creditcard-parameters in between the PAYONE configuration or a Javascript hickup in your shop (collision of other js methods from other modules). Best way to find out the root cause is to deactivate other activated modules in your shop until this error will not occur.

If this wont help, you should get in contact with out technical support team at tech.support@bspayone.com

regards Timo

lfritsche commented 5 years ago

Hi Timo,

thank you for your help. I found out, that our Aheadworks Extension defines its own onestepcheckout_index_index.xml which does not include the client_api.phtml etc... Is working fine now ;)

Regards Leander

lfritsche commented 5 years ago

Hi @T-Kuchel , one additional question: I'm using the Aheadworks Onestep Checkout as it brings some quite nice improvements with it.

With the extension enable the redirect to external payment providers always gets skipped -> direct redirect to the success page. It seems like the extension skips your Redirect Controller (and probably other Controllers too). Which configuration or preference could lead to such a behaviour? The extension defines its own checkout layout onestepcheckout_index_index, but uses the same url Stucture as Magento /checkout. (instead of 'onepage', and others...)

Best Lander

T-Kuchel commented 5 years ago

Hello @lfritsche ,

the redirect to external payment providers always gets skipped

This seems to be a wrong behavior. For paymentmethods like PayPal or creditcard with 3D-secure you must go to an external page. This could not be forced by any option or configuration, because its mandatory. I am not very familiar with this extension but that sounds wrong.

The best advice i can give you is to get in contact with our technical-support team, to check this with another pair of eyes.

Regards Timo

lfritsche commented 5 years ago

Hi @T-Kuchel together with Aheadworks we found the solution:

image

Aheadworks needed an additional handle request on placeOrder - therefore we extended the payment/method-renderer/base.js

Regards, Leander