title: How to Make a Payment Button With No Set Price in PayPal?
body: <p>I am building application using angular, I setup a button at top of navbar. Now I just want user click on button without fill any amount and add amount after popup open. Below is my code. Please help to solve this little issue.</p>
  <p><strong>Code</strong></p>
  <pre><code> ngAfterViewInit() {
      if (document.getElementById('paypal-button')) {
        this.loadExternalScript(
          'https://www.paypalobjects.com/api/checkout.js'
        ).then(() =&gt; {
          paypal.Button.render(
            {
              env: 'sandbox',
              client: {
                production: '',
                sandbox: '**********************************',
              },
              commit: true,
              style: {
                color: 'black',
                tagline: false,
              },
              payment: (data, actions) =&gt; {
                return actions.payment.create({
                  payment: {
                    transactions: [
                      {
                        amount: { total: '1.00', currency: 'USD' },
                      },
                    ],
                  },
                });
              },
              onAuthorize: (data, actions) =&gt; {
                return actions.payment.execute().then((payment) =&gt; {
                  console.log(payment);
                });
              },
            },
            '#paypal-button'
          );
        });
      }
    }
  </code></pre>
  <p>Any solution appreciated!</p>