2.0.4 • Published 10 months ago

@network-international/react-native-ngenius v2.0.4

Weekly downloads
6
License
MIT
Repository
github
Last release
10 months ago

react-native-ni-sdk

Banner

Requirements

  • Reat-native v0.60+
  • iOS version 11+
  • Android minSDK version 19

Getting started

npm i @network-international/react-native-ngenius

Note: If your project is using iOS deployment target 10, you need to increase it to 11.

In order to increase change the versions in the following files

  • Change the iOS deployment version in your-project/ios/Podfile as follows platform :ios, '11.0'
  • Open the .xcworkspacefile inside the following directory your-project/ios/yourproject.xcworkspace and change the deployment target to 11.0.

Basic usage example

import {
  initiateCardPayment,
  initiateSamsungPay,
  initiateApplePay,
} from '@network-international/react-native-ngenius';

// order is the order response received from NGenius create order API
const makeCardPayment = async () => {
    try {
      const resp = await initiateCardPayment(order);
    } catch (err) {
      console.log({ err });
    }
};

// order is the order response received from NGenius create order API
// merchantName is the name of merchant's establishment
// serviceId is the serviceId that is generated in the Samsung Pay developer portal
const makeSamsungPayPayment = async () => {
    try {
      const resp = await initiateSamsungPay(order, merchantName, serviceId);
    } catch (err) {
      console.log({ err });
    }
};

// order is the order response received from NGenius create order API
// mid is the merchant ID that is generated in the Apple developer portal
// countryCode is the country code of the transaction country Eg: AE for UAE
const makeApplePayPayment = async () => {
    try {
      const resp = await initiateApplePay(order, { // order is the order response after creating an order
        merchantIdentifier: '', // Merchant ID created in Apple's portal
        countryCode: '', // Country code of the order Eg, AE
        merchantName: '', // name of the merchant to be shown in Apple Pay button
      });
    } catch (err) {
      console.log({ err });
    }
};
2.0.4

10 months ago

1.2.0

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.9

3 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago