• https://www.pingxx.com/docs/downloads
  • Ping++ 是为移动端应用以及 PC 网页量身打造的下一代支付系统,通过一个 SDK 便可以同时支持移动端以及 PC 端网页的多种主流支付渠道,你只需要一次接入即可完成多个渠道的接入。 Ping++ SDK 包括 Client SDK 和 Server SDK 两部分,支持主流的七种后端开发语言,适配了 Android,iOS 和 HTML5 三种移动端平台以及 PC 端网页。
    支持以下渠道支付
    支付宝 (alipay)
    微信支付 (wx)
    银联支付(upacp)
    百付宝Wap (bfb_wap)
    QQ钱包 (qpay)
     
  • /**
    * Sample React Native App
    * https://github.com/facebook/react-native
    * @flow
    */ import React, { Component } from 'react';
    import {
    AppRegistry,
    StyleSheet,
    Text,
    View,
    TouchableOpacity
    } from 'react-native'; var NetUtil = require('./netutil.js');
    var Pingpp = require('pingpp-react-native'); export default class PingppDemoApp extends Component {
    setDebugModel(enabled) {
    Pingpp.setDebugModel(enabled);
    }; pay(channel) {
    NetUtil.postJson(
    "http://218.244.151.190/demo/charge",
    {amount: , channel: channel, order_no: new Date().getTime()},
    function(object) {
    Pingpp.createPayment(
    {
    "object":object,
    "scheme":"pingppdemoapp"
    }, function(res, error) {
    alert(res);
    console.log(error);
    alert(JSON.stringify(error));
    }
    );
    }
    );
    } render() {
    return (
    <View style={styles.container}>
    <TouchableOpacity onPress = {()=>{this.pay("alipay")}}>
    <Text style={styles.welcome}>支付宝</Text>
    </TouchableOpacity>
    <TouchableOpacity onPress={()=>{this.pay("wx")}}>
    <Text style={styles.welcome}>微信</Text>
    </TouchableOpacity>
    <TouchableOpacity onPress={()=>{this.pay("upacp")}}>
    <Text style={styles.welcome}>银联</Text>
    </TouchableOpacity>
    <TouchableOpacity onPress={()=>{this.pay("qpay")}}>
    <Text style={styles.welcome}>QQ钱包</Text>
    </TouchableOpacity>
    <TouchableOpacity onPress={()=>{this.setDebugModel(true)}}>
    <Text style={styles.welcome}>开启调试</Text>
    </TouchableOpacity>
    </View>
    );
    }
    } const styles = StyleSheet.create({
    container: {
    flex: ,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#F5FCFF',
    },
    welcome: {
    fontSize: ,
    textAlign: 'center',
    margin: ,
    },
    instructions: {
    textAlign: 'center',
    color: '#333333',
    marginBottom: ,
    },
    });

React-Native调用支付宝,微信的更多相关文章

  1. react native 调用Android原生方法

    来源:https://www.youtube.com/watch?v=WmJpHHmOKM8 教程:https://www.youtube.com/watch?v=GiUo88TGebs Breaki ...

  2. [RN] React Native代码转换成微信小程序代码的转换引擎工具

    React Native代码转换成微信小程序代码的转换引擎工具 https://github.com/areslabs/alita

  3. 【React Native 实战】微信登录

    1.前言 在今天无论是游戏开发还是app开发,微信作为第三方登录必不可少,今天我们就用react-native-wechat实现微信登录,分享和支付同样的道理就不过多的介绍了. 2.属性 1)regi ...

  4. React Native 调用 Web3(1.x) 的正确姿势

    1 创建项目 react-native init lm1 cd lm1 2 安装依赖包 yarn add node-libs-browser 3 创建 rn-cli.config.js 脚本 cons ...

  5. React Native调用系统浏览器

    import { Linking} from 'react-native'; //使用系统浏览器访问指定URLexport const contactBaidu = () => { var ba ...

  6. [书籍精读]《React Native精解与实战》精读笔记分享

    写在前面 书籍介绍:本书由架构师撰写,包含ReactNative框架底层原理,以及与iOS.Android混合开发案例,精选了大量实例代码,方便读者快速学习.主要内容分为两大部分,第1部分" ...

  7. 使用React Native来撰写跨平台的App

    React Native 是一个 JavaScript 的框架,用来撰写实时的.可原生呈现 iOS 和 Android 的应用.其是基于 React的,而 React 是 Facebook 的用于构建 ...

  8. H5、React Native、Native应用对比分析

    每日更新关注:http://weibo.com/hanjunqiang  新浪微博!iOS开发者交流QQ群: 446310206 "存在即合理".凡是存在的,都是合乎规律的.任何新 ...

  9. 《React Native 精解与实战》书籍连载「Android 平台与 React Native 混合开发」

    此文是我的出版书籍<React Native 精解与实战>连载分享,此书由机械工业出版社出版,书中详解了 React Native 框架底层原理.React Native 组件布局.组件与 ...

  10. React Native之支付集成(微信 支付宝)(ios android)

    React Native之支付集成(微信 支付宝)(ios android) 一,需求分析 1.1,app在线充值与提现 二,技术介绍与集成 2.1,微信支付 2.1.1,Android配置 详细配置 ...

随机推荐

  1. SQL 变量 条件查询 插入数据

    (本文只是总结网络上的教程) 在操作数据库时 SQL语句中难免会用到变量 比如 在條件值已知的情況下 INSERT INTO table_name (列1, 列2,...) VALUES (值1, 值 ...

  2. 64_n2

    nodejs-from-0.1.3-4.fc26.noarch.rpm 11-Feb-2017 15:01 9982 nodejs-from2-2.1.0-6.fc26.noarch.rpm 11-F ...

  3. python 之ConfigParser模块学习

    1.1 读取配置文件 -read(filename) 直接读取ini文件内容 -sections() 得到所有的section,并以列表的形式返回 -options(section) 得到该secti ...

  4. #ifndef的用法

    作用:防止头文件的重复包含和编译 定义 #ifndef x #define x ... #endif 这是宏定义的一种,它可以根据是否已经定义了一个变量来进行分支选择,一般用于调试等等.实际上确切的说 ...

  5. 解决类似 /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found 的问题

    https://itbilu.com/linux/management/NymXRUieg.html

  6. js复制文字

    一.原理分析 浏览器提供了 copy 命令 ,可以复制选中的内容 document.execCommand("copy") 如果是输入框,可以通过 select() 方法,选中输入 ...

  7. email 校验

    email 校验: javascript: /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/ java: ^([a- ...

  8. 【Java】 String和char[]类型间的相互转化

    (1)String类型转char[] 类型,使用String类型的toCharArray()方法: (2)char[] 类型转String类型,使用String.valueOf()方法: public ...

  9. 查找无序数组中第K大的数

    思路: 利用快速排序的划分思想 可以找出前k大数,然后不断划分 直到找到第K大元素 代码: #include <iostream> #include <algorithm> # ...

  10. ref:PHP代码注入审计

    ref:https://www.waitalone.cn/php-code-injection.html 通俗易懂,全面清晰. 0x1 前言 为了方便自己以后的翻阅和查找,最近正在整理一些所学的内容. ...