【发布时间】:2022-01-01 20:08:05
【问题描述】:
我正在使用 ngx-paypal for Angular 制作一个 Paypal 结帐按钮,当我到达购物车并继续结帐时会显示该按钮,但我不知道如何将送货地址“提供”给按钮默认的,所以当有人点击 Checkout Paypal 按钮时,他们会得到我选择在我的打字稿中传递的地址。 我想要和 shippingAddressOverride 一样的东西。 这是显示我如何配置 Paypal 按钮的代码:
this.payPalConfig = {
currency: 'EUR',
clientId: this.parameters.clientidpaypal,
createOrderOnClient: (data) => <ICreateOrderRequest>{
intent: 'CAPTURE',
purchase_units: [{
amount: {
currency_code: 'EUR',
value: this.item.total.toString().replace(",", "."),
breakdown: {
item_total: {
currency_code: 'EUR',
value: this.item.total.toString().replace(",", ".")
}
}
}
}],
}
};
【问题讨论】:
标签: angular typescript paypal ngx-paypal