Coder Social home page Coder Social logo

birdalugur / payment-service Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lovepelmeni/payment-service

0.0 0.0 0.0 140 KB

Payment App written in Python (FastAPI) using Stripe SDK. Is used for processing payment transactions, refunds for subscriptions

Shell 4.38% Python 93.40% Mako 0.94% Dockerfile 1.28%

payment-service's Introduction

Payment Service

API Documentation Link: DocLink


Payment Service - Payment Platform for making payment transaction, interacts via http. It Allows People to make transactions and purchase Subscriptions on specific period of time, Also make refunds and so on...


Service is moving from HTTP to Grpc Protocol

Dependencies

<requirements>
    
<python>3.8 or above</python>
    
<postgresql>13.3 or above</postgresql>
    
<docker>1.41 or above</docker>
    
<docker-compose>3.9 or higher</docker-compose>
    
</requirements>

Technologies

For this project I'm using framework FastAPI as a Main Framework with following additions:

ORM - Ormar and SQLAlchemy as Integrator chosen the Alembic. Payment Platform - Stripe one of the most popular .
Database - postgresSQL.


Deployment

Docker & Docker-Compose

Possible Issues related to Deployment

I was building this API using MacOS Operational System on M1 so there probably can be some issues running it on Windows (On Linux Everything works perfectly).

If You are getting Some Errors, related to Postgresql SCRAM-Authentication, try to replace

   ARG arch=amd64
   FROM --platform=linux/${arch} python:3.8.13-buster

On

    FROM python:3.8.13-buster

Usage

Clone This Repo to your IDE or Whatever.


git clone --branch payment_service [email protected]/LovePelmeni/SongPlatformApp.git
    

Go the file in the Main Directory of the Project and run docker-compose.yaml, then run python file responsible for stripe-cli

   docker-compose up -d 
   python ./stripe_cli.py

Simple Integration.

Using python "requests" library

   import requests 
   payment_service_url = 'http://localhost:8081/some-url/'
   session = requests.Session()
   http_response = session.method(url=payment_service_url,
   headers=headers, params=params, data=data, timeout=timeout)

Using Curl

   curl -f http://localhost:8081/healthcheck/

Done! Make Sure all module/integration test has run successfully.

External Links

~ Emails for Contributions : [email protected] & [email protected]

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.