React-Native调用支付宝,微信
来源:互联网 发布:客户跟踪记录软件 编辑:程序博客网 时间:2024/06/05 05:28
- 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: 1, 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: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#F5FCFF', }, welcome: { fontSize: 20, textAlign: 'center', margin: 10, }, instructions: { textAlign: 'center', color: '#333333', marginBottom: 5, },});AppRegistry.registerComponent('PingppDemoApp', () => PingppDemoApp);
阅读全文
0 0
- React-Native调用支付宝,微信
- react-native 集成微信支付
- React-Native之微信好友、朋友圈分享、支付
- React-Native之微信好友、朋友圈分享、支付
- React-Native之微信好友、朋友圈分享、支付
- React-Native之微信好友、朋友圈分享、支付
- 【转】react-native-微信支付问题总结
- react-native 集成支付宝
- React-Native的微信SDK辅助包,支持微信登录、微信分享、微信支付
- Android如何调用支付宝支付 微信支付
- 微信支付开发(11) Native支付
- 微信支付开发(11) Native支付
- React Native绑定微信分享/登录/支付(演示+实现步骤+注意事项)
- (Android)react-native-wechat组件的使用总结(重点微信支付)
- React-Native之android集成支付宝
- 【转】react-native集成支付宝
- React Native支付分享
- React-Native之iOS集成支付宝支付
- 浅谈你对面向对象编程的认识
- 时间选择器
- Xcode9 新功能
- Android相机实时自动对焦的完美实现
- css样式之页面上拉指定div置顶
- React-Native调用支付宝,微信
- 在mac上安装Xgboost Python库
- Html5调用手机相机并压缩、上传
- 只有挣扎的现在,才是最好的状态(转)(文/王文华)
- 基于tensorflow的视觉问答系统构建
- 如何解决Oracle ASM故障导致的数据丢失问题
- java ajax等传值中文乱码
- Sum All Primes
- 使用vue+elementUI编写运营活动生成工具