//manifest.json里配置插件:
"mp-alipay" : {
"appid" : "",
"component2" : true,
"enableParallelLoader" : true,
"enableDistFileMinify" : true,
"usingComponents" : true,
"plugins": {
"alipayPayAfterUsePlugin": {
"version": "*",
"provider": "2021002151672975"
}
}
}
//调用:
const alipayPayAfterUsePlugin = requirePlugin("alipayPayAfterUsePlugin");
alipayPayAfterUsePlugin.startService({
type: 'pay_after',
sign_str: res.Sign,
zm_service_id: '',
success: () => {
console.log(‘回调成功’)
},
fail: (err) => {
console.log(‘无法回调’)
console.log(err)
},
complete: () => {
console.log(‘无法回调’)
},
});