1.0.0-beta.3 • Published 2 years ago

@transak/web-view v1.0.0-beta.3

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Transak WebView

An SDK for react native integration of Transak widget. Wrapped over webview(react-native-webview), it provides option to listen to order events. Using this you get Google Pay integrated by default.

Installation and usage

yarn add @transak/web-view

Install these required peer dependencies to facilitate auto-linking (If not already part of your app)

yarn add react-native-webview react-native-inappbrowser-reborn @react-native-community/netinfo

Then use it in your app:

import TransakWebView from '@transak/web-view';

function TransakReactNativeIntegration() {
  return (
    <TransakWebView
      config={{
        apiKey: '<your-api-key>',
        environment: '<environment: STAGING/PRODUCTION>',
      }}
      onTransakEventHandler={(event, data) => console.log(event, data)}
    />
  );
};

Props

The component accepts all the valid props for react-native-webview except the following: injectJavaScript, sharedCookiesEnabled, injectedJavaScript, injectedJavaScriptBeforeContentLoaded

PropDescription
configRefer here for a full list of valid options
onTransakEventHandlerAccepts callback function to listen to order related events

License

MIT Licensed. Copyright (c) Transak Inc. 2022.

1.0.0-beta.3

2 years ago

1.0.0-beta.2

2 years ago

1.0.0-beta.1

2 years ago

1.0.0-beta.0

2 years ago