PayPal client implementation in Scala Play Issue


(Gobando Gh) #1

I am trying to implement PayPal checkout buttons in a Play Scala template using Webjars. This is the definition in sbt:

   "org.webjars" %% "webjars-play"% "2.6.1",
   "org.webjars"% "bootstrap"% "4.2.1" exclude ("org.webjars", "jquery"),
   "org.webjars"% "jquery"% "3.2.1",

This is the import in the template:

@import org.webjars.play.WebJarsUtil

I’m also including the jQuery, Popper.js and bootstrap javaScript plugin scripts.

The following html works well in the browser:

<!DOCTYPE html>
<html>
<!DOCTYPE html>
<head>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <script
   src="https://www.paypal.com/sdk/js?client-id=sb">
  </script>
</head>
<body>
  <div id="paypal-button-container"></div>
  <script>
    paypal.Buttons().render('#paypal-button-container');
  </script>
</body>
</html>

but it does not render in the play template Thank you for your kind help to solve this problem