我想在我的网站上为我的客户设置送货地址...但是我在docs和SO中找到的代码对我来说不起作用。有人可以帮助我这是什么问题吗?
我的代码:
use PayPal\Rest\ApiContext;
use PayPal\Auth\OAuthTokenCredential;
use PayPal\Api\Amount;
use PayPal\Api\Details;
use PayPal\Api\Item;
use PayPal\Api\ItemList;
use PayPal\Api\Payer;
use PayPal\Api\Payment;
use PayPal\Api\RedirectUrls;
use PayPal\Api\ExecutePayment;
use PayPal\Api\PaymentExecution;
use PayPal\Api\Transaction;
use PayPal\Api\ShippingAddress;
$Itemssss = new ItemList();
$shipping_address = new ShippingAddress();
$shipping_address->setCity('bahawalpur');
$shipping_address->setCountryCode('PK');
$shipping_address->setPostalCode('63100');
$shipping_address->setLine1('Abdullah house street no 3');
$shipping_address->setState('punjab');
$shipping_address->setRecipientName('saqlain');
$Itemssss->setShippingAddress($shipping_address);
这是我被重定向到贝宝时显示的地址