我在我的网络应用程序中使用 Express Checkout PHP-SDK(版本 96)。
我正在尝试在 Paypal 上预先填写客户的帐单详细信息。
$address = new AddressType();
$address->CityName = strtoupper_tr( $order['invoice']['address']['city'] );
$address->Name = $order['invoice']['title'];
$address->Street1 = $order['invoice']['address']['address'];
$address->Street2 = $order['invoice']['address']['address-2'];
$address->StateOrProvince = $order['invoice']['address']['province'];
$address->PostalCode = $order['invoice']['address']['postal-code'];
$address->Country = 'TR';
$address->Phone = '5004244244';
...
$set_ec_req_details = new SetExpressCheckoutRequestDetailsType();
$set_ec_req_details->BillingAddress = $address;
此代码填充除电话号码外的表单。我发现如果我将国家代码更改为“美国”,它也可以。
我在 x.com 的论坛或文档中找不到任何信息。如果有人告诉我有没有办法做到这一点,我将不胜感激。