Support forumCategory: BugsPayPal not working
xavi asked 5 months ago

I’m trying to integrate PayPal to my website but it doesn’t show or work.
Console shows errors like “Uncaught TypeError: jQuery(…).on is not a function”.
I can see that paypal buttons are hidden but if i show them and use them, it doesn’t allow me to Login to PayPal (i’ve tested this in your own paypal demo integration and I get the same error).
I’ve tried your proposal on another support ticket of using “shortcode additional param use_paypal="1". There is also param to turn on smart button paypal_smart_button="true".”
But is the same malfunction.
We will launch our website this Friday and this is the only thing left.
I hope you can help me.
Regards,
Xavier

3 Answers
Nikola Loncar Staff answered 5 months ago

Hi Xavier, looks like jQuery lib is not loaded. Do you use any caching system on your site? Or something for JS/CSS optimisation?

Best regards,
Nikola

xavi answered 5 months ago

Hello, 
I’ve checked that caching is disabled. 

  • Divi optimization is disabled. 
  • Breeze plug-in disabled. 
  • Varnish and object cache are disabled. 

I’ve tried with default theme and with all plugins disabled, but the result was the same. 

xavi answered 5 months ago

Ok, I’ve checked it further and it seems solved now. I will write here the solution for others with the same problem.

  • This error: Uncaught TypeError: jQuery(…).on is not a function”
    It was caused by Divi Theme, that now has a “Performance” tab that defers the loading of jquery by default (Divi > Theme Options > General > Performance).
  • This error: “it doesn’t allow me to Login to PayPal”.
    It occurs on “sandbox mode” and is gone in “production mode”.

I hope this helps other people.
Kind regards,
Xavier