From 241d80cd17fcb35ee8a860a3c5f48b66e15ddc4f Mon Sep 17 00:00:00 2001
From: Jay Patel
Date: Wed, 25 Feb 2015 11:11:10 -0600
Subject: [PATCH] Added Logo in Invoice Samples
- Improvement to Sample code demonstrating how to add logo URL to Invoice Item.
---
sample/doc/assets/behavior.js | 187 ++------------------------
sample/doc/invoice/CreateInvoice.html | 6 +-
sample/invoice/CreateInvoice.php | 7 +-
3 files changed, 21 insertions(+), 179 deletions(-)
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();
"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");
$request = clone $invoice;
+ ->setCountryCode("US");
$invoice->setLogoUrl('https://www.paypalobjects.com/webstatic/i/logo/rebrand/ppcom.svg');
$request = clone $invoice;
try {
Invoice Info
Fill in all the information that is @@ -74,7 +75,7 @@ detailed breakdown of invoice