react-native-payment-wrapper
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

react-native-payment-wrapper

React native payment wrapper

Installation

npm install mobile-payment-wrapper

Usage

import { StyleSheet, SafeAreaView } from 'react-native';
import { LitePayment } from 'mobile-payment-wrapper';

export default function App() {
  const litePaymentConfig = {
    publicKey: 'sandbox',
    secretKey: '',
    options: {},
    targetElement: '#payment-element',
    returnUrl: 'exampleApp://payment-success',
    amount: 2000,
    currency: 'usd',
    submitButton: {
      text: 'Credit Card',
    },
    merchantIdentifier: 'merchant.com.example',
  };

  return (
    <SafeAreaView style={styles.safeArea}>
      <LitePayment config={litePaymentConfig} />
    </SafeAreaView>
  );
}

const styles = StyleSheet.create({
  safeArea: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#fff',
  },
});

License

MIT


Made with create-react-native-library

Package Sidebar

Install

npm i react-native-payment-wrapper

Weekly Downloads

14

Version

0.1.0

License

MIT

Unpacked Size

51.5 kB

Total Files

33

Last publish

Collaborators

  • jabriabdessamad