Giter Site home page Giter Site logo

donate-8's Introduction

donate

Mobile-friendly donation page. Includes Stripe Checkout, PayPal, Amazon Payments, and Google Wallet.

Created during the Hacktivation for the Homeless for GLIDE.

demo

View it here. Caveats:

setup

Copy index.html, main.js and style.css to some web hosting.

Stripe Checkout

Stripe Checkout depends on a server-side component. levity/striper is one bare-bones implementation of that.

Edit the value of stripePublishableKey at the top of main.js to be the value of your Stripe account's publishable key.

PayPal

Edit the value of paypalEmail at the top of main.js to be the email account you wish to receive PayPal donations.

Amazon Payments

Sign up for an Amazon Simple Pay Donations account and fill out their online form to generate the code for your Donate Button. Then strip out all table-related HTML from the generated code, replace the textfield with name="amount" with this:

  <input type="hidden" name="amount" id="amazon-amount">

and then, in index.html, replace the <form> tag underneath "Amazon Simple Pay" and its contents with the new code.

Google Wallet

Create a [Google Wallet Merchant Account] (https://wallet.google.com/merchant/pages/).

Google does not support variable donation amounts. You must decide which donation amounts to support and create a JWT (JSON Web Token) hash for each amount. This example code includes tokens for amounts of $25, $50, $100, $250, and $500. It hides the Google Wallet option if a custom amount is chosen.

You can create JWT hashes for your own amounts by entering your data into the Google Wallet Digital Goods Demo. Use the value 4551884523 in the Expiration Field so that your tokens never expire.

The Seller Data field may be left blank.

Copy and paste the donation amounts and JWT hash values that you generate for each donation value into the jwts array in main.js.

donate-8's People

Contributors

edwardotis avatar levity avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.