Code Monkey home page Code Monkey logo

gourbanstripeclient's Introduction

GoUrbanStripeClient

Scope of the project:

  • Write a small console client for Stripe for the following scenario:

1 - Ask user for email.

2 - User enters email.

3 - Create customer at Stripe with the entered email address (Stripe API key: sk_test_4eC39HqLyjWDarjtT1zdp7dc)

4 - Create a credit card source in sStripe with token tok_at and type card and attach it as default source to the created customer.

5 - Ask user for the amount of the charge in Euro.

6 - Create a charge for the requested amount.

7 - Ask the user if he wants to capture the charge or refund it.

8 - Charge or refund the charge.

Riccardo's Notes:

Here what I have done:

  • I have created a gradle project. I have imported Spring Boot ( because it was suggested; but I have not used any feature of this framework).
  • I have imported Apache commons for input validation
  • I have imported the Stripe library to perform the operations on credit cards
  • I have created:
    • InputCollector class to take input from the client
    • InputValidator class to validate user inputs (this class have been unit tested; check test package)
    • Transaction class is an object where I store the amount and the owner of the transaction
    • StripeClient class is a Stripe client which takes a transaction as input and calls the Stripe api

gourbanstripeclient's People

Watchers

 avatar  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.