1.0.0 • Published 4 years ago

xpresspayonline-react-native v1.0.0

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

README

Requirements
Nodejs React-native React-native-webview

What is this repository for?

How do I get set up?

  • npm install xpresspayonline-react-native
  • Or
  • yarn add xpresspayonline-react-native

run

Who do I talk to?

  • applicationsupport@xpresspayments.com

  • Example ussage

import { StatusBar } from 'expo-status-bar'; import React from 'react'; import { StyleSheet, Text, View } from 'react-native'; import * as PayWithXpresspayOnline from 'xpresspayonline-react-native';

export default function App() {

const options = { "publicKey": “Your public key” here, "logoURL": "", "transactionId": “Your Transaction Id here”, "amount": 100, "currency": "NGN", "country": "NG", "email": “aminu.kabunu@gmail.com”, "phoneNumber": "07063703099", "firstName": "Aminu", "lastName": "Cincin", "hash": "", "meta": { "metaName": "DSTV NUMBER", "metaValue": "075632145555” }, "callbackUrl”:”www.example.com/callback“, "env": "LIVE" }

function handleOnRedirect(data) { if(data'status-code' === '11') { alert('payment cancelled'); } if(data'status-code' === '08') { alert('payment processing'); //requery the transaction with the requery endpoins as in the docs. https://docs.xpresspayonline.com/docs/re-query-payment } if(data'status-code' === '099' || data'status-code' === '098') { alert('payment failed'); //requery the transaction with the requery endpoins as in the docs. https://docs.xpresspayonline.com/docs/re-query-payment }

} return ( Should load the xpresspayonline payment gatewat shortly ... ); } const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: '#fff', alignItems: 'center', justifyContent: 'center', }, });