Added Logo in Invoice Samples

- Improvement to Sample code demonstrating how to add logo URL to Invoice Item.
This commit is contained in:
Jay Patel
2015-02-25 11:11:10 -06:00
parent f4378f6920
commit 241d80cd17
3 changed files with 21 additions and 179 deletions

View File

@@ -14,6 +14,7 @@ use PayPal\Api\Address;
use PayPal\Api\Currency;
use PayPal\Api\PaymentTerm;
use PayPal\Api\ShippingInfo;
use PayPal\Api\InvoiceAddress;
$invoice = new Invoice();
@@ -105,7 +106,7 @@ $invoice->getShippingInfo()
->setLastName("Patient")
->setBusinessName("Not applicable")
->setPhone(new Phone())
->setAddress(new Address());
->setAddress(new InvoiceAddress());
$invoice->getShippingInfo()->getPhone()
->setCountryCode("001")
@@ -118,6 +119,10 @@ $invoice->getShippingInfo()->getAddress()
->setPostalCode("97217")
->setCountryCode("US");
// ### Logo
// You can set the logo in the invoice by providing the external URL pointing to a logo
$invoice->setLogoUrl('https://www.paypalobjects.com/webstatic/i/logo/rebrand/ppcom.svg');
// For Sample Purposes Only.
$request = clone $invoice;