There we go:
- Go to paypal.com and log into your account
- Open the tab
Merchant Tools
- On the right side, click on
Buy Now buttons
- Set your button up on the first tab
Step 1: Choose a button type and enter your payment details
- Go to the tab
Step 2: Track inventory, profit & loss (optional)
Check the first field: Save button at PayPal
which will guarantee you this:
- Protect your buttons from fraudulent changes
- Automatically add buttons to "My Saved Buttons" in your PayPal profile
- Easily create similar buttons
- Edit your buttons with PayPal's tools
which will make the payment process secure.
Go to the tab Step 3: Customize advanced features (optional)
Here you'll be able to add a custom "sucess" checkout page - check this option and add the url to your "thanks" page:
Take customers to this URL when they finish checkout
Here you'll be able to add a custom "failed" checkout page - check this option and add the url to your "cancelled" page:
Take customers to this URL when they cancel their checkout
Click on Create Button
Copy the given code and paste it to your html <body>
Add this to the page <head>
:
<script async src="https://www.paypalobjects.com/js/external/paypal-button.min.js" type="text/javascript"></script>
Create a new html and paste all the code given by PayPal, you'll be able to see the button locally (running bundle exec jekyll serve
) and test it with PayPal Sandbox. You can do everything via PayPal Sandbox to test it on GitHub (or anywhere else): create an account, choose currencies, create buttons, and so on. To do that, create a sandbox account here and log into it here.
When everything get to work as it should, you can do the same via http://paypal.com and replace just the button code with your real button code.
Hope to have helped! Let me know if you need something else :)