Feature #1187

Add Stripe Integration for Payment Processing

Added by Pavan Rikhi about 3 years ago. Updated about 3 years ago.

Status:ClosedStart date:10/24/2017
Priority:NormalDue date:11/17/2017
Assignee:Pavan Rikhi% Done:

100%

Category:CheckoutSpent time:13.80 hours
Target version:v0.6.0 - Checkout
Easy Pickings:

Description

https://stripe.com/docs/checkout/tutorial
https://stripe.com/docs/charges
https://stripe.com/docs/api/node

https://www.stackage.org/haddock/nightly-2017-10-13/stripe-haskell-2.2.3/Web-Stripe.html

Also remove billing details when total == 0. Maybe store multiple payment types in DB? Credit card, Store Credit, No Payment Due

Associated revisions

Revision 23fc9100
Added by Pavan Rikhi about 3 years ago

[#1187] Add Stripe Integration to Customer Checkout Route

Integrate the Customer Place Order API Route with Stripe. When an Order
is placed, a Stripe Customer will be created if the Customer does not
have one. Then we create a Stripe Card for the Stripe Customer & set the
proper billing address for it. Once the Order is created, we charge the
Stripe Customer.

  • Add an optional stripeId field to the Customer model.
  • Add an optional stripeChargeId field to the Order model.
  • Add a `toStripeAmount` function for converting between `Cents` &
    Stripe `Amounts`.
  • Add Persistent Fields for Stripe Customer & Charge IDs.
  • Add a helper function for running Stripe requests in the `App` monad.
  • Modify the customerPlaceOrderRoute to create a Stripe Customer, Card,
    & Charge.
  • Modify the OrderStatus type to include Payment statuses.
  • Modify the Config & Main modules to parse & store a Stripe API Token.
  • Modify the createOrder function so that it does not remove the
    Customer's Cart.
  • Modify the createLineItems function to return the total of all created
    items.
  • Modify the createProducts function to return the total of all created
    products.

Refs #1187

Revision 34f769fb
Added by Pavan Rikhi about 3 years ago

[#1187] Add Stripe Integration to Checkout Page

Integrate Stripe Checkout into the Checkout Page, popping up a modal for
the user to enter their credit card details.

Refs #1187

Revision e0c852c7
Added by Pavan Rikhi about 3 years ago

[#1187] Add Stripe Integration to Anonymous Customer Checkouts

When unregistered Customers checkout, create a Stripe Customer, Card, &
Charge for their Order just like for registered Customers.

Refs #1187

History

#1 Updated by Pavan Rikhi about 3 years ago

  • Description updated (diff)

#2 Updated by Pavan Rikhi about 3 years ago

  • Start date set to 10/24/2017

Starting work on this issue.

#3 Updated by Pavan Rikhi about 3 years ago

  • Status changed from New to In Progress
  • Description updated (diff)

#4 Updated by Pavan Rikhi about 3 years ago

  • % Done changed from 0 to 100
  • Status changed from In Progress to Closed
  • Due date set to 11/17/2017

Closing Issue.

Also available in: Atom PDF