Comments (3)
确定参数无误
from alipay-sdk-nodejs-all.
`import AlipayFormData from 'alipay-sdk/lib/form';
const formData = new AlipayFormData();
// 调用 setMethod 并传入 get,会返回可以跳转到支付页面的 url
formData.setMethod('get');
formData.addField('notifyUrl', 'http://www.com/notify');
formData.addField('bizContent', {
outTradeNo: 'out_trade_no',
productCode: 'FAST_INSTANT_TRADE_PAY',
totalAmount: '0.01',
subject: '商品',
body: '商品详情',
});
const result = await alipaySdk.exec(
'alipay.trade.page.pay',
{},
{ formData: formData },
);
// result 为可以跳转到支付链接的 url
console.log(result);
`
from alipay-sdk-nodejs-all.
用例中有能正常调用的测试代码,可以参考
from alipay-sdk-nodejs-all.
Related Issues (20)
- require speedup HOT 1
- '写错了'
- exec方法的文档有误,需要更正 HOT 2
- 传参能不能统一风格? HOT 1
- 有没有同样问题发生过。。实例化就报错:TypeError: AlipaySdk is not a constructor HOT 6
- 在TS中,实例化报错AlipaySdk not a constructor HOT 8
- 引入SDK有报错信息 HOT 4
- Invalid signature HOT 1
- invalid-signature 错误原因: 验签出错 HOT 1
- 使用证书模式检查同步通知参数失败
- 接口:alipay.user.agreement.page.sign 返回的格式问题
- 证书模式签名报错 HOT 7
- 提供手机网站支付的完整Demo HOT 3
- aes加密请求,response验签失败--严重bug HOT 1
- decodeURIComponent 报错 HOT 2
- 确保单元测试在沙箱环境持续跑通 HOT 1
- AlipayFormData 在 setMethod('get') 之后需要自动将 field 是 object 的加上 JSON.stringify
- 应用网关返回值签名的问题
- 调用接口alipay.open.agent.facetoface.sign报错source.on is not a function HOT 4
- The automated release is failing 🚨
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alipay-sdk-nodejs-all.