Unexpected reserved word 'await' for react native

Viewed 375

Hi theres error on paypal for react native. I got this code from a documentation for paypal-react-native. The code is not working for some reason Here is the Code

const {
    nonce,
    payerId,
    email,
    firstName,
    lastName,
    phone
  } = await requestOneTimePayment(
    token,
    {
      amount: '5',
      currency: 'GBP',
      shippingAddressRequired: false,
      userAction: 'commit',   
      intent: 'authorize', 
    }
  );
1 Answers
Related