Antom, leading provider of tailored payment solutions

onShippingAddressChange()

用户在 PayPal Checkout 中更改配送地址时触发的回调函数。

参数

参数
类型
是否必需
描述
Object
否
PayPal 返回的原始数据。

data

参数
类型
是否必需
描述
orderId
string
否
当前订单。
Object
否
新选中的地址。
Object
否
PayPal 可显示在 Checkout UI 上的错误文案。

shippingAddress

参数
类型
是否必需
描述
city
string
否
城市。
state
string
否
州或省。
countryCode
string
否
ISO 3166-1 alpha-2 国家码。
postalCode
string
否
邮编。

errors

错误码
文案
ADDRESS_ERROR
"Your order can't be shipped to this address."(您的订单无法配送至该地址。)
COUNTRY_ERROR
"Your order can't be shipped to this country."(您的订单无法配送至该国家/地区。)
STATE_ERROR
"Your order can't be shipped to this state."(您的订单无法配送至该州/省。)