charleyw / cordova-plugin-alipay

Cordova支付宝插件,cordova alipay plugin
176 stars 75 forks source link

Partner, seller ID & privateKey during Pay method #63

Open jibon57 opened 7 years ago

jibon57 commented 7 years ago

Hello,

Thanks for your plugin. At present we will need to add Partner, seller ID & privateKey inside the xml file but won't it be better if we could add this value during running pay method like this:

window.alipay.pay({
    partner: "My partner ID",
    seller: "seller email",
    privateKey: "rsa key",
    tradeNo: new Date().getTime(),
    subject: "测试标题",
    body: "我是测试内容",
    price: 0.02,
    notifyUrl: "http://your.server.notify.url"
}, function(successResults){alert(successResults)}, function(errorResults){alert(errorResults)});

I think it will be better solution too :)

Thanks Jibon