title: How to use Flutter Webview Plugin for PayPal payment gateway
body: <p>How can I integrate a PayPal payment gateway in flutter framework. I tried with web view but not get success. What is the best way for it.</p>
  
  <p>First I tried with access token and RSET API, but there is problem that no user login for payment. My code is below and this code run with <a href="https://www.w3schools.com/html/tryit.asp?filename=tryhtml_intro" rel="nofollow noreferrer">Tryit Editor</a> successfully</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>import 'package:flutter/material.dart';
  import'package:flutter_webview_plugin/flutter_webview_plugin.dart';
  
      class PayPalPayment extends StatefulWidget {
      @override
      _PayPalPaymentState createState() =&gt; _PayPalPaymentState();
          
      }
  
       class _PayPalPaymentState extends State&lt;PayPalPayment&gt; {
       String test = "Test Charge";
       int amount = 100;
  
       @override
       Widget build(BuildContext context) {
       return MaterialApp(
        home: WebviewScaffold(
          url: new Uri.dataFromString('''
         &lt;html&gt;
         &lt;head&gt;
         &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
         &lt;meta http-equiv="X-UA-Compatible" content="IE=edge" /&gt;
         &lt;/head&gt;
  
        &lt;body&gt;
        &lt;script
          src="https://www.paypal.com/sdk/js?client-id=SB_CLIENT_ID"&gt;
        &lt;/script&gt;
        &lt;script&gt;paypal.Buttons().render('body');&lt;/script&gt;
        &lt;/body&gt;
         &lt;/html&gt;
                  ''', mimeType: 'text/html').toString(),      ),
      );
    }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p><code>SB_CLIENT_ID = My client id</code></p>