Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Flask Midtrans

How to use:

from flask_midtrans import Midtrans
from flask import Flask

# set environments
app = Flask(__name__)
app.config['MIDTRANS_IS_PRODUCTION'] = False
app.config['MIDTRANS_SERVER_KEY'] = 'SB-Mid-server-fRTQ4YyV5mVXB'
app.config['MIDTRANS_CLIENT_KEY'] = 'SB-Mid-client-hdv0voYgqK'

# instance
midtrans = Midtrans(app)

@app.route('/')
def hello_world():
    param = {
        "transaction_details": {
            "order_id": "test-transaction-123",
            "gross_amount": 200000
        }, "credit_card": {
            "secure": True
        }
    }

    # midtrans.snap or midtrans.core
    # https://github.com/Midtrans/midtrans-python-client
    response = midtrans.snap.create_transaction(param)

    # >> response
    #  {'token': 'thistoken', 'redirect_url': 'http://midtrans..'}
    return response['token']

Contributes:

Metadata

Release files for flask-midtrans 0.0.1a0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flask-midtrans 0.0.1a0
File Size Uploaded Provenance
flask_midtrans-0.0.1a0.tar.gz 2.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for flask-midtrans 0.0.1a0
File Interpreter ABI Platform
flask_midtrans-0.0.1a0-py3-none-any.whl Python 3 none any Details

Total release size: 6.7 kB

Release files / flask_midtrans-0.0.1a0.tar.gz

Download URL flask_midtrans-0.0.1a0.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
097f968f3634958ac800682d726d3363b8cba43d92af334b0f4e9bfdb600b032
BLAKE2b-256 checksum
How to use checksums
2e28cb6f2b4f11bdf81d73d0a18feab937976e5baa303083d3c08eb9a493f3ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.8.5

Release files / flask_midtrans-0.0.1a0-py3-none-any.whl

Download URL flask_midtrans-0.0.1a0-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
919dec57ed7bc26a3e524d282c07bcd1fcd063e73818ff889bc0f7093cb01ff5
BLAKE2b-256 checksum
How to use checksums
5014a4307a446784f4b3df86992b4aba26979ee25b1c106c66dbfab7fc85ecc5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.8.5

Security for flask-midtrans 0.0.1a0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page