Skip to content

oslabs-beta/PayStream

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

PayStream

PayStream is a Next.js application designed to streamline financial management for a non-profit client.
Explore the docs »

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

(back to top)

Built With

  • NextJS
  • React
  • JavaScript
  • Typescript
  • Tailwind
  • Jest
  • AWS
  • Docker

(back to top)

Getting Started

Prerequisites

Before using this application, make sure you have the following in place:

  1. Stripe Account: You’ll need a Stripe account to connect to the payment gateway and manage donations.
  2. Salesforce Account: You must have a Salesforce account with the necessary permissions to set up the integration.
  3. Web Server: This application requires a web server to host the integration. You can use a cloud service like AWS, Google Cloud, or Heroku.
  4. API Keys: Obtain API keys from both Stripe and Salesforce for secure communication between the systems.

Installation

  1. Get your publishable and secret Stripe API Keys at: https://dashboard.stripe.com/test/apikeys

  2. Get your Salesforce access token by following the following steps: https://help.salesforce.com/s/articleView?id=sf.remoteaccess_oauth_jwt_flow.htm&type=5

  3. Clone the repo

    git clone https://github.com/oslabs-beta/PayStream.git
  4. Install NPM packages

    npm install
  5. Enter your JWT Secret into the .env file:

      JWT_SECRET = 'ENTER YOUR JWT SECRET';
  6. Enter your Salesforce Authentication information into the .env file:

     SALESFORCE_GRAPHQL_URI = '[YOUR SALESFORCE INSTANCE]/services/data/v58.0/graphql'
     SALESFORCE_COOKIE_AUTH = 'ENTER YOUR SALEFORCE COOKING AUTHORIZATION'
     SALESFORCE_LOGIN_URL = 'ENTER YOUR SALESFORCE LOGIN URL'
     SALESFORCE_AUTH_TYPE = oauth-client-credentials
     SALESFORCE_USERNAME = 'ENTER YOUR SALESFORCE USERNAME'
     SALESFORCE_PASSWORD = 'ENTER YOUR SALESFORCE PASSWORD'
     SALESFORCE_ORG_ID = 'ENTER YOUR SALESFORCE ORGANIZATION ID'
     PUB_SUB_ENDPOINT = api.pubsub.salesforce.com:7443
     SALESFORCE_CLIENT_ID = 'ENTER YOUR SALESFORCE CLIENT ID'
     SALESFORCE_CLIENT_SECRET = 'ENTER YOUR SALESFORCE CLIENT SECRET'
     SALESFORCE_URL = 'https://test.salesforce.com'
     BASE64_PRIVATE_KEY = 'ENTER YOUR BASE64 PRIVATE KEY'
  7. Enter your Stripe Authentication information into the .env file:

    NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY = 'ENTER YOUR STRIPE PUBLIC KEY';
    STRIPE_SECRET_KEY = 'ENTER YOUR STRIPE SECRET KEY';
    STRIPE_ENDPOINT_SECRET = 'ENTER YOUR STRIPE ENDPOINT SECRET'
  8. Enter your Clerk Authentication information into the .env file:

     NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY = 'ENTER YOUR CLERK PUBLIC KEY';
     CLERK_SECRET_KEY = 'ENTER YOUR CLERK SECRET KEY';
     
     NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
     NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/

(back to top)

Configuration

  1. Stripe Integration:
    • Go to your Stripe dashboard and obtain your API keys.
    • Update the .env file with your Stripe API keys.
    • Go to https://dashboard.stripe.com/test/apikeys and generate your Stripe endpoint for your application.
  2. Salesforce Integration:
    • Obtain Salesforce API credentials (Consumer Key, Consumer Secret, Username, and Password).
    • Update the .env file with your Salesforce API credentials.
    • The queries are mapped to custom payment records for a specific client and will need to be refactored to your application specific needs.
  3. Webhook Setup:
    • Configure webhooks in Stripe to send events to your application’s endpoint.
    • Use a service like ngrok to create a secure tunnel to your local server or set up SSL on your production server.
  4. Customization:
    • Modify the application to match your nonprofit’s specific Salesforce objects, fields, and donation processing logic.

Screenshots

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Email Us: [email protected]

Project Link: https://github.com/oslabs-beta/PayStream

(back to top)

Authors

Developed By Github LinkedIn
Chandler Charity Github LinkedIn
Julia Xin Github
Liam Hodges Github LinkedIn
Robert Hoover Github LinkedIn

(back to top)