amyegan / vue-integration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vue App PayPal Integration

Get started

Install the dependencies...

cd vue-integration
npm install

...log in to the developer dashboard and get your client ID from your default application. Change const CLIENT_ID = 'your-client-id'; in src/components/Checkout.vue so CLIENT_ID matches your sandbox client ID...

If you need help setting up your developer dashboard or finding your client ID, follow the first step in the getting started documentation to get API credentials

...then start:

npm run serve

Navigate to localhost:8080. You should see the app running.

How It Works

The JavaScript SDK is imported via paypal-js in src/components/Checkout.vue where we set up a div to hold the buttons. Style, payment method, and other options can be specified in paypal.Buttons()

Further help

For more details and configuration options look at paypal-js usasge and the PayPal JavaScript SDK Complete Reference

About


Languages

Language:Vue 82.6%Language:HTML 11.7%Language:JavaScript 5.7%