1.0.66 • Published 5 months ago

react-native-aauti-pay v1.0.66

Weekly downloads
-
License
ISC
Repository
github
Last release
5 months ago

Aauti Payment Gateway

Groovy TechnoWeb Pvt. Ltd.

  • It is for both the platforms iOS and Android

npm.io npm.io

Installation

npm install react-native-aauti-pay yarn add react-native-aauti-pay

Manual installation

You need to manually installed below plugins.
Enable Android Pay in your Manifest

To enable Google Pay in your app, you need to add the following Google Pay API meta-data element to the <application> element of your project's AndroidManifest.xml file.

<meta-data
    android:name="com.google.android.gms.wallet.api.enabled"
    android:value="true" />

Please go through once with react-native-inappbrowser-reborn documentation

Append the following lines to your ProGuard config (proguard-rules.pro)

-keepattributes Annotation -keepclassmembers class * { @org.greenrobot.eventbus.Subscribe ; } -keep enum org.greenrobot.eventbus.ThreadMode { ; }

Authentication Flow using Deep Linking

For Deep linking integration you can checkout Deep Linking documentation

In order to redirect back to your application from a web browser, you must specify a unique URI to your app. To do this, add below code to your AndroidManifest file.

  • Enable deep linking (Android) - AndroidManifest.xml
<activity
  ...
  android:launchMode="singleTask">
  <intent-filter>
      <action android:name="android.intent.action.VIEW" />
      <category android:name="android.intent.category.DEFAULT" />
      <category android:name="android.intent.category.BROWSABLE" />
      <data android:scheme="intent" android:host="aauti-pay" />
  </intent-filter>
</activity>
  • Enable deep linking (iOS) - Info.plist
<key>CFBundleURLTypes</key>
<array>
  <dict>
    <key>CFBundleURLSchemes</key>
    <array>
      <string>intent</string>
    </array>
  </dict>
</array>

Usage

# Import this line
import PaymentAggregator from “react-native-aauti-pay”;

# Pass data in an object like this
# All parameters must be same as below and its mandatory
const [change, setChange] = useState(""); // this state is for passing the value via webhook
const pay_data = {
	"name": ‘Name of the payer',
	"email": Email of the payer,
	"amount": Amount to be paid in Number,
	"country_code": Two digit country code,
	"app_token": 'unique application token',
	"currency": "currency short code", // INR, USD, AUD, CAD, GBP, etc.
	"transaction_code": "unique transaction id for payment",
};


# Usage of the plugin
 <PaymentAggregator
          paymentData={pay_data}
		  onButtonClick={() => {
			// here is your main button click in this you do for opening a payment modal bu passing open in injectedMessage
		  }}
          onPaymentDone={() => {
			// Code here it will give you a response when payment is completed
          }}
          injectedMessage={change} // this prop is also for closing the modal and it is compulsory
          onModalClose={() => {}} // this prop is also for closing the modal
          PaymentType = "", //require => one_time, subscription
        />

# It must be mandatory to pass "open" message in injectedMessage for opening the modal
# It must be mandatory to pass "close" message in injectedMessage for closing the modal

Parameters you can use in this is below:

For close icons we have to use react-native-vector-icons/AntDesign only.

Param NameTypeDefault ValueRequiredDescription
PaymentTypeString''YesFor Payment Type for ex: one_time => one time payment, subscription => for subscription plan
paymentDataObject{ name: ‘Name of the payer', email: Email of the payer, amount: Amount to be paid, country_code: country code, app_token: 'unique app token', currency: "short code of your currency", transactionId: "Unique transaction id for payment", mode: "live or test"}YesPass data in this format for payment process
appChargesArray[]NoPass the app charges in array with changes. You'll get default app array in aauti portal.
onPaymentDoneFunction() => {}YesWhen you done payment this function will trigger and you get response back in this function.
modalContainerStylesObject{}NoModal container styles
merchantIdentifierString'merchant.com.app.saayampayment'YesEnable Apple Pay for your app ApplePay Guide & pass merchant ID in this param. It is required to enable Apple Pay.
pluginURLString'staging'NoPass slug according to your server (staging, dev, prodapi)
noChargeBooleanfalseNoif this is true no appCharges will be applied
injectedMessageStringEmpty stringYesit is for closing the modal via webhook calls
onModalCloseFunction() => {}NoClosing the modal when state changes
buttonTitleStringAauti PayNoButton Title
onButtonClickFunction() => {}YesIf you want to something to be happen on this button click
buttonTextStyleObject{}NoButton text styles
mainButtonContainerStyleObject{}NoMain Button container styles
loaderColorStringwhiteNoLoader color
loaderBooleanfalseNoMain button loader
isGradientButtonBooleanfalseNoIf you want gradient or multicolor button than you have to pass true
linearColorsNameArray "red", "pink" NoIf you have enable isGradientButton and you want to change colors than you have to pass particular color name default is red. Like "red", "pink"
changeBtnTextStringPayNoButton Title before the amount in payment button
startPositionObject{ x: 0, y: 0.5 }NoStart position
endPositionObject{ x: 1, y: 0.5 }NoEnd position
themeColorString'#F5F9FF'NoTheme color for whole plugin (Note:- Please add light color of your App theme color)
1.0.66

5 months ago

1.0.65

5 months ago

1.0.64

5 months ago

1.0.63

5 months ago

1.0.62

5 months ago

1.0.61

5 months ago

1.0.60

5 months ago

1.0.39

7 months ago

1.0.44

7 months ago

1.0.43

7 months ago

1.0.42

7 months ago

1.0.41

7 months ago

1.0.48

7 months ago

1.0.47

7 months ago

1.0.46

7 months ago

1.0.45

7 months ago

1.0.49

7 months ago

1.0.51

7 months ago

1.0.50

7 months ago

1.0.55

6 months ago

1.0.54

6 months ago

1.0.53

6 months ago

1.0.52

7 months ago

1.0.59

5 months ago

1.0.58

6 months ago

1.0.57

6 months ago

1.0.56

6 months ago

1.0.38

7 months ago

1.0.29

8 months ago

1.0.28

8 months ago

1.0.33

8 months ago

1.0.32

8 months ago

1.0.31

8 months ago

1.0.30

8 months ago

1.0.37

7 months ago

1.0.36

8 months ago

1.0.35

8 months ago

1.0.34

8 months ago

1.0.19

11 months ago

1.0.18

11 months ago

1.0.17

11 months ago

1.0.16

11 months ago

1.0.22

9 months ago

1.0.21

10 months ago

1.0.20

11 months ago

1.0.26

8 months ago

1.0.25

9 months ago

1.0.24

9 months ago

1.0.23

9 months ago

1.0.27

8 months ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

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