Angular 如何更改Paypal';动态签出发货地址?
我正在尝试在我的平台上实现paypal结账。我已经看到了API的文档,我尝试了他们说的各种方法来实现它,但由于某种原因我无法实现。现在我的密码被剪掉了Angular 如何更改Paypal';动态签出发货地址?,angular,paypal,paypal-sandbox,Angular,Paypal,Paypal Sandbox,我正在尝试在我的平台上实现paypal结账。我已经看到了API的文档,我尝试了他们说的各种方法来实现它,但由于某种原因我无法实现。现在我的密码被剪掉了 payment: (data, actions) => { return actions.payment.create({ address_details:{ street_number: "123", street_name: "Test address" }, addre
payment: (data, actions) => {
return actions.payment.create({
address_details:{
street_number: "123",
street_name: "Test address"
},
address_portable:{
postal_code:"4590-555",
country_code:"PT"
},
payment: {
transactions: [
{
amount: {
total: this.TotalPrice,
currency: 'EUR'
}
},
],
note_to_payer: "Contact us for any questions on your order.",
}
});
}
如果你知道我想改变什么,请看下一张图片。
提前谢谢你 我知道刚才有人问过这个问题。我也遇到过类似的问题,花了很多时间试图弄清楚API是如何工作的。贝宝文档[这里][1]不是很清楚。对我有效的解决方案是扭曲嵌套在
付款人
对象中的地址
对象内的详细信息:
payment: (data, actions) => {
return actions.payment.create({
payer : {
address :{
address_details:{
street_number: "123",
street_name: "Test address"
},
address_portable:{
postal_code:"4590-555",
country_code:"PT"
}
}
},
payment: {
transactions: [
{
amount: {
total: this.TotalPrice,
currency: 'EUR'
}
},
],
note_to_payer: "Contact us for any questions on your order.",
}
});
}
[1]: https://developer.paypal.com/docs/api/orders/v2/#definition-payer