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-ddpaysdk

v1.0.1

Published

## Getting started

Readme

react-native-ddpaysdk

Getting started

$ npm install react-native-ddpaysdk --save

cd ios

pod install

Usage

微信配置 在androidManifest.xml 中添加一下代码,并设置你的应用WXAPPID

android

<!--微信支付回调,要写在activity-alias之前-->
<activity
	android:name="com.ddpaysdk.wxapi.WXPayEntryActivity"
	android:label="@string/app_name"
	android:exported="true"
	android:launchMode="singleTop">
	
</activity>
<!--将依赖工程的回调activity 重命名为${applicationId}.wxapi.WXPayEntryActivity-->
<activity-alias
	android:name="${applicationId}.wxapi.WXPayEntryActivity"
	android:label="@string/app_name"
	android:exported="true"
	android:launchMode="singleTop"
	android:targetActivity="com.ddpaysdk.wxapi.WXPayEntryActivity">
	
</activity-alias>
<meta-data android:name="WXAPPID" android:value="wxAppID"/>

iOS

配置

  1. 在ios 开发者平台配置universalLink,并获取scheme
  2. 在微信开放平台关联这个universalLink,并设置scheme 注:微信的schemeuniversalLink是有规定格式,因此请参照微信文档
  3. 在调用支付方法之前调用WXApi的registerApp:universalLink:方法初始化 <<<<<<< HEAD =======

2c3581e7cc2744294f623b79b7a109a09189cc86

	//wx的运行日志log,发布时需要关闭。调试时在register之前打开log, 后续可以根据log排查问题
  [WXApi startLogByLevel:WXLogLevelDetail logBlock:^(NSString *log) {
      NSLog(@"WeChatSDK: %@", log);
  }];

  //向微信注册 如果集成了umshare的微信分享配置,则这里可以忽略 registerApp:
  [WXApi registerApp:@"wxe7cc1f9268c34605" universalLink:WX_UNIVERSAL_LINK];
  //微信api集成环境自建测,在调试期可以帮助我们排查那里没有集成完善, 务必在调用自检函数前注册。
  [WXApi checkUniversalLinkReady:^(WXULCheckStep step, WXCheckULStepResult* result) {
      NSLog(@"%@, %u, %@, %@", @(step), result.success, result.errorInfo, result.suggestion);
  }];

js端使用

import { Pay } from "react-native-ddpaysdk";

Pay.isSupported((status)=>{
	console.log(status)
	if (status) {
		console.log("data",data)
		Pay.wxPay(data,(status)=>{
			console.log("回调",status)
		})
	}
})

支付宝

配置:主要是注意是否utdid 依赖冲突 如果同时也继承了umSDK或者是其他雅莱了utdid的SDK,则需要排除这些SDK对utdid的依赖,因为utdid是Alipay官方自带的就有的。

android


dependencies {
		.
		.
		.
//    api 'com.umeng.umsdk:push:6.4.5'
    //接入aliPay 同时再接入umsdk:push 则会导致utdid重复,因此删除push的utdid
    api('com.umeng.umsdk:push:6.4.5') {
        exclude group: 'com.umeng.umsdk', module: 'utdid'
    }
    
}

ios

  1. 删除重复的utdid依赖

#下载但未安装前,由于继承了UMSDK与alipay的UITID冲突,因此删除UMSDK中的UTDID.framework
  pre_install do |installer|
     puts "有AlipaySDK-iOS 且有 RNUmsdk, 即将删除RNUmsdk中的UTDID"
     delete_alipay(installer)
 end

# 删除重复的依赖
def delete_alipay(installer = nil)
  if installer != nil
    #需要删除的库名
    exclude_files = ['UTDID']
    #File拼接UMSDK路径,
    Dir.glob(File.join(installer.sandbox.pod_dir('RNUmsdk'), 'libs/**', '*.framework')).each do |bundle|
      
    #        puts "#{bundle}"
      # 判断是否有exclude_files数组内的值。
      if (exclude_files.include?(File.basename(bundle, ".framework")))
        puts "Removing #{bundle}"
        #删除重复的依赖
        FileUtils.rm_rf(bundle)
      end
    end
  end
end
  1. 设置scheme scheme是与universalLink作用类似,都是用于APP之间通讯,alipay目前用的还是scheme 支付宝的这个scheme没有统一格式,单scheme不能与其他app的相同,因此这个scheme要唯一性,因此建议使用类似微信的scheme,应用alipay+支付宝开放平台注册的应用id的组合方式。

js 使用


// scheme 只有ios才有,android穿null
/**
 * orderInfoString 订单信息
 * scheme 只有ios才有,android穿null
 * status 9000 为成功,否则失败
 **/
aliPay("orderInfoString", "scheme", (error, status)=>{

})