diff --git a/CHANGELOG.md b/CHANGELOG.md index 4bbc02d7..aba450f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 2.8.1 (2019-9-29) +- [F] 兼容处理百度 iOS 支付成功返回 string 类型(bug) + ## 2.8.0 (2019-9-27) - [F] web SDK 第三方授权接口 createUser 参数默认为 true - [A] 百度小程序 SDK 支持百度支付 diff --git a/package.json b/package.json index acc36851..65bc07be 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "minapp-sdk", - "version": "2.8.0", + "version": "2.8.1", "main": "./lib/index.js", "browser": "./lib/web.js", "miniprogram": "lib", @@ -35,8 +35,8 @@ }, "homepage": "https://github.com/ifanrx/repository#readme", "versions": { - "alipay": "2.8.0", - "web": "2.8.0" + "alipay": "2.8.1", + "web": "2.8.1" }, "devDependencies": { "@babel/core": "^7.2.2", diff --git a/sdk-file/src/baidu/pay.js b/sdk-file/src/baidu/pay.js index df378c2d..c0e97057 100644 --- a/sdk-file/src/baidu/pay.js +++ b/sdk-file/src/baidu/pay.js @@ -29,6 +29,12 @@ const createPayFn = BaaS => (params, bannedChannels) => { orderInfo: data, bannedChannels: bannedChannels || [], success: function (res) { + // 百度 iOS 客户端 bug: res 为 string 类型,导致支付成功后,用户无法获取到 transaction_no + if (typeof res === 'string') { + res = { + responseData: res, + } + } res.transaction_no = data.tpOrderId return resolve(res) },