1.1.5 • Published 1 year ago

trxact v1.1.5

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
1 year ago

Table of Contents

Install

Install the latest version to your package.json:

// install external dependencies $ npm install react-native-webview react-native-svg --save

// install package $ npm install trxact --save

Usage

import UseTrxact from 'trxact';
import { Stage } from 'trxact/Common/Constants';


<View style={styles.container}>
      // for saving card checkout
      {
        UseTrxact.SavePaymentCardCheckout({
          sessionToken: "sessionToken",
          apiKey: "apiKey",
          stage: Stage.Sandbox or Stage.Production,
          style: { mainColor: '#000', buttonBorderRadius: 100, inputFieldBorderRadius: 100 },
          onSuccess: (res) => console.log('success', res),
          onFailure: (res) => console.log('failure', res),
          onError: (error) => console.log('error', error)
        }
        )
      }

      // for payment checkout
      {
        UseTrxact.PaymentCheckout({
          sessionToken: "sessionToken",
          apiKey: "apiKey",
          stage: Stage.Sandbox or Stage.Production,
          style: { mainColor: '#000', buttonBorderRadius: 100, inputFieldBorderRadius: 100 },
          onSuccess: (res) => console.log('success', res),
          onFailure: (res) => console.log('failure', res),
          onError: (error) => console.log('error', error)
        }
        )
      }
</View>

Properties

All of the following properties are required

  • sessionToken (string): The session token for the session which you initiated before through our APIs.
  • apiKey (string): Your integration API Key; this to be able to call our APIs.
  • stage (Enum): The desired environment stage; available values are Stage.Staging or Stage.Sandbox or Stage.Production.
  • style (object): This is custom style for you
    • mainColor (string): This is the main color.
    • buttonBorderRadius (string): This is the border radius that will be applied on any button.
    • inputFieldBorderRadius (string): This is the border radius that will be applied on any input field.

Events

  • onSuccess: Called once when the process is succeeded.
  • onFailure: Called once when the process is failed.
  • onError: Called whenever an error occured.
1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago