Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/28.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 如何更改Paypal';动态签出发货地址?_Angular_Paypal_Paypal Sandbox - Fatal编程技术网

Angular 如何更改Paypal';动态签出发货地址?

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

我正在尝试在我的平台上实现paypal结账。我已经看到了API的文档,我尝试了他们说的各种方法来实现它,但由于某种原因我无法实现。现在我的密码被剪掉了

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