3

I want to accept payments on my github.io site. I am wondering what payment gateway APIs are compatible. I made a paypal business buy button that worked, but I don't receive back a confirmation to my site that it was accepted.

The special part about this question is github.io doesn't allow dynamic scripts.

7
  • All gateways that involves JavaScript only should be useful on GH Pages. So, as far as I know, you can use PayPal STD buttons, yes. But you can't use PayPal Express. You can redirect the user to a "thanks" page on your website after concluding a payment, but this is set on PayPal itself. And the payment process will be available to you from PayPal only. Feb 3, 2016 at 23:56
  • @VirtuaCreative How do I redirect them after concluding a payment? Feb 4, 2016 at 0:05
  • Yeah, it's on the button configuration, one of the tabs bring you this possibility. I just don't remember exactly which tab and I'm not by my PC to check this for you, but if you go tab by tab you'll find it! If you don't, let me know and I'll give a look into that tomorrow and get back to you. ;) Feb 4, 2016 at 0:21
  • @VirtuaCreative No. Could you write up an answer? Feb 4, 2016 at 16:32
  • 1
    Yes, no problem. I'll post it in about 30 min OK? ;) Feb 4, 2016 at 16:35

1 Answer 1

5

There we go:

  1. Go to paypal.com and log into your account
  2. Open the tab Merchant Tools
  3. On the right side, click on Buy Now buttons
  4. Set your button up on the first tab Step 1: Choose a button type and enter your payment details
  5. Go to the tab Step 2: Track inventory, profit & loss (optional)
  6. 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.

  1. 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

  2. Click on Create Button

  3. Copy the given code and paste it to your html <body>

  4. 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 :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.