@dev-postpay/widget-react-native
TypeScript icon, indicating that this package has built-in type declarations

0.1.21 • Public • Published

npm version npm

NPM

Descriptions

Postpay SDK for React Native, this library supports both iOS & Android

Base on https://ui.postpay.io/widgets (Using for website integratetion)

Prerequisites

This library uses react-native-webview to render webview. Therefore this library needs to be installed AND linked into your project to work.

Other than the above dependency this library uses pure javascript and supports both iOS and Android

Example

You can check it out react-native-postpay-widget-example

Getting started

$ npm install @dev-postpay/widget-react-native --save

  • OR

$ yarn add @dev-postpay/widget-react-native

Usage

import { PostpayWidget } from '@dev-postpay/widget-react-native';

<PostpayWidget
    merchantId="id_c56705f1a9304e8c8a16e1da98ec8734"
    widgetType='product'
    amount="20050"
    currency="AED"
    locale="en"
    widgetUrl="https://widgets-dev.postpay.io"
    numInstalments={2}
/>

Props

type PostpayWidgetProps = {
    merchantId: Number,
    widgetType: 'payment-summary' | 'product',
    locale?: 'en' | 'ar',
    widgetUrl?: String,
    amount: Number,
    currency: String,
    closeButton?: Boolean,
    numInstalments?: Number,
    style?: StyleProp<ViewStyle>,
};

License

This module is MIT licensed


Package Sidebar

Install

npm i @dev-postpay/widget-react-native

Weekly Downloads

2

Version

0.1.21

License

MIT

Unpacked Size

12.2 kB

Total Files

16

Last publish

Collaborators

  • dev-postpay