title: No value passed to payment
body: <p>I am getting this error while trying Paypal Checkout using Paypal Express Checkout and checkout.js from Paypal.</p>
  
  <pre><code>Object {error: "Error: Error: No value passed to payment↵    at Ob…://www.paypalobjects.com/api/checkout.js:2401:13)", timestamp: 1497283288966, windowID: "2832566843", pageID: "e2a3d3f3ff", referer: "http://m.coleman.renegade.local"…}country: "US"env: "sandbox"error: "Error: Error: No value passed to payment↵    at Object.onSuccess (https://www.paypalobjects.com/api/checkout.js:8035:52)↵    at https://www.paypalobjects.com/api/checkout.js:3636:82↵    at SyncPromise.dispatch (https://www.paypalobjects.com/api/checkout.js:3651:19)↵    at SyncPromise.resolve (https://www.paypalobjects.com/api/checkout.js:3614:18)↵    at https://www.paypalobjects.com/api/checkout.js:3597:33↵    at flush (https://www.paypalobjects.com/api/checkout.js:3520:43)↵    at Object.err [as onSuccess] (https://www.paypalobjects.com/api/checkout.js:3528:21)↵    at https://www.paypalobjects.com/api/checkout.js:3636:82↵    at SyncPromise.dispatch (https://www.paypalobjects.com/api/checkout.js:3651:19)↵    at SyncPromise.resolve (https://www.paypalobjects.com/api/checkout.js:3614:18)↵    at Object._RECEIVE_MESSAGE_TYPE.(anonymous function) [as postrobot_message_response] (https://www.paypalobjects.com/api/checkout.js:2477:118)↵    at receiveMessage (https://www.paypalobjects.com/api/checkout.js:2381:73)↵    at messageListener (https://www.paypalobjects.com/api/checkout.js:2401:13)"host: "www.sandbox.paypal.com"lang: "en"pageID: "e2a3d3f3ff"path: "/webapps/hermes/button"referer: "http://m.coleman.renegade.local"timestamp: 1497283288966uid: "bfd31206ee"ver: "4.0.82"windowID: "2832566843"__proto__: Object 
  
   Error: Error: No value passed to payment
      at Object.onSuccess (https://www.paypalobjects.com/api/checkout.js:8035:52)
      at https://www.paypalobjects.com/api/checkout.js:3636:82
      at SyncPromise.dispatch (https://www.paypalobjects.com/api/checkout.js:3651:19)
      at SyncPromise.resolve (https://www.paypalobjects.com/api/checkout.js:3614:18)
      at https://www.paypalobjects.com/api/checkout.js:3597:33
      at flush (https://www.paypalobjects.com/api/checkout.js:3520:43)
      at Object.err [as onSuccess] (https://www.paypalobjects.com/api/checkout.js:3528:21)
      at https://www.paypalobjects.com/api/checkout.js:3636:82
      at SyncPromise.dispatch (https://www.paypalobjects.com/api/checkout.js:3651:19)
      at SyncPromise.resolve (https://www.paypalobjects.com/api/checkout.js:3614:18)
      at Object._RECEIVE_MESSAGE_TYPE.(anonymous function) [as postrobot_message_response] (https://www.paypalobjects.com/api/checkout.js:2477:118)
      at receiveMessage (https://www.paypalobjects.com/api/checkout.js:2381:73)
      at messageListener (https://www.paypalobjects.com/api/checkout.js:2401:13)
  __webpack_require__.i.window.console.window.console.(anonymous function) @ index.js:536
  
  types.js:122 Uncaught Error: Error: No value passed to payment
      at Object.onSuccess (https://www.paypalobjects.com/api/checkout.js:8035:52)
      at https://www.paypalobjects.com/api/checkout.js:3636:82
      at SyncPromise.dispatch (https://www.paypalobjects.com/api/checkout.js:3651:19)
      at SyncPromise.resolve (https://www.paypalobjects.com/api/checkout.js:3614:18)
      at https://www.paypalobjects.com/api/checkout.js:3597:33
      at flush (https://www.paypalobjects.com/api/checkout.js:3520:43)
      at Object.err [as onSuccess] (https://www.paypalobjects.com/api/checkout.js:3528:21)
      at https://www.paypalobjects.com/api/checkout.js:3636:82
      at SyncPromise.dispatch (https://www.paypalobjects.com/api/checkout.js:3651:19)
      at SyncPromise.resolve (https://www.paypalobjects.com/api/checkout.js:3614:18)
      at Object.onSuccess (https://www.paypalobjects.com/api/checkout.js:8035:52)
      at https://www.paypalobjects.com/api/checkout.js:3636:82
      at SyncPromise.dispatch (https://www.paypalobjects.com/api/checkout.js:3651:19)
      at SyncPromise.resolve (https://www.paypalobjects.com/api/checkout.js:3614:18)
      at https://www.paypalobjects.com/api/checkout.js:3597:33
      at flush (https://www.paypalobjects.com/api/checkout.js:3520:43)
      at Object.err [as onSuccess] (https://www.paypalobjects.com/api/checkout.js:3528:21)
      at https://www.paypalobjects.com/api/checkout.js:3636:82
      at SyncPromise.dispatch (https://www.paypalobjects.com/api/checkout.js:3651:19)
      at SyncPromise.resolve (https://www.paypalobjects.com/api/checkout.js:3614:18)
      at Object._RECEIVE_MESSAGE_TYPE.(anonymous function) [as postrobot_message_response] (https://www.paypalobjects.com/api/checkout.js:2477:118)
      at receiveMessage (https://www.paypalobjects.com/api/checkout.js:2381:73)
      at messageListener (https://www.paypalobjects.com/api/checkout.js:2401:13)
  _RECEIVE_MESSAGE_TYPE.(anonymous function) @ types.js:122
  receiveMessage @ index.js:94
  messageListener @ index.js:119
  </code></pre>
  
  <p>This is the data sent with the request using <code>actions.payment.create()</code> method</p>
  
  <pre><code>{"intent":"authorize","transactions":[{"amount":{"total":"105.00","currency":"USD"},"payee":{"email":"rashid-facilitator@somedomain.com"},"description":"Payment","item_list":{"items":[{"name":"Oleta Dresser","description":"","quantity":1,"price":"105.00","sku":"CST-203183","currency":"USD"}]}}],"redirect_urls":{"return_url":"https://www.sandbox.paypal.com","cancel_url":"https://www.sandbox.paypal.com"},"payer":{"payment_method":"paypal"}}
  </code></pre>
  
  <p>I can't get this work. Anyone got a clue?</p>
  
  <p>This is the full code.</p>
  
  <pre><code>import React, { Component, PropTypes } from 'react';
  
  export default class PaypalButton extends React.Component {
      constructor(props) {
          super(props);
  
          this.client = {
              sandbox:    'client id stripped',
              production: '&lt;insert production client id&gt;'
          };
  
          this.onCheckoutButtonClick = this.onCheckoutButtonClick.bind(this);
          this.onPaymentApproval = this.onPaymentApproval.bind(this);
      }
  
      render() {
          return &lt;div id="paypal-button-container"&gt;&lt;/div&gt;;
      }
  
      componentDidMount() {
          window.PAYPAL? this.renderPaypalButton(): loadScript('https://www.paypalobjects.com/api/checkout.js', true, () =&gt; {
              this.renderPaypalButton();
          });
      }
  
      onCheckoutButtonClick(data, actions) {
          // prepare item list from order summary
          let desc = '';
          let items = this.props.items.map(item =&gt; {
              if( item.type == 'bundle' ) {
                  desc = item.products_option[0].required.items.join();
                  if( item.products_option[0].optional )
                      desc += item.products_option[0].optional.items.join();
              }
              return {
                  "name": item.name,
                  "description": desc,
                  "quantity": item.qty,
                  "price": item.price,
                  "sku": item.sku,
                  "currency": "USD"
              }
          })
          // Make a call to the REST api to create the payment
          return actions.payment.create({
              intent: 'authorize',
              transactions: [
                  {
                      amount: { 
                          total: this.props.totals.grand_total[0].value, 
                          currency: 'USD'
                      },
                      payee: { 
                          email: 'john-facilitator@example.com'
                      },
                      description: 'Payment',
                      item_list: {
                          items: items
                      }
                  }
              ]
          }).then(data2 =&gt; {
              jQuery(document).trigger('onPaymentCreate.colemanReact', data2);
          });
      }
  
      onPaymentApproval(data, actions) {
          // Make a call to the REST api to execute the payment
          // this will get us an approved payment to be captured later
          return actions.payment.execute().then(function(data3) {
              // Show a thank-you note
              console.log('execute', data3);
              jQuery(document).trigger('onPaymentApproval.colemanReact', data3);
          });
  
      }
  
      onPaymentError(err) {
          console.log(err);
          jQuery(document).trigger('onPaymentError.colemanReact', err);
      }
  
      onPaymentCancellation(data, actions) {
          jQuery(document).trigger('onPaymentCancellation.colemanReact', data3);
      }
  
      renderPaypalButton() {
          paypal.Button.render({
  
              env: 'sandbox', // sandbox | production
  
              // PayPal Client IDs - replace with your own
              // Create a PayPal app: https://developer.paypal.com/developer/applications/create
              client: this.client,
  
              // Show the buyer a 'Pay Now' button in the checkout flow
              commit: false,
  
              // payment() is called when the button is clicked
              payment: this.onCheckoutButtonClick,
  
              // onAuthorize() is called when the buyer approves the payment
              onAuthorize: this.onPaymentApproval,
  
              // onCancel() is called when the buyer cancels the payment
              onCancel: this.onPaymentCancellation,
  
              // Show an error page here, when an error occurs
              onError: this.onPaymentError
  
          }, '#paypal-button-container');
      }
  }
  </code></pre>