A package for initiating payments via the Stitch API
Project description
stitch-money-api
A Python package for processing digitial wallets payments via the Stitch API. For the complete integration guide, visit docs.stitch.money.
Installation
$ pip3 install stitch-money-api
Usage
import json
import os
from stitch.payins import Wallets
from stitch.utils.types import Wallet, Currency
import uuid
from dotenv import load_dotenv
load_dotenv()
client_id = os.getenv("STITCH_CLIENT_ID")
client_secret = os.getenv("STITCH_CLIENT_SECRET")
# Initialise SDK
stitch_sdk = Wallets(client_id, client_secret, 'merchant.energy.bigbag')
# Payment Verification (Web Only)
session = stitch_sdk.verify(
Wallet.APPLE_PAY, 1, Currency.ZAR, 'https://apple-pay-gateway.apple.com/paymentservices/startSession', 'TAL', 'bigbag.money')
print(session)
# Payment Creation
transaction = stitch_sdk.create(
Wallet.GOOGLE_PAY, json.dumps({"data": "sample"}), 1, Currency.ZAR, 'PythonSDK', str(uuid.uuid4()))
print(transaction)
License
The stitch-money-api package is open source and available under the MIT license. See the LICENSE file for more information.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
stitch_money_api-1.0.0.tar.gz
(7.5 kB
view hashes)
Built Distribution
Close
Hashes for stitch_money_api-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e32ff3e8476863c0941b5b9d5178305817a168daad5bbe4a7aff1c55bd5779c0 |
|
MD5 | f854f230203264ed9e91d2ae5bc57d4f |
|
BLAKE2b-256 | 3cf95d3a03a2e0b0e2c765532c9f26fe33b5059a88ae58b934eaabb14a9260a8 |