Package Exports
- maxpay-react-native
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (maxpay-react-native) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
MaxPay RN 
支付组件,支持微信,支付宝和银联支付。
集成 SDK
集成 iOS 环境
重要:先安装
maxleap-react-native
, 参照 MaxLeap RN 开发文档安装
maxpay-react-native
npm install --save maxpay-react-native
打开 Finder,找到本项目的根目录,使用 Xcode 打开 iOS 工程(双击 .xcodeproj 文件即可),然后导航到
/node_modules/maxpay-react-native/ios/lib
目录,把该目录下的 frameworks 都拖到 Xcode 工程中此外,使用个平台进行支付还需要配置 Xcode 项目,请参阅支付文档的
手动安装
第4步以后的部分
集成 Android 环境
按照 MaxLeap 文档 添加项目依赖。
修改父工程目录下的
build.gradle
文件(与settings.gradle
位于同级目录)。repositories { flatDir{ dirs '../../node_modules/maxpay-react-native/dist/android' } }
修改应用目录下的
build.gradle
文件,添加以下依赖dependencies { compile(name:'maxpay-react-native', ext:'aar') }
修改工程的主 Activity 文件。
@Override protected void onCreate(Bundle savedInstanceState) { MaxLeap.initialize(this, APP_ID, API_KEY, MaxLeap.REGION_CN); super.onCreate(savedInstanceState); } @Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new MLPayReactPackage() ); }