Public Repository

Last pushed: 2 months ago
Short Description
Payment system for freedompostcards.com using stripe.com api
Full Description

UE-PC-Payment_Srvc

A freedompostcard.com intended payment system initially designed to use stripe.com as its primary processing API but able to be modified for additional charge technologies.

Dependencies

stripe.com

Documentation

https://github.com/UnitedEffects/UE-PC-Payment_Srvc/wiki/Documentation

Docker

  • docker pull unitedeffects/ue-pc-payment:latest
  • See config for environment variables need to run with docker run

API documentation at http://localhost:3003

Local

  • clone this repo
  • npm install
  • bower install //this is for the swagger UI
  • npm start

API documentation at http://localhost:3003

Testing

  • This API assumes that you will use Stripe Elements to create an appropriate credit card page in order to tokenize a card and send it to the /api/payments/charge endpoint with the following data:
{
  "amount": "258",
  "process": {
    "postcards": [
      {
        "id": "id-of-postcard-to-process-1"
      },
      {
        "id": "id-of-postcard-to-process-2"
      }
    ]
  },
  "stripeToken": "string",
  "stripeTokenType": "card",
  "stripeEmail": "string"
}
  • Notice that the amount is in cents. Using the stripe client side API you will be able to obtain the stripeToken information.
  • In order to help you test, I've made /stripe available to you in the browser. Use this to generate tokens and sample data that you can send to the endpoint above.
Docker Pull Command
Owner
unitedeffects