Giter Site home page Giter Site logo

rakataprime / stripe-connect-functions Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sayanriju/stripe-connect-functions

0.0 0.0 0.0 642 KB

A collection of functions to help with a Customers -> Marketplace -> Vendors Workflow using Stripe Connect (https://stripe.com/connect)

License: MIT License

JavaScript 100.00%

stripe-connect-functions's Introduction

stripe-connect-functions node

Travis Coveralls github David

NPM

This package provides a collection of functions to help with a Customers -> Marketplace -> Vendors Workflow using Stripe Connect.

All the provided functions internally uses the official NodeJS library for Stripe.

Example Workflow

The following activity diagrams try to elucidate a rudimentary workflow. The various stages are labelled with the librarry function names to use in each case.

https://github.com/sayanriju/stripe-connect-functions/blob/master/Stripe_Connect_Workflow_1.jpg

https://github.com/sayanriju/stripe-connect-functions/blob/master/Stripe_Connect_Workflow_2.jpg

Installation & Basic Usage

  1. Set up a Stripe Connect Account and obtain the Secret key, which is in the form sk_myapp_k9DHwQESw7ntTGzdjS7vFsHs

  2. Install:

    npm install stripe-connect-functions

    โ€‹

  3. Initialize:

    const stripeConnect = require("stripe-connect-functions")("sk_myapp_k9DHwQESw7ntTGzdjS7vFsHs")
    // ^^ Remember to replace with your own key!
  4. Use:

    stripeConnect.fetchCustomerCards("cus_Ckc6NCwnBdzDCb")
    	.then(console.log, console.log) // returns a Promise!

For details, check the Api Docs HERE.

Testing

For Unit Tests, Ava is being used. Code Coverage is provided by nyc/istanbul. All calls to the Stripe API are stubbed.

To run the included tests:

npm run test
## Or, if you don't want code coverage:
npm run test:nocoverage

License

MIT

stripe-connect-functions's People

Contributors

sayanriju avatar dependabot-preview[bot] avatar indrodev avatar dependabot[bot] 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.