You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

paysafecard

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

paysafecard

A paysafecard class to help with classic payment api.


Maintainers
1

Readme

Paysafecard-python

A class that implements the classic payment function of http://www.paysafecard.com

================================

Instalation:

pip install paysafecard

Example usage

Create the disposition and if it is successfull then redirect to the url.

from paysafecard.main import PaySafeCard
paysafe = PaySafeCard(username="", password="", debug=True, test=True)
paysafe.set_field('currency', 'EUR')
paysafe.set_field('amount', '10.00')
paysafe.set_field('mtid', 'transaction-id')
paysafe.set_field('merchantclientid', 'user-id')
paysafe.set_field('mid', 'currency-id')
paysafe.set_field('clientIp', '192.168.0.1')
paysafe.set_field('okUrl', '')
paysafe.set_field('nokUrl', '')
paysafe.set_field('pnUrl', '')
if paysafe.create_disposition():
    redirect_url = paysafe.get_url()
else:
    return False

After the client enters the required information you may have 2 cases one on the pnurl other to the okurl this function ensures that the amount was taken from paysafe to your account.

from paysafecard.main import PaySafeCard
paysafe = PaySafeCard(username='', password='', debug=True, test=True)
paysafe.set_field('amount', '10.00')
response = paysafe.get_serial_numbers('currency-id', 'EUR')
if response:
    if response == 'execute':
        if paysafe.execute_debit('10.00'):
            return True
        else:
            return False
    else:
        return False
else:
    return False

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc