开发者社区> 问答> 正文

小程序签约【周期扣款】提示【无效签名】

小程序在开发调试【周期扣款】的时候,提示【无效签名】,小程序的其他接口如支付,预授权等接口都没出现这个问题,小程序接口:

    signStr: data.data.signStr,
    success: function (res) {
        console.log(res);
    },
    fail: function (res) {
        app.fail("购买失败");
    }
});```
signStr值`charset=UTF-8&biz_content=%7B%22period_rule_params%22%3A%7B%22period%22%3A%2230%22%2C%22execute_time%22%3A%222021-06-02%22%2C%22single_amount%22%3A%229.90%22%2C%22period_type%22%3A%22DAY%22%7D%2C%22access_params%22%3A%7B%22channel%22%3A%22ALIPAYAPP%22%7D%2C%22personal_product_code%22%3A%22CYCLE_PAY_AUTH_P%22%2C%22external_agreement_no%22%3A%22SG21559998274785071104%22%2C%22product_code%22%3A%22CYCLE_PAY_AUTH%22%2C%22sign_scene%22%3A%22INDUSTRY%7CLEASE%22%7D&method=alipay.user.agreement.page.sign&format=JSON&sign=aUTglOtYxeWGH%2BDhlHfe0RrSKvTZ1wqKIVq3WZ0YvPUVWXymh0DgacHY77%2BZEKvEK8yO2MdYCQrcx67hd5mnPnQEG58BkgEFOudi8A4f9QlCF0voWgvcDdGldtEbRg00iALHlTh1MGRUwEelyUB3p5g9sh44m4FXz5j2tAcFwzJdjPSd6ZY1sMWZG%2By8S95QKVUy%2Beg42ZZFH1crrUtydX%2BQfkMLnodcfXPUMVEo6X0Q6aWG4tW%2Fbmsmusho9iIJxVUuB6Xbp1pTs2q4F6iwGTpMTyIhh0si9SagD92Q2i6w77M7bKlNZPEiqs%2FBZvD7CRLFCFRqLP2%2BCRYhMrAnZw%3D%3D&notify_url=http%3A%2F%2Fapi.open.*.com%2Fnotify%2Falipay%2Fdetain&app_id=2018092761510694&sign_type=RSA2&version=1.0&timestamp=2021-06-02+17%3A20%3A03`

signStr进行URLDecode后的数据:`charset=UTF-8&biz_content={"period_rule_params":{"period":"30","execute_time":"2021-06-02","single_amount":"9.90","period_type":"DAY"},"access_params":{"channel":"ALIPAYAPP"},"personal_product_code":"CYCLE_PAY_AUTH_P","external_agreement_no":"SG21559998274785071104","product_code":"CYCLE_PAY_AUTH","sign_scene":"INDUSTRY|LEASE"}&method=alipay.user.agreement.page.sign&format=JSON&sign=aUTglOtYxeWGH+DhlHfe0RrSKvTZ1wqKIVq3WZ0YvPUVWXymh0DgacHY77+ZEKvEK8yO2MdYCQrcx67hd5mnPnQEG58BkgEFOudi8A4f9QlCF0voWgvcDdGldtEbRg00iALHlTh1MGRUwEelyUB3p5g9sh44m4FXz5j2tAcFwzJdjPSd6ZY1sMWZG+y8S95QKVUy+eg42ZZFH1crrUtydX+QfkMLnodcfXPUMVEo6X0Q6aWG4tW/bmsmusho9iIJxVUuB6Xbp1pTs2q4F6iwGTpMTyIhh0si9SagD92Q2i6w77M7bKlNZPEiqs/BZvD7CRLFCFRqLP2+CRYhMrAnZw==&notify_url=http://api.open.*.com/notify/alipay/detain&app_id=2018092761510694&sign_type=RSA2&version=1.0&timestamp=2021-06-02 17:20:03`



![image.png](https://ucc.alicdn.com/pic/developer-ecology/bd1df4a7f05b477ba3a549056383e757.png)

展开
收起
party_art 2021-06-02 18:12:03 667 0
0 条回答
写回答
取消 提交回答
问答分类:
问答标签:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
《云市场-小程序》 立即下载
数字乡村建设方案 立即下载
mPaaS 小程序新品发布 立即下载