{ "info": { "author": "Johnbosco Ohia", "author_email": "johnboscoohia@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "RavePay-SDK-Python \n==================\n\n|Build Status| |Scrutinizer Code Quality| |Coverage Status|\n\nThe RavePay Python SDK provides APIs to create, process and manage\npayments on the RavePay platform. The SDK fully supports the API\n\nInstallation\n------------\n\n``pip install ravepaypysdk``\n\nConfiguring RavePay SDK\n-----------------------\n\n::\n\n import ravepaypysdk\n\n my_api = ravepaypysdk.Api(\n secret_key='ravepay_secret_key'\n public_key='ravepay_public_key'\n production=False # sandbox # or True # Live\n )\n\nUsage\n-----\n\nTo start using the SDK ensure you have your public key and secret key\ninstantiated with the ``Api`` object\n\nPayments (RavePay Direct Charge)\n--------------------------------\n\nImport the RavePay Payment module \n\n``from ravepaypysdk import Payment``\n\nThere are 5 different ways to utilize RavePay\u2019s direct charge for\npayment:\n\n- **Card direct charge**\n\n *Usage* \n\n ::\n\n payload = { \n \u201ccardno\u201d: \u201c5438898014560229\u201d, \n \u201ccvv\u201d: \u201c789\u201d,\n \u201cexpirymonth\u201d: \u201c07\u201d, \n \u201cexpiryyear\u201d: \u201c18\u201d, \n \u201ccurrency\u201d: \u201cNGN\u201d, \n \u201cpin\u201d:\u201c7552\u201d, \n \u201ccountry\u201d: \u201cGH\u201d, \n \u201camount\u201d: \u201c10\u201d, \n \u201cemail\u201d: \u201cuser@example.com\u201d,\n \u201cphonenumber\u201d: \u201c1234555\u201d, \n \u201csuggested_auth\u201d: \u201cPIN\u201d, \n \u201cfirstname\u201d:\u201cuser1\u201d, \n \u201clastname\u201d: \u201cuser2\u201d, \u201cIP\u201d: \u201c355426087298442\u201d, \u201ctxRef\u201d:\n \u201cMC-7663-YU\u201d, \u201cdevice_fingerprint\u201d:\n \u201c69e6b7f0b72037aa8428b70fbe03986c\u201d \n } \n card_payment = Payment.card(payload, api=my_api)\n\n if card_payment: \n return card_payment \n\n- **Bank account payment**\n\n *Usage*\n\n ::\n\n payload = {\n \"accountnumber\": \"0690000004\",\n \"accountbank\": \"044\",\n \"currency\": \"NGN\",\n \"country\": \"NG\",\n \"amount\": \"10\",\n \"email\": \"user@example.com\",\n \"phonenumber\": \"1234555\",\n \"firstname\": \"first name\",\n \"lastname\": \"last name\",\n \"IP\": \"355426087298442\",\n \"txRef\": \"\",\n \"device_fingerprint\": \"69e6b7f0b72037aa8428b70fbe03986c\"\n }\n bank_payment = Payment.bank_account(payload, api=my_api)\n\n if bank_payment:\n return bank_payment\n\n- **Tokenize Card**\n\n *Usage*\n\n ::\n\n payload = {\n \"token\":{\n \u201cchargeToken\u201d:{\n \u201cuser_token\u201d:\u201cf0209\u201d,\n \u201cembed_token\u201d:\u201cflw-t0-9f3aa69a806f6440fbb78cc9e8b2f135-k3n\u201d\n }\n },\n \"currency\": \"NGN\",\n \"country\": \"NG\",\n \"amount\": \"10\",\n \"email\": \"user@example.com\",\n \"phonenumber\": \"1234555\",\n \"firstname\": \"user1\",\n \"lastname\": \"user2\",\n \"IP\": \"355426087298442\",\n \"txRef\": \"MC-7663-YU\",\n \"narration\":\"tokenize my card\"\n \"meta\": [{\"metaname\": \"flightId\"}, {\"metavalue\": \"1002\"}]\n \"device_fingerprint\": \"69e6b7f0b72037aa8428b70fbe03986c\"\n }\n\n tokenize_card = Payment.tokenize_card(payload, api=my_api)\n\n- **USSD Payment**\n\n *Usage*\n\n ::\n\n ussd_payment = Payment.ussd(payload, api=my_api)\n\n- **MPESA Payment**\n\n *Usage*\n\n ::\n\n mpesa_payment = Payment.mpesa(payload, api=my_api)\n\n- **Ghana Mobile Money**\n\n *Usage*\n\n ::\n\n gh_mobile_payment = Payment.ghana_mobile(payload, api=my_api)\n\n- The same payload format goes for the **USSD**, **MPESA** and **Ghana\n Mobile Money**. Kindly review the `API\n documentation `__\n to get the required field for each transaction\n\nTransaction\n-----------\n\nThis module retrieves all transactions and verifies transactions.\n\n*Usage*\n\nImport the transaction module\n\n::\n\n from ravepaypysdk import Transaction\n\n- **Verify your transaction**\n\n *Usage*\n\n ::\n\n payload = { \n \u201cflw_ref\u201d:\u201cFLW-MOCK-6f52518a2ecca2b6b090f9593eb390ce\u201d, # unique reference \n \u201ctx_ref\u201d:\u201cdummy\u201d, # merchants unique reference number\n \u201cnormalize\u201d: \u201c1\u201d \n } \n verify_transaction = Transaction.verify(payload, api=my_api)\n\n\n- **verify transaction with xquery** \n\n *Usage* \n\n ::\n\n payload = {\n \u201cflwref\u201d: \u201cFLW-MOCK-6f52518a2ecca2b6b090f9593eb390ce\u201d, # unique reference \n \u201ctxref\u201d:\u201cdummy\u201d, # merchants unique reference number \n \u201clast_attempt\u201d:\u201c1\u201d, # retrieves the last transaction\n \u201conly_successful\u201d: \u201c1\u201d # retrieves only successful transaction \n }\n xquery_verify = Transaction.verify_query(payload, api=my_api)\n\n\n- **List all recurring transactions**\n\n *Usage*\n\n ::\n\n list_transactions = Transaction.list_all_recurring(api=my_api)\n\n- **List single recurring transactions**\n\n *Usage*\n\n ::\n\n payload = {\n \"txId\":\"dummy\" #add the required value for txId\n }\n list_single_transaction = Transaction.list_single_recurring(payload, api=my_api)\n\nPreAuthorization\n----------------\n\nThis module performs preauthorization transactions on the RavePay\nplatform\n\n*Usage*\n\nImport the PreAuthorization module\n\n``from ravepaypysdk import PreAuthorization`` - \n\n**Preauthorization Capture**\n\n::\n\n *Usage*\n ::\n payload = {\n \"flwRef\":\"39448fhdhhfdhshshf\" # add the required value\n }\n preauthorize_capture = PreAuthorization.capture(payload, api=my_api)\n\n\n\n- **Preauthorize Card transaction**\n\n *Usage*\n\n ::\n\n Payload is the same as direct charge card payment payload\n\n preauthorize_card = PreAuthorization.card(payload, api=my_api)\n\n- **Preauthorize void or refund transactions**\n\n *Usage*\n\n ::\n\n payload = {\n \"flwRef\":\"dummy\" # add the value from the capture response\n \"action\": \"refund or void\" # select what action i.e refund or void\n }\n preauth_void_refund = PreAuthorization.void_or_refund(payload, api=my_api)\n\n\n\nValidate Ravepay charges \n------------------------\n\nThis module validates RavePay payment\ntransactions.\n\n*Usage*\n\nImport the ValidateCharge module\n\n::\n\n from ravepaypysdk import ValidateCharge\n payload = {\n \"transaction_reference\": \"222334304\",\n \"otp\": \"12345\"\n }\n\n- **Validate card transactions**\n\n *Usage*\n\n ::\n\n\n validate_card_transac = ValidateCharge.card(payload, api=my_api)\n\n- **Validate bank account transaction**\n\n *Usage*\n\n ::\n\n validate_bank_account_transac = ValidateCharge.account(payload, api=my_api)\n\n\n\nSubscriptions\n-------------\n\nThis module retrieves, cancels and activates subscriptions on the\nRavePay Platform\n\n*Usage*\n\nImport the subscriptions module\n\n::\n\n from ravepaypysdk import Subscriptions\n\n- **Activate Subscription**\n\n *Usage*\n\n ::\n\n #sub_id is the subscription id\n activate_subscription = Subscriptions.activate(sub_id=50, api=my_api)\n\n- **Cancel Subscription**\n\n *Usage*\n\n ::\n\n #sub_id is the subscription id\n cancel_subscription = Subscriptions.cancel(sub_id=50, api=my_api)\n\n- **Fetch Single Subscription**\n\n *Usage*\n\n ::\n\n #params is the subscription id\n single_subscription = Subscriptions.fetch_single(params=70, api=my_api)\n\n- **Fetch All Subscriptions**\n\n *Usage*\n\n ::\n\n all_subscriptions = Subscriptions.fetch_all(api=my_api)\n\n\n\nPayment Plan\n------------\n\nThis module creates, retrieves, edit and cancel payment plans on the\nplatform\n\n*Usage*\n\nImport the Payment plan module\n\n::\n\n from ravepaypysdk import PaymentPlan\n\n #plan_id is the payment plan identifier\n\n- **Create Payment Plan**\n\n *Usage*\n\n ::\n\n payload = {\n \"amount\": 3000,\n \"name\": 'New User',\n \"intervals\": \"daily\",\n \"duration\": 0\n }\n create_plan = PaymentPlan.create(payload, api=my_api)\n\n- **Edit Payment Plan**\n\n *Usage*\n\n ::\n\n payload = {\n \"amount\": 1000,\n \"name\": 'New User',\n \"intervals\": \"monthly\",\n \"duration\": 0\n }\n\n edit_plan = PaymentPlan.edit_plan(payload, plan_id=60, api=my_api)\n\n- **Cancel Payment**\n\n *Usage*\n\n ::\n\n cancel_plan = PaymentPlan.cancel_plan(plan_id=60, api=my_api)\n\n- **Fetch Single Payment Plan**\n\n *Usage*\n\n ::\n\n fetch_single_plan = PaymentPlan.fetch_single_plan(params=40, api=my_api)\n\n- **Fetch All Payment Plans**\n\n *Usage*\n\n ::\n\n fetch_all_plans = PaymentPlan.fetch_all_plan(api=my_api)\n\n\nMiscellanous\n------------\n\nThis module gets the bank list and current forex rates\n\n*Usage*\n\nImport the bank module\n\n::\n\n from ravepaypysdk import Bank\n\n- **Get List of Banks**\n\n *Usage*\n\n ::\n\n get_banks = Bank.list_all(api=my_api)\n\n- **Get Forex Rates**\n\n *Usage*\n\n ::\n\n payload = {\n 'origin_currency': 'USD',\n 'destination_currency': 'NGN',\n 'amount': '200'\n }\n get_forex = Bank.get_forex(payload, api=my_api)\n\nDocumentation\n-------------\n\nAPI documentation for RavePay can be found\n`here `__\n\nContributing\n------------\n\nContributions are always welcomed to the project. Use Github Issue for\nrequests.\n\n- Fork the project to your repository then clone it to your local\n machine.\n- Create a new branch and make the necessary enhancement to the\n features.\n- If the you wish to update an existing enhancement submit a pull\n request.\n- If you are unsure about certain areas in the project feel to ask for\n assistance.\n\n.. |Build Status| image:: https://travis-ci.org/johnchuks/ravepay-python-sdk.svg?branch=master\n :target: https://travis-ci.org/johnchuks/ravepay-python-sdk\n.. |Scrutinizer Code Quality| image:: https://scrutinizer-ci.com/g/johnchuks/RavePay-SDK-Python/badges/quality-score.png?b=master\n :target: https://scrutinizer-ci.com/g/johnchuks/RavePay-SDK-Python/?branch=master\n.. |Coverage Status| image:: https://coveralls.io/repos/github/johnchuks/RavePay-SDK-Python/badge.svg?branch=master\n :target: https://coveralls.io/github/johnchuks/RavePay-SDK-Python?branch=master\n\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/johnchuks/ravepay-python-sdk", "keywords": "ravepay python library", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "ravepaypysdk", "package_url": "https://pypi.org/project/ravepaypysdk/", "platform": "", "project_url": "https://pypi.org/project/ravepaypysdk/", "project_urls": { "Homepage": "https://github.com/johnchuks/ravepay-python-sdk" }, "release_url": "https://pypi.org/project/ravepaypysdk/1.0.2/", "requires_dist": [ "pycrypto", "requests", "coverage; extra == 'test'" ], "requires_python": "", "summary": "A Python library to consume the RavePay API", "version": "1.0.2" }, "last_serial": 3764135, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "0259984168131e08ca29af721ccfdc94", "sha256": "157b9c650b2531fa6a88912fd4ab27b362e0e4240c3bfe358b099e2a5d234c09" }, "downloads": -1, "filename": "ravepaypysdk-1.0.0.tar.gz", "has_sig": false, "md5_digest": "0259984168131e08ca29af721ccfdc94", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10940, "upload_time": "2018-03-20T13:16:27", "url": "https://files.pythonhosted.org/packages/6f/de/beed5f99c3fa69ed0e68b5d1d490b3a269f662b66dd16e3a0df5fcc60d72/ravepaypysdk-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "c9dc0c3e1fb04accf4e52a9caa136c3e", "sha256": "6c920c41b2c06409876fba04e0ef1fb4db40618eb4bd37014d6906cbf347f7b2" }, "downloads": -1, "filename": "ravepaypysdk-1.0.1.tar.gz", "has_sig": false, "md5_digest": "c9dc0c3e1fb04accf4e52a9caa136c3e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10971, "upload_time": "2018-03-21T11:30:54", "url": "https://files.pythonhosted.org/packages/14/8c/440baec625bc67ddaf69dee014bd3a0e5b46965a89465034b1498c393777/ravepaypysdk-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "1fcfcab0fefeaf2927dbe67a5788ca64", "sha256": "e8efb120e5c9a386ff27091cb21ed75b129a18c4bf44201b70fa66d99bb6498c" }, "downloads": -1, "filename": "ravepaypysdk-1.0.2-py2-none-any.whl", "has_sig": false, "md5_digest": "1fcfcab0fefeaf2927dbe67a5788ca64", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 10193, "upload_time": "2018-04-14T10:07:44", "url": "https://files.pythonhosted.org/packages/66/9a/09da86a78982991f6999c1cc56e4b8180deaf6ce36cbf080f62dbf343a51/ravepaypysdk-1.0.2-py2-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1fcfcab0fefeaf2927dbe67a5788ca64", "sha256": "e8efb120e5c9a386ff27091cb21ed75b129a18c4bf44201b70fa66d99bb6498c" }, "downloads": -1, "filename": "ravepaypysdk-1.0.2-py2-none-any.whl", "has_sig": false, "md5_digest": "1fcfcab0fefeaf2927dbe67a5788ca64", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 10193, "upload_time": "2018-04-14T10:07:44", "url": "https://files.pythonhosted.org/packages/66/9a/09da86a78982991f6999c1cc56e4b8180deaf6ce36cbf080f62dbf343a51/ravepaypysdk-1.0.2-py2-none-any.whl" } ] }