### Running Node.js Server Example (Bash) Source: https://github.com/paypal-examples/v6-web-sdk-sample-integration/blob/main/README.md Navigates to the Node.js server example directory, installs dependencies using `npm install`, and starts the server using `npm start`. This runs the backend component of the sample integration. ```bash cd server/node npm install npm start ``` -------------------------------- ### Running HTML Client Example (Bash) Source: https://github.com/paypal-examples/v6-web-sdk-sample-integration/blob/main/README.md Navigates to the one-time payment HTML client example directory, installs dependencies using `npm install`, and starts the client using `npm start`. This runs the frontend component to view the integration in a browser. ```bash cd client/oneTimePayment/html npm install npm start ``` -------------------------------- ### Running the Sample Locally Source: https://github.com/paypal-examples/v6-web-sdk-sample-integration/blob/main/client/oneTimePayment/html/README.md These commands are used to set up and run the sample integration locally. `npm install` installs the necessary project dependencies, and `npm start` launches the local web server using Vite. ```bash npm install npm start ``` -------------------------------- ### Starting the Node.js Express Server Source: https://github.com/paypal-examples/v6-web-sdk-sample-integration/blob/main/server/node/README.md Command to start the Node.js Express server locally using npm. ```Bash npm start ``` -------------------------------- ### Run React and Node.js Sample Locally Source: https://github.com/paypal-examples/v6-web-sdk-sample-integration/blob/main/client/oneTimePayment/react/README.md Instructions to run the React UI application and the Node.js backend API server concurrently. This involves navigating to the respective directories and running npm commands to install dependencies and start the servers. ```bash v6-web-sdk-sample-integration/server/node npm install npm start v6-web-sdk-sample-integration/client/oneTimePayment/react npm install npm start ``` -------------------------------- ### Starting Merchant and Iframe Servers Source: https://github.com/paypal-examples/v6-web-sdk-sample-integration/blob/main/client/oneTimePayment/html/src/custom/sandboxedIframe/README.md This command executes the 'start' script defined in the project's package.json file. It typically uses a tool like 'concurrently' to launch both the merchant page server and the iframe server simultaneously, which are necessary components for running this sample integration. ```Shell npm start ``` -------------------------------- ### Client Token Response (JSON) Source: https://github.com/paypal-examples/v6-web-sdk-sample-integration/blob/main/server/node/README.md Example JSON response returned by the `/paypal-api/auth/browser-safe-client-token` endpoint, containing the access token and its expiration time. ```JSON { "accessToken": "abc123...", "expiresIn": "900", "additional metadata": "..." } ``` -------------------------------- ### Create Order Response (JSON) Source: https://github.com/paypal-examples/v6-web-sdk-sample-integration/blob/main/server/node/README.md Example JSON response returned by the `/paypal-api/checkout/orders/create-with-sample-data` endpoint upon successful order creation, showing the order ID and status. ```JSON { "id": "ORDER-ID", "status": "CREATED" } ``` -------------------------------- ### Capture Order Response (JSON) Source: https://github.com/paypal-examples/v6-web-sdk-sample-integration/blob/main/server/node/README.md Example JSON response returned by the `/paypal-api/checkout/orders/{orderId}/capture` endpoint upon successful payment capture, showing the order ID and updated status. ```JSON { "id": "ORDER-ID", "status": "COMPLETED", "additional order information": "..." } ``` -------------------------------- ### Creating .env File from Sample (Bash) Source: https://github.com/paypal-examples/v6-web-sdk-sample-integration/blob/main/README.md Navigates into the cloned repository directory and copies the `.env.sample` file to `.env`. This prepares the environment file for configuration with PayPal credentials. ```bash cd v6-web-sdk-sample-integration cp .env.sample .env ``` -------------------------------- ### Cloning PayPal v6 Web SDK Sample Integration (Bash) Source: https://github.com/paypal-examples/v6-web-sdk-sample-integration/blob/main/README.md Clones the PayPal v6 Web SDK sample integration repository from GitHub using the `git clone` command. This is the first step to obtain the sample code locally. ```bash git clone https://github.com/paypal-examples/v6-web-sdk-sample-integration.git ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.