Create Account/Login
← Previous: Part 1 | Paypal Buttons Next: Part 3 | Making Payments →
Part 2 | Sandbox Account

Overview:

I went over this the paypal sandbox account briefly in my intro to part 1 but now its time to set up a sandbox account to test payments before we integrate with a real paypal account.


Step 1 | Create Sandbox Account
00:11:34

Go to https://developer.paypal.com/developer/accounts/ and login with your existing paypal account.

Create two sandbox accounts

Once you are logged in, within the left sidebar under "sandbox" go the "accounts" link. Here we will create 2 sandbox accounts. One will be a “business” account which will receive payments and another will be a personal account which will represent a customer that will purchase a product on our website. 

Custom account

By default when you click on the “Create account” button you will be prompted to choose business OR personal for the account type. If you want to be able to set your own passwords and email and not have to use the default setup paypal gives you click on the “Create custom account” option. Here just fill in the required fields. 

Login to sandbox accounts

Once you have created a business and personal sandbox account you can go to www.sandbox.paypal.com and login to both accounts individually to ensure they work. This will look exactly like a real paypal account only now you will see “sandox” at the beginning of the url and you can make transactions without real money.



Step 2 | Create App
00:14:23

Now that we have our two sandbox accounts set up, what we need to do next is create an “app” within paypal to generate a “Client ID”. This client ID will be added to the script tag within our template so when a customer makes a purchase, paypal knows where to send the money.

Create App

Still inside https://developer.paypal.com/developer/accounts/, underneath “Dashboard” click on “My Apps & Credentials”  and click the “Sandbox” tab. 

Down below you will see a default app and a “Create App” button. Create an app and name it something simular to what you called your website. 

Client ID

Once you create your new app, open it up and copy the client ID. 

For now we will use only the “Client ID” and not the “Secret Key”. Secret key is for server side integration and should never be displayed publicly. 

Add Client ID to script tag

Once we have our client ID copied, open up checkout.html and replace “client-id=sb” with what your apps client id “client-id=YOUR-CLIENT-ID”


← Previous: Part 1 | Paypal Buttons Next: Part 3 | Making Payments →