chrisehlee / react-native-paystack-webview

💸💳The package allows you accept payment using paystack and guess what , it doesn't require any form of linking, just install and begin to use .

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-native-paystack-webview

package in action

The package allows you accept payment using paystack and guess what , it doesn't require any form of linking, just install and begin to use .

Installation

Add react-native-paystack-webview to your project by running;

npm install react-native-paystack-webview

or

yarn add react-native-paystack-webview

and that's it, you're all good to go!

Usage

import PaystackWebView from "react-native-paystack-webview";
import React, { Component } from "react";
import { View } from "react-native";

class MyApp extends Component {
  render() {
    return (
      <View style={{ flex: 1 }}>
        <PaystackWebView
          paystackKey="your key here"
          amount={120000}
          billingEmail="ayoshokz@gmail.com"
          billingMobile="08101274387"
          billingName="Oluwatobi Shokunbi"
        />
      </View>
    );
  }
}

API's

all React-Native-Paystack-WebView API

Name use/description extra
buttonText Defines text on the button default: Pay Now
textStyles Defines styles for text in button nill
btnStyles Defines style for button nill
paystackKey Public or Private paystack key(visit paystack.com to get yours) nill
amount Amount to be paid nill
ActivityIndicatorColor color of loader default: green
billingEmail Billers email default: nill
billingMobile Billers mobile default: nill
billingName Billers Name default: nill
onCancel callback function if user cancels default: nill
onSuccess callback function if transaction was successful (it will also return the transactionRef number in the callback ) default: nill

Contributions

What to help make this package even more awesome? Read how to contribute

Licensing

This project is licensed under MIT license.

Don't forget to star, like and share :)

About

💸💳The package allows you accept payment using paystack and guess what , it doesn't require any form of linking, just install and begin to use .

License:MIT License


Languages

Language:JavaScript 100.0%