npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cordova-rave

v1.3.1

Published

Cordova extension to add Rave Pay Button into your hybrid app

Downloads

2

Readme

Note: Not maintained anymore. Use https://github.com/Flutterwave/cordova-rave

Cordova Rave

A Cordova extension to add Rave Pay Button into your hybrid apps builds.

e.g

Getting Started

These instructions will get you up and running on your local machine for development and testing purposes. See Deployment section for notes on how to deploy the project on a live system.

Prerequisites

  1. Ensure that you have signed up for a Rave account. If not, go here to sign up for a live account or here to sign up for a test account.

  2. Ensure that you have node and npm installed. If not, visit nodejs.org for instructions on how to install for your specific environment. Installing node will also install npm.

  3. As this package is for Cordova and Cordova-based projects, ensure you all your required dependencies installed. e.g Cordova.

Installing

The following steps will get you up and running.

  1. In the root of your project, run npm install cordova-rave

  2. Then: cd node_modules/cordova-rave && npm start Once the second command installs all the necessary dependencies, you will be prompted to enter some information. An example is shown below:

    prompt: PBFPubKey:  FLWPUBK-98765445678900987698765567-X
    
    prompt: amount:  1
    
    prompt: customer_email:  [email protected]
    
    prompt: currency:  NGN
    
    prompt: country:  Nigeria
    
    prompt: custom_title:  Cordovey
    
    prompt: custom_description:  Testing
    
    prompt: redirect_url:  https://yourredirecturl.com
    
    prompt: payment_plan_id:  1000
    
    prompt: payment_options:
    
    prompt: subaccounts:  []
    
    prompt: custom_logo: logo.png
    
    prompt: liveMode:  yes

    PBFPubKey: This is your Rave public key and can be gotten from your Rave dashboard

    amount: The amount you want to charge your customers. You can omit this and set an amount when calling the pay button (see below)

    customer_email: This is the customer's email address. You can omit this and set a value when calling the pay button (see below)

    currency: The currency you want to charge your customers in. If omitted, it defaults to NGN

    country: The merchant's country. Defaults to Nigeria

    custom_title: Text to be displayed as the title of the payment modal

    custom_description: Text describing what your customers are paying for

    redirect_url: This is the url that rave sends the response of your transaction to. It should be configured to handle a get request. If not supplied, no response will be sent from Rave

    payment_plan_id: If you want to bill your customers recurrently, pass in the payment plan id here. It must be an integer

    payment_options: This allows you select the payment options you want for your users.

    subaccounts: This is an array of objects containing the subaccount IDs to split the payment into.

    custom_logo: Link to the Logo image.

    liveMode: This determines if you want to use the Live APIs (yes) or the Test APIs (no). It is required

  3. Generate rave.js. While you're still in the node_modules/cordova-rave directory, run:

    npm run build

    This ultimately creates a rave.js file into your www directory.

  4. Link the rave.js file to index.html in www directory

    Add the following script tag just before your closing script tag

    <script type="text/javascript" src="rave.js"></script>

    With rave.js now linked, you can call the function below (as you please), passing in an object containing the properties for that specific transactionn. An example is shown below

    initRavePay({
        'amount': 5000,
        'customer_email': '[email protected]',
        'customer_firstname': 'Jon',
        'customer_lastname': 'Snow',
        'pay_button_text': 'Pay now',
        'redirect_url': 'https://www.example.com/payment-successful',
        'txref': 'CD-102297-RV098299'
    });

Deployment

Here are a few things to note

  1. If you set liveMode to no then ensure that you're using your Rave Sandbox API key i.e public key
  2. If you set liveMode to yes then ensure that you're using your Rave Live API keys

Support

  • For any bugs (and questions) about this module, please feel free to report here.
  • And you are welcome to fork and submit pull requests.

License

This project is licensed under the MIT License - see the LICENSE.md file for details