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 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-arena-pay

v1.1.1

Published

## Getting started

Readme

react-native-arena-pay

Getting started

$ npm install react-native-arena-pay --save

Mostly automatic installation

$ react-native link react-native-arena-pay

Manual installation

配置

iOS
  1. 将ios工程下的framework文件夹和source文件夹导入主工程。

  2. 在info -> URL Types中配置微信key 。 QQ的话scheme是 tencent + 我的AppId

使用QQ登录需要在info.plist中添加 LSApplicationQueriesSchemes

  1. 在主工程中添加支付宝/微信支付/QQ 库的依赖 SystemConfiguration.framework, libz.dylib, libsqlite3.0.dylib, libc++.dylib, Security.framework, CoreTelephony.framework, CFNetwork.framework, QuartzCore.framework,CoreText.framework,CoreGraphics.framework,CoreMotion.framework,libiconv.dylib,“libsqlite3.dylib”、“libstdc++.dylib”

  2. 在你的工程文件中选择Build Setting,在"Other Linker Flags"中加入"-Objc" 和 "-all_load"

  3. 在AppDelegate中添加跳转微信/支付宝的代理方法。

  4. QQ集成文档:https://wiki.connect.qq.com/ios_sdk%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA


//  应用间跳转的代理方法
#import <RNArenaPay/RNArenaPay.h>


-(BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
  
  NSString *optionKey = options[UIApplicationOpenURLOptionsSourceApplicationKey];
  NSString *absolute = url.absoluteString;
  
  //  支付宝支付
  if ([url.host isEqualToString:@"safepay"]) {
    return [AliPayManager applicationOpenUrl:url];
  }
  
  //  微信支付或者微信登录
  if ([optionKey isEqualToString:@"com.tencent.xin"] && ([absolute containsString:@"pay"] || [absolute containsString:@"oauth"])) {
    return [WXPayManager applicationOpenUrl:url];
  }
  
//  QQ 授权回调
  if([absolute hasPrefix:@"tencent"]){
    return [TencentOAuth HandleOpenURL:url];
  }
  
  
  return YES;
}
Android

1.把source文件夹下的wxapi文件夹导入根包(两个回调Activity对象) 2.在Manifest.xml文件中加入这两个Activity,wxapi文件夹一定要在包名文件夹下

  <activity android:name=".wxapi.WXEntryActivity"
            android:label="@string/app_name"
            android:theme="@android:style/Theme.Translucent.NoTitleBar"
            android:exported="true"
            android:taskAffinity="net.sourceforge.simcpux"
            android:launchMode="singleTask"/>

        <activity android:name=".wxapi.WXPayEntryActivity"
            android:label="@string/app_name"
            android:theme="@android:style/Theme.Translucent.NoTitleBar"
            android:exported="true"
            android:taskAffinity="net.sourceforge.simcpux"
            android:launchMode="singleTask"/>
            
  1. 替换WXEntryActivity、WXPayEntryActivity中的微信AppKey。

  2. 替换 库里的Manifest中的QQ的AppId data android:scheme="tencent101845112"

  3. 在主工程中 MainActivity 中加入以下代码 ,否则没有回调

 @Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        if (requestCode == Constants.REQUEST_LOGIN) {
            Tencent.onActivityResultData(requestCode,resultCode,data, RNArenaPayModule.module);
        }
        super.onActivityResult(requestCode, resultCode, data);
    }

iOS

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

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.dingle.pay.RNArenaPayPackage; to the imports at the top of the file
  • Add new RNArenaPayPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-arena-pay'
    project(':react-native-arena-pay').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-arena-pay/android')
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-arena-pay')

Usage

import RNArenaPay from 'react-native-arena-pay';

// 注册微信appid
    RNArenaPay.wechatRegister('wx4da13368004666f5');

    // 注册QQ的AppId
    RNArenaPay.QQRegister('101845112')
    
    

   // 苹果内购
    RNArenaPay.appPay({数据}).then((data)=>{
      console.log('支付成功,拿到支付秘钥,需要后台验证')
    },(error)=>{
      console.log('支付失败' + error.code)
    })
    
    
    
    
    

    // 支付宝支付
    RNArenaPay.aliPay({payInfo:订单字符串}).then((data)=>{
      console.log('支付成功')
    },(error)=>{
      console.log('支付失败' + error.code)
    })




    // 微信支付
      let payData = {
      partnerid: '',
      prepayid: '',
      noncestr: '',
      timestamp: '',
      package: '',
      sign: ''
    }
    RNArenaPay.wechatPay(payData).then((data: any) => {
      tips.showTips('支付成功');

    }, (error: any) => {
      tips.showTips(error.code);
    })
    
    
    
    
    
    
    <!--微信登录-->
    RNArenaPay.wechatLogin().then((data: any) => {
//        data.code 用于后端从微信获取用户信息 
        console.log(data.code);
  
      }, (error: any) => {
        console.log(JSON.stringify(error));
        tips.showTips('微信登录失败')
      })
      
      
      
      
      
      
      
      <!--QQ登录-->
      RNArenaPay.QQLogin().then((res:any)=>{
            console.log(res);
           // res 有3个属性,accessToken、openId、expiresTime
            
        },(err:any)=>{
            console.log(err)
        })