Skip to content

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

Notifications You must be signed in to change notification settings

birdalugur/Payment-Service

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 git@github.com/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 : kirklimushin@gmail.com & klimkiruk@gmail.com

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 93.4%
  • Shell 4.4%
  • Dockerfile 1.3%
  • Mako 0.9%