1.0.8 • Published 2 years ago

credpal-react-native v1.0.8

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

credpal-react-native

ReactNavite libary for credpal

Installation

Add credpal-react-native to your project by running;

Yarn

yarn add credpal-react-native

NPM

npm install credpal-react-native

 

Info

install the following packages for the plugin to work perfectly.

  • react-native-webview

credpal-react-native usage

How to use the credpal-react-native component.

Example:

import React from "react";
import { CredPal } from "credpal-react-native";

<CredPal
  product="Product Paid For"
  onCancel={() => console.log("Cancelled")}
  onError={(e) => console.log(e.error, res.status)}
  onSuccess={(res) => console.log(res.data, res.status)}
  amount={50000}
  apiKey={"YOUR_KEY"}
/>;

credpal-react-native

NameDescriptionTypeRequired
apiKeyRequired. your keyStringYes
amountAmount to be paidStringYes
productProduct paid forStringYes
onSuccesscallback function if transaction was successful (it will also return status and data the callback )functionYes
onCancelcallback function if user cancels the paymentfunctionNo
onErrorcallback function if the payment was not successfulfunctionNo

   

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago