diff --git a/sample/doc/assets/behavior.js b/sample/doc/assets/behavior.js index 7073b32..a0cde1e 100644 --- a/sample/doc/assets/behavior.js +++ b/sample/doc/assets/behavior.js @@ -388,6 +388,14 @@ f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3 "slug": "shipping-information" }, "depth": 3 + }, { + "type": "heading", + "data": { + "level": 3, + "title": "Logo", + "slug": "logo" + }, + "depth": 3 }, { "type": "heading", "data": { @@ -1069,93 +1077,7 @@ f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3 "pageTitle": "payments/CreatePaymentUsingPayPal", "title": "CreatePaymentUsingPayPal" }, - "depth": 2, - "outline": [ - { - "type": "heading", - "data": { - "level": 1, - "title": "Create Payment using PayPal as payment method", - "slug": "create-payment-using-paypal-as-payment-method" - }, - "depth": 1, - "children": [ - { - "type": "heading", - "data": { - "level": 3, - "title": "Payer", - "slug": "payer" - }, - "depth": 3 - }, { - "type": "heading", - "data": { - "level": 3, - "title": "Itemized information", - "slug": "itemized-information" - }, - "depth": 3 - }, { - "type": "heading", - "data": { - "level": 3, - "title": "Additional payment details", - "slug": "additional-payment-details" - }, - "depth": 3 - }, { - "type": "heading", - "data": { - "level": 3, - "title": "Amount", - "slug": "amount" - }, - "depth": 3 - }, { - "type": "heading", - "data": { - "level": 3, - "title": "Transaction", - "slug": "transaction" - }, - "depth": 3 - }, { - "type": "heading", - "data": { - "level": 3, - "title": "Redirect urls", - "slug": "redirect-urls" - }, - "depth": 3 - }, { - "type": "heading", - "data": { - "level": 3, - "title": "Payment", - "slug": "payment" - }, - "depth": 3 - }, { - "type": "heading", - "data": { - "level": 3, - "title": "Create Payment", - "slug": "create-payment" - }, - "depth": 3 - }, { - "type": "heading", - "data": { - "level": 3, - "title": "Get redirect url", - "slug": "get-redirect-url" - }, - "depth": 3 - } - ] - } - ] + "depth": 2 }, { "type": "file", "data": { @@ -1543,56 +1465,7 @@ f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3 "pageTitle": "payouts/CreateSinglePayout", "title": "CreateSinglePayout" }, - "depth": 2, - "outline": [ - { - "type": "heading", - "data": { - "level": 1, - "title": "Create Single Synchronous Payout Sample", - "slug": "create-single-synchronous-payout-sample" - }, - "depth": 1, - "children": [ - { - "type": "heading", - "data": { - "level": 3, - "title": "NOTE:", - "slug": "note" - }, - "depth": 3, - "children": [ - { - "type": "heading", - "data": { - "level": 4, - "title": "Batch Header Instance", - "slug": "batch-header-instance" - }, - "depth": 4 - }, { - "type": "heading", - "data": { - "level": 4, - "title": "Sender Item", - "slug": "sender-item" - }, - "depth": 4 - } - ] - }, { - "type": "heading", - "data": { - "level": 3, - "title": "Create Payout", - "slug": "create-payout" - }, - "depth": 3 - } - ] - } - ] + "depth": 2 }, { "type": "file", "data": { @@ -1674,45 +1547,7 @@ f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3 "pageTitle": "sale/RefundSale", "title": "RefundSale" }, - "depth": 2, - "outline": [ - { - "type": "heading", - "data": { - "level": 1, - "title": "Sale Refund Sample", - "slug": "sale-refund-sample" - }, - "depth": 1, - "children": [ - { - "type": "heading", - "data": { - "level": 3, - "title": "Refund amount", - "slug": "refund-amount" - }, - "depth": 3 - }, { - "type": "heading", - "data": { - "level": 3, - "title": "Refund object", - "slug": "refund-object" - }, - "depth": 3 - }, { - "type": "heading", - "data": { - "level": 3, - "title": "Sale", - "slug": "sale" - }, - "depth": 3 - } - ] - } - ] + "depth": 2 } ] }, { diff --git a/sample/doc/invoice/CreateInvoice.html b/sample/doc/invoice/CreateInvoice.html index 2791f9d..722c9f1 100644 --- a/sample/doc/invoice/CreateInvoice.html +++ b/sample/doc/invoice/CreateInvoice.html @@ -10,6 +10,7 @@ an invoice.

use PayPal\Api\Currency; use PayPal\Api\PaymentTerm; use PayPal\Api\ShippingInfo; +use PayPal\Api\InvoiceAddress; $invoice = new Invoice();

Invoice Info

Fill in all the information that is @@ -74,7 +75,7 @@ detailed breakdown of invoice

"Patient") ->setBusinessName("Not applicable") ->setPhone(new Phone()) - ->setAddress(new Address()); + ->setAddress(new InvoiceAddress()); $invoice->getShippingInfo()->getPhone() ->setCountryCode("001") @@ -85,7 +86,8 @@ detailed breakdown of invoice

"Portland") ->setState("OR") ->setPostalCode("97217") - ->setCountryCode("US");

For Sample Purposes Only.

$request = clone $invoice; + ->setCountryCode("US");
+

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; try {

Create Invoice

Create an invoice by calling the invoice->create() method diff --git a/sample/invoice/CreateInvoice.php b/sample/invoice/CreateInvoice.php index 6562d7f..f5871a1 100644 --- a/sample/invoice/CreateInvoice.php +++ b/sample/invoice/CreateInvoice.php @@ -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;