title: how to add return url to paypal's javascript/rest express checkout simple intergration
body: <p>I have paypals simple express checkout javascript  and I have a problem while testing it, I can not seem to fiqure out how to add a return url to the code below.</p>
  
  <p>under the paypal developer sites apps &amp; credentials, I have created a REST API app and added a return url there, but this does not seem to work with the simple javascript Express Checkout integration as listed below.</p>
  
  <p>Can I simply pass in return and cancel urls or does the Basic client intergration not allow this??</p>
  
  <p>sorry to ask a stupid question , it just palpays docs are not that good at all and looking threw google there lots of different options to do the same basic things </p>
  
  <pre><code>&lt;script src="https://www.paypalobjects.com/api/checkout.js"&gt;&lt;/script&gt;
  
  &lt;div id="paypal-button-container"&gt;&lt;/div&gt;
  
  &lt;script&gt;
  
  // Render the PayPal button
  
  paypal.Button.render({
      // Set your environment
  
      env: 'sandbox', // sandbox | production
  
      // PayPal Client IDs - replace with your own
      // Create a PayPal app: https://developer.paypal.com/developer/applications/create
  
      client: {
          sandbox: 'sandbox',
          production: 'production'
      },
      // Wait for the PayPal button to be clicked
  
      payment: function () {
  
          // Make a client-side call to the REST api to create the payment
  
          return paypal.rest.payment.create(this.props.env, this.props.client, {
              transactions: [
                  {
                      amount: {total: '10.99', currency: 'USD'}
                  }
              ]
          });
      },
      // Wait for the payment to be authorized by the customer
  
      commit: true, // Optional: show a 'Pay Now' button in the checkout flow
  
      onAuthorize: function (data, actions) {
  
          // Execute the payment
  
          return actions.payment.execute().then(function () {
              // Show a success page to the buyer
          });
      }
  
  }, '#paypal-button-container');
  </code></pre>
  
  <p></p>