1.0.10 • Published 4 years ago

react-native-payfort-sdk v1.0.10

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

react-native-payfort-sdk

Getting started

$ npm install react-native-payfort-sdk --save

Mostly automatic installation

$ react-native link react-native-payfort-sdk

Add library to each platform

iOS

  1. Extract this folder. 
  2. Drag the PayFortSDK.framework & PayFortSDK.bundle to Frameworks in Project Navigator.
  3. Create a new group Frameworks if it does not exist: Choose Create groups for any added folders.       Make Sure to select Copy files if needed.
  4. Set -ObjC in the Other Linker Flags in the TargetBuild Settings Tab.
  5. For Swift Projects Don’t forget to add the #import to the Bridging-Header.h

Android

  1. Extract this folder.
  2. In Android Studio, choose FileNewNew Module then select Import .JAR\.AAR Package.
  3. In the next step, find to the path of .aar file in library folder and press Finish.

Usage

First, you have to read the document from Payfort carefully

import RNReactNativePayfortSdk from 'react-native-payfort-sdk';

let data = {};
data['access_code'] = 'abcdxyzqwerty';          // require field
data['merchant_identify'] = 'poilkjyhm';        // require field
data['request_phrase'] = 'tgbvfe';              // require field
data['customer_email'] = 'v@example.com';       // require field
data['currency'] = 'USD';                       // require field
data['amount'] = '10';                          // require field
data['merchant_reference'] = '123456';          // require field
data['customer_name'] = 'Glenn';
data['customer_ip'] = '27.79.60.231';
data['payment_option'] = 'VISA';
data['order_description'] = 'Order for testing';

RNReactNativePayfortSdk.openPayfort(data, (response) => {
    console.log(response);
}, (message) => {
    // Message in case payment is failure or cancel
});
1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago