paypal - Paypal 结帐 - 识别客户/附加订单 ID
问题描述
我目前正在按照https://developer.paypal.com/docs/checkout/integrate/#实施 paypal Checkout
我可以发送付款等没问题。但是,我如何识别付款人?
createOrder: function(data, actions) {
// This function sets up the details of the transaction, including the amount and line item details.
return actions.order.create({
purchase_units: [{
amount: {
value: '1.0'
}
}]
});
}
.create 不允许我附加订单 ID 或用户 ID。在贝宝仪表板中,我只能看到名称和金额。
解决方案
在你onApprove
的功能,里面actions.order.capture(
:
console.log(data);
信息将在那里为您服务。
您可以在此处的演示中看到用于更改的示例:https ://developer.paypal.com/demo/checkout/#/pattern/client
推荐阅读
- python - 使用 PyOpenGL 和 PyQt5 制作 Sphere 的问题
- dotnetnuke - DotNetNuke 9 中最佳实践 MVC 模块示例
- javascript - 如何撤消“this.onclick=null”?如何将javascript onclick功能恢复到div?
- java - Android Searchview在使用ListView点击项目时过滤错误
- amazon-web-services - 传输 Amazon EC2 实例时主机名和 IP 地址发生变化
- c++ - constexpr:gcc 比 clang 更努力地评估 constexpr
- ffmpeg - ffmpeg 提取帧并根据 exif 或 txt 中每个提取帧的创建时间获取时间戳
- angular - Angular Material MatPaginator 无法翻译
- python-3.x - 尝试使用 GEKKO OPTIMIZER 时“找不到与指定签名和转换匹配的循环以进行 ufunc 解决”
- python-3.x - 使用 Pandas 将名称分隔为名字和姓氏