I am using "paypal" payment method:
$payer = new Payer();
$payer->setPaymentMethod('paypal');
I have tried the following, but it is not setting the address:
$addr = new Address();
$addr->setLine1('34/1');
$addr->setLine2('xxx');
$addr->setCity('xxxxxxx');
$addr->setCountry_code('US');
$addr->setPostal_code('43210');
$addr->setState('OH');
ShippingAddress
extends Address object. Therefore, set all of the Address
object properties and ShippingAddress
specific properties (RecipientName
).ShippingAddress
to the ItemList using setShippingAddress
method:$shipping_address = new ShippingAddress();
$shipping_address->setCity('City');
$shipping_address->setCountryCode('AR');
$shipping_address->setPostalCode('200');
$shipping_address->setLine1('Adress Line1');
$shipping_address->setState('State');
$shipping_address->setRecipientName('Recipient Name');
$itemList->setShippingAddress($shipping_address);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With