All Projects → Timson020 → react-native-wx-ali-pay

Timson020 / react-native-wx-ali-pay

Licence: MIT license
react-native pay for Ali && WeiXin

Programming Languages

objective c
16641 projects - #2 most used programming language
java
68154 projects - #9 most used programming language
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to react-native-wx-ali-pay

Alipay kit
flutter版支付宝登录/支付
Stars: ✭ 140 (+833.33%)
Mutual labels:  pay
WHMCS-JSJ-API-Pay-Gateway
WHMCS 财务系统对接金莎云免签支付API(你们怎么用,与我无瓜好吧:)
Stars: ✭ 58 (+286.67%)
Mutual labels:  pay
copanier
A minimalist collective buying software.
Stars: ✭ 19 (+26.67%)
Mutual labels:  pay
Pay Java Parent
第三方支付对接全能支付Java开发工具包.优雅的轻量级支付模块集成支付对接支付整合(微信,支付宝,银联,友店,富友,跨境支付paypal,payoneer(P卡派安盈)易极付)app,扫码,网页刷脸付刷卡付条码付转账服务商模式,微信分账,微信合单支付、支持多种支付类型多支付账户,支付与业务完全剥离,简单几行代码即可实现支付,简单快速完成支付模块的开发,可轻松嵌入到任何系统里 目前仅是一个开发工具包(即SDK),只提供简单Web实现,建议使用maven或gradle引用本项目即可使用本SDK提供的各种支付相关的功能
Stars: ✭ 2,025 (+13400%)
Mutual labels:  pay
Oneqrcode
📱 微信、支付宝、QQ 三合一收款二维码(单文件版)
Stars: ✭ 233 (+1453.33%)
Mutual labels:  pay
credit-card-prompt
Credit card prompt with validation and address lookup
Stars: ✭ 13 (-13.33%)
Mutual labels:  pay
Best Pay Demo
best-pay-sdk demo
Stars: ✭ 120 (+700%)
Mutual labels:  pay
DYFStoreKit
([Swift] https://github.com/chenxing640/DYFStore) A lightweight and easy-to-use iOS library for In-App Purchases (Objective-C). DYFStoreKit uses blocks and notifications to wrap StoreKit, provides receipt verification and transaction persistence and doesn't require any external dependencies.
Stars: ✭ 52 (+246.67%)
Mutual labels:  pay
Pay Gateway
pay gateway. support alipay,wechatpay,unionpay,jdpay etc.
Stars: ✭ 247 (+1546.67%)
Mutual labels:  pay
mollie-api-go
Golang wrapper for Mollie's REST API with full resource coverage.
Stars: ✭ 45 (+200%)
Mutual labels:  pay
Priest
dubbo mybatis springboot base soa rest api framework with customer code generator
Stars: ✭ 160 (+966.67%)
Mutual labels:  pay
Best Pay Sdk
可能是最好的支付SDK
Stars: ✭ 2,651 (+17573.33%)
Mutual labels:  pay
alipay kit
flutter版支付宝登录/支付
Stars: ✭ 240 (+1500%)
Mutual labels:  pay
Gochat
🔥 微信 Go SDK 🚀🚀🚀
Stars: ✭ 141 (+840%)
Mutual labels:  pay
CoinHive
A nice friendly simple and easly customizable GUI for coinhives javascript miner to embed onto websites so users of your site can interact with features of the miner on every single page this javascript miner is to help those who have problems with advertisements/advertising/ads popups banners mobile redirects malvertising/malware etc and provid…
Stars: ✭ 58 (+286.67%)
Mutual labels:  pay
Dwwxpay
微信支付/订单查询
Stars: ✭ 122 (+713.33%)
Mutual labels:  pay
web-monetized-video
experimenting with web monetisation API
Stars: ✭ 15 (+0%)
Mutual labels:  pay
sep-pay
Pay.ir Payment Package for Laravel 5.3+
Stars: ✭ 17 (+13.33%)
Mutual labels:  pay
union-pay
simplest union pay(银联支付)
Stars: ✭ 32 (+113.33%)
Mutual labels:  pay
BDB-Frame-API
Frame API -开箱即用(封装函数、服务类、api ...)等等一系列功能案例,可以ctrl+c/v & 拿去使用 (免费)。如有问题,社区联系交流即可。
Stars: ✭ 163 (+986.67%)
Mutual labels:  pay

Travis (.org) npm npm GitHub issues

PRs Welcome npm

react-native-wx-ali-pay

react-native版 微信支付,支付宝 插件

Install

npm install react-native-wx-ali-pay -S

react-native link react-native-wx-ali-pay

Useage

import Pay from 'react-native-wx-ali-pay'

const wxObj = {
  appid: 'appid',
  partnerid: 'partnerid',
  noncestr: 'noncestr',
  timestamp: 'timestamp',
  prepayid: 'prepayid',
  package: 'package',
  sign: 'sign',
}

const aliObj = {
  orderString: 'orderString'
}

Pay.onWxPay(wxObj).then(e => console.info(e)).catch(err => alert(err))

Pay.onAliPay(aliObj).then(e => console.info(e)).catch(err => alert(err))

StepUp in Java && OC

Android

Step1

android/app/src/main/java/com/xx/ 下创建wxapi文件夹

Step2

新建文件 WXPayEntryActivity.java

package com.xxx.wxapi;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

import com.timson.react_native_wx_ali_pay.wxpay.WXPay;

public class WXPayEntryActivity extends Activity{
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        WXPay.handlerIntent(getIntent());
        finish();
    }

    @Override
    protected void onNewIntent(Intent intent) {
        super.onNewIntent(intent);
        setIntent(intent);
        WXPay.handlerIntent(intent);
    }
}

Step3

AndroidManifest.xml 加上

<activity
	android:name=".MainActivity"
....
</activity>
<activity
	android:name=".wxapi.WXPayEntryActivity"
	android:exported="true"
	android:launchMode="singleTop" />

iOS

Step1

在工程target的General -> Link Frameworks and Libraries -> 加入libsqlite3.tbd, libc++.tbd, libz.tbd

Step2

在工程target的General -> Link Frameworks and Libraries -> 加入AlipaySDK.framework,CoreMotion.framework(注意: 加入的AlipaySDK.framework需要是插件支付宝文件里的AlipaySDK.framework)

Step3

在工程target的Build Settings-> Frameworks Search Paths -> 加入"$(SRCROOT)/../node_modules/react-native-wx-ali-pay/ios/PaySdk/支付宝"

Step4

在工程target的Build Settings-> Header Search Paths -> 加入"$(SRCROOT)/../node_modules/react-native-wx-ali-pay/ios/PaySdk",并将状态修改为recursive

Step5

在工程target的Info-> URL Types -> 点左下角'+'新增一项并将URL Schemes"修改为WXPay

AppDegelate.m

添加文件添加内容 --- 下面的减函数

#import <WXApi.h>
#import <WXApiManager.h>
#import <AlipaySDK/AlipaySDK.h>

// 支持所有iOS系统
// 支持所有iOS系统
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{
  if ([url.host isEqualToString:@"safepay"]) {
    //支付宝回调 ...
    //添加回调方法
    [[AlipaySDK defaultService]processOrderWithPaymentResult:url standbyCallback:^(NSDictionary *resultDic) {
      [[NSNotificationCenter defaultCenter]postNotificationName:@"aliPayReslut" object:nil userInfo:resultDic];
    }];
      return YES;
  } else {
    //微信回调
    return [WXApi handleOpenURL:url delegate:[WXApiManager sharedManager]];
  }
}

Contributer

OYWeijian

lekenny

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].