mirror of
https://github.com/zhigang1992/react-native-wechat.git
synced 2026-01-12 22:51:12 +08:00
js,android: convert timeStamp to string (#279)
This commit is contained in:
6
index.js
6
index.js
@@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
import { DeviceEventEmitter, NativeModules } from 'react-native';
|
||||
import { DeviceEventEmitter, NativeModules, Platform } from 'react-native';
|
||||
import { EventEmitter } from 'events';
|
||||
|
||||
let isAppRegistered = false;
|
||||
@@ -267,6 +267,10 @@ export function pay(data) {
|
||||
correct('noncestr', 'nonceStr');
|
||||
correct('partnerid', 'partnerId');
|
||||
correct('timestamp', 'timeStamp');
|
||||
|
||||
// FIXME(94cstyles)
|
||||
// Android requires the type of the timeStamp field to be a string
|
||||
if (Platform.OS === 'android') data.timeStamp = String(data.timeStamp)
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
WeChat.pay(data, result => {
|
||||
|
||||
Reference in New Issue
Block a user