npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

react-native-arca-pg

v0.1.3

Published

handling integration to ARCA payment gateway for react-native projects

Downloads

7

Readme

react-native-arca-pg

handling integration to ARCA payment gateway for react-native projects

Installation

npm install react-native-arca-pg

Usage

import {  CreateOrder, PayOrder, VerifyOrder, Checkout, PayOrderApiRequest, CreateOrderApiRequest, PayOrderEncrypt, CreateOrderEncrypt  } from 'react-native-arca-pg';

// ...


const newOrder = await CreateOrder({ 
  first_name: "test", 
  last_name: "tester", 
  mobile: "+2348101234544", 
  country: "NG", 
  email: "[email protected]", 
  amount: 10, 
  reference: "{{unique_transRef}}", 
  description: "Pay", 
  currency: "USD", 
  merchant_encryption_key: "merchant_enc_key", 
  pub_key: "api_pub_key" }) // creates new order, handling both encryption and sending the API request

const payload = {
            reference: "unique_transRef", //same unique transRef from create order function
            country: "NG",
            card: "{{card_pan}},
            cvv: "{{card_cvv}}",
            expiry_month: "{{card_expiry_month}}", // MM
            expiry_year: "{{card_expiry_year}}", // YY
            pub_key: "api_pub_key",
            merchant_encryption_key: "merchant_enc_key"
        }
const orderPayment = await PayOrder(payload) // Process card payment for order



const orderConfirmation = await VerifyOrder({reference: "{{orderRef}}", priv_key: "api_sec_key"}) // verfy order payment.  orderRef = unique_transRef


To make us of arca-pg's checkout for card details collection; 
- Add the "Checkout" function to your navigation
- Navigate to the checkout screen as shown below
    navigation.navigate('Checkout', { order: orderCreated, apiKey: api_pub_key, encKey: merchant_enc_key, onGoBack: (response) => completePayOrder(response) })
    This will call the "PayOrder" function and return response with the onGoBack "callback" function. 
- Implement a completePayOrder function to receive the response payload. 
- If the transaction is processed as a 3D transaction (with Authentication). YOu are to launch a returned url in the response from the PayOrder call. See sample of below


  const completePayOrder = async (response) => {

    console.log('pay response ', response)

    if (response.data.payment_detail.redirect_url !== 'N/A') {
      setIframeLink(response.data.payment_detail.redirect_url) // sets iframe link
      setIframeVisible(!iframeVisible) // launches iframe. See example code for complete implementation
    }
  }



  ADDITIONAL FUNCTIONS

  CreateOrderEncrypt({
      first_name: 'test',
      last_name: 'tester',
      mobile: '+2348101234544',
      country: 'US',
      email: '[email protected]',
      amount: 10,
      reference: transRef,
      description: 'Pay',
      currency: 'USD',
      merchant_encryption_key: merchant_enc_key,
      pub_key: api_pub_key,
    }) // Only encrypts the plain "Create Order" payload

  CreateOrderApiRequest( encrypted_orderPayload_string, api_pub_key) // Only handles sending API request for Create Order

  PayOrderEncrypt({
      reference: orderRefCreated,
      country: 'US',
      card: '5123450000000008',
      cvv: '100',
      expiry_month: '01',
      expiry_year: '39',
      pub_key: api_pub_key,
      merchant_encryption_key: merchant_enc_key,
    }) // Only encrypts the plain "Pay Order" payload
    
  PayOrderApiRequest( encrypted_paymentPayload_string, api_pub_key) //  Only handles sending API request for Pay Order

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library