Package: pyrave
Pyrave======Pyrave is a python wrapper for the flutterwave’s`rave <http://rave.frontendpwc.com/>`__ payment platformIt currently supports the following features:-  Account charge (NG Banks)-  Account charge (International for US and ZAR).-  Card Charge (Bake in support for 3DSecure/PIN).-  Encryption-  Transaction status check (Normal requery flow and xrequery).-  Retry transaction status check flow.-  Preauth -> Capture -> Refund/void.-  Support for USSD and Mcash (Alternative payment methods).-  List of banks for NG Account charge. (Get banks list).-  Get fees endpoint.-  Integrity Checksum(https://flutterwavedevelopers.readme.io/docs/checksum).Getting Started---------------These instructions will get you a copy of the project up and running onyour local machine for development and testing purposes.Set Up~~~~~~Go to `rave <http://rave.frontendpwc.com/>`__ and sign up. This wouldprovide you with a public and private authorization key which would beused throughout the library. Store these authorization keys in yourenvironment as ``RAVE_PUBLIC_KEY`` for the public key and``RAVE_SECRET_KEY``.Installing~~~~~~~~~~.. code:: bashpip install -U pyraveUpon completion, try to import the library with.. code:: pythonimport pyraveIf the installation was successful, the code above should run withoutany error.If an error like ``No module named pyrave`` pops up, then theinstallation was not successfull. You can either raise an issue here toget it looked at or attempt to reinstall it.Usage-----Payment-------The payment class was made simple enough to cover the following raveactions:.. code:: pythonfrom pyrave import Paymentrave_payment = Payment()data = {...}Payment with card and account'''''''''''''''''''''''''''''.. code:: python## Payment with card and accountpayment_with_card = rave_payment.pay(using="card", **data)payment_with_account = rave_payment.pay(using="account", **data)Getting encrypted data''''''''''''''''''''''To get the encrypted data, call the Payment class’``get_encrypted_data`` method. This would return a tuple of data.. code:: pythonencrypted_data = rave_payment.get_encrypted_data(using="account", **data)An alternative approach to doing this is to call the pay method and passthe return_encrypted boolean as True.. code:: pythonencrypted_data = rave_payment.pay(using="card", return_encrypted=True , **data)In both cases, if the request was successful, you should be able to geteach one of the encryption details by indexing ``encrypted_data``Charge Validation'''''''''''''''''To validate a charge, call the ``validate_charge`` method and pass the``reference`` and ``otp`` as parameter. You can select the method thatapplies most to your transaction... code:: pythonvalidate_charge = rave_payment.validate_charge("reference", "otp", method="card")Transaction Verification''''''''''''''''''''''''To verify a transaction, call the ``verify_transaction`` method and passthe transaction reference... code:: pythontransaction_verification = rave_payment.verify_transaction("reference", "otp", method="card")Disbursements'''''''''''''To make disbursements, call the ``disburse`` method and pass the``bank_code``, ``account_number``, ``currency``, ``amount`` asparameters.. code:: pythondisbursements = rave_payment.disburse("bank_code", "account_number", "currency", "amount")Charge Tokenization'''''''''''''''''''.. code:: pythontokenize = rave_payment.tokenize_charge(**data)Refund''''''.. code:: pythonrefud = rave_payment.refund(reference_id="reference_id")Transaction-----------The transaction Class provides support for the following rave functions:.. code:: pythonfrom pyrave import Transactionrave_transaction = Transaction()data = {...}Verify Transaction''''''''''''''''''.. code:: pythonverify = rave_transaction.verify_transaction(**data)Verify Transaction with xrequery''''''''''''''''''''''''''''''''.. code:: pythonverify = rave_transaction.verify_transaction_with_xrequery(**data)Get Recurrent Transactions''''''''''''''''''''''''''.. code:: pythonverify = rave_transaction.get_reccurent_transactions()Get Recurrent Transaction'''''''''''''''''''''''''.. code:: pythonverify = rave_transaction.get_reccurent_transaction(transaction_id="your transaction_id")Stop Recurrent Transactions'''''''''''''''''''''''''''.. code:: pythonverify = rave_transaction.get_reccurent_transaction(transaction_data_id="your transaction_data_id")Miscellaneous features----------------------The Misc class provides support for the following rave functions:.. code:: pythonfrom pyrave import Miscmisc = Misc()Get list of banks'''''''''''''''''.. code:: pythonbanks = misc.get_banks()Get fees''''''''.. code:: pythonbanks = misc.get_fee(amount="your amount", currency="your currency", ptype="your ptype", card6="card's number")Get Exchange Rates''''''''''''''''''.. code:: pythonrates = misc.get_exchange_rates(origin_currency="your origin currency", destination_currency="your destination currency", amount=None)Preauth-------.. code:: pythonfrom pyrave import Preauthpreauth = Preauth()Preauthorize card^^^^^^^^^^^^^^^^^Before preauthorizing a card, get the client and alg parameters bycalling the ``get_encrypted_data`` method of the Payment class... code:: pythonpreauth.preauthorise_card(client="client id", algo="algo used")Preauthorization Capture''''''''''''''''''''''''To capture preauthorization, call the``capture_preauthorised_transaction`` method and pass the``transaction_reference`` as parameter.. code:: pythonpreauthorization = preauth.capture_preauthorised_transaction(transaction_reference="your transaction reference")Transaction Refund or Void''''''''''''''''''''''''''.. code:: pythonrefund_or_void = preauth.refund_or_void_transaction(action="refund or void", reference_id="your reference id")Contributing------------To contribute, fork the repo, make your changes and create a pullrequest.Todo----More TestsAuthors--------  `Olamilekan Wahab <https://github.com/Olamyy>`__License-------This project is licensed under the MIT License - see the`LICENSE.md <LICENSE.md>`__ file for details