Socket
Socket
Sign inDemoInstall

react-native-appay-mir

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-appay-mir

Fork of `react-native-appay` with MIR payments network support


Version published
Weekly downloads
51
increased by15.91%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

react-native-appay-mir

npm npm (tag)

It is forked from react-native-apay with extended by Payment Network (MIR) added russian payment network МИР.

Accept Payments with Apple Pay for React Native apps.


Getting started

$ yarn add react-native-appay-mir

Linking

>= 0.60

Autolinking will just do the job.

< 0.60

Mostly automatic installation

$ react-native link react-native-appay-mir

CocoaPods

Link using Cocoapods by adding this to your Podfile:

pod 'react-native-appay-mir', :path => '../node_modules/react-native-appay-mir'

Manual installation

iOS
  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-appay-mir and add AppayMir.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libAppayMir.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<

Usage

import { ApplePay } from 'react-native-appay-mir';

const requestData = {
  merchantIdentifier: 'merchant.com.example',
  supportedNetworks: ['mastercard', 'visa', 'mir'],
  countryCode: 'RU',
  currencyCode: 'RUB',
  paymentSummaryItems: [
    {
      label: 'Item label',
      amount: '100.00',
    },
  ],
}

// Check if ApplePay is available
if (ApplePay.canMakePayments) {
  ApplePay.requestPayment(requestData)
    .then((paymentData) => {
      console.log(paymentData);
      // Simulate a request to the gateway
      setTimeout(() => {
        // Show status to user ApplePay.SUCCESS || ApplePay.FAILURE
        ApplePay.complete(ApplePay.SUCCESS)
          .then(() => {
            console.log('completed');
            // do something
          });
      }, 1000);
    });
};

Demo

You can run the demo by cloning the project and running:

$ yarn demo

Keywords

FAQs

Last updated on 05 Jul 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc