Trying to send a separate billing and shipping address when creating a payment using the REST api for paypal.
I can successfully create a shipping address:
$shipping_address = new ShippingAddress();
$shipping_address->setCity('XXXXXX');
$shipping_address->setCountryCode('XX');
$shipping_address->setPostalCode('111111');
$shipping_address->setLine1('9811 XXXXXX Lane');
$shipping_address->setLine2('Suite 100');
$shipping_address->setState('XXXXXX');
$shipping_address->setRecipientName('Mark XXXXXX');
$itemList = new ItemList();
$itemList->setShippingAddress($shipping_address);
When I do this it ALSO replicated this address to billing. But I cannot figure out how to send a SEPARATE address to pre-populate the billing information?
Any help would be appreciated.
Thanks in advance!
Looks like the BillingInfo class might provide what you need.
After creating the BillingInfo object, add it to the Invoice object.