diff --git a/sample/doc/assets/behavior.js b/sample/doc/assets/behavior.js index 6716c04..694c5af 100644 --- a/sample/doc/assets/behavior.js +++ b/sample/doc/assets/behavior.js @@ -30,29 +30,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": "billing/CreateBillingAgreementWithCreditCard", "title": "CreateBillingAgreementWithCreditCard" }, - "depth": 2, - "outline": [ - { - "type": "heading", - "data": { - "level": 1, - "title": "Create Billing Agreement with Credit Card as Payment Source", - "slug": "create-billing-agreement-with-credit-card-as-payment-source" - }, - "depth": 1, - "children": [ - { - "type": "heading", - "data": { - "level": 3, - "title": "Create Agreement", - "slug": "create-agreement" - }, - "depth": 3 - } - ] - } - ] + "depth": 2 }, { "type": "file", "data": { @@ -505,6 +483,54 @@ 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 "title": "GetNextInvoiceNumber" }, "depth": 2 + }, { + "type": "file", + "data": { + "language": { + "nameMatchers": [{}, ".fbp"], + "pygmentsLexer": "php", + "singleLineComment": ["//"], + "ignorePrefix": "}", + "foldPrefix": "^", + "name": "PHP" + }, + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/invoice/GetThirdPartyInvoice.php", + "projectPath": "invoice/GetThirdPartyInvoice.php", + "targetPath": "invoice/GetThirdPartyInvoice", + "pageTitle": "invoice/GetThirdPartyInvoice", + "title": "GetThirdPartyInvoice" + }, + "depth": 2, + "outline": [ + { + "type": "heading", + "data": { + "level": 1, + "title": "Get Third Invoice Sample", + "slug": "get-third-invoice-sample" + }, + "depth": 1, + "children": [ + { + "type": "heading", + "data": { + "level": 3, + "title": "Step 2", + "slug": "step-2" + }, + "depth": 3 + }, { + "type": "heading", + "data": { + "level": 3, + "title": "Retrieve Invoice", + "slug": "retrieve-invoice" + }, + "depth": 3 + } + ] + } + ] }, { "type": "file", "data": { @@ -1138,93 +1164,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/CreatePayment", "title": "CreatePayment" }, - "depth": 2, - "outline": [ - { - "type": "heading", - "data": { - "level": 1, - "title": "CreatePaymentSample", - "slug": "createpaymentsample" - }, - "depth": 1, - "children": [ - { - "type": "heading", - "data": { - "level": 3, - "title": "PaymentCard", - "slug": "paymentcard" - }, - "depth": 3 - }, { - "type": "heading", - "data": { - "level": 3, - "title": "FundingInstrument", - "slug": "fundinginstrument" - }, - "depth": 3 - }, { - "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": "Payment", - "slug": "payment" - }, - "depth": 3 - }, { - "type": "heading", - "data": { - "level": 3, - "title": "Create Payment", - "slug": "create-payment" - }, - "depth": 3 - } - ] - } - ] + "depth": 2 }, { "type": "file", "data": { @@ -1278,101 +1218,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/CreateThirdPartyPayment", "title": "CreateThirdPartyPayment" }, - "depth": 2, - "outline": [ - { - "type": "heading", - "data": { - "level": 1, - "title": "Create Third Party Payment using PayPal as payment method", - "slug": "create-third-party-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": "Payee", - "slug": "payee" - }, - "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": { @@ -1444,29 +1290,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/GetPayment", "title": "GetPayment" }, - "depth": 2, - "outline": [ - { - "type": "heading", - "data": { - "level": 1, - "title": "GetPaymentSample", - "slug": "getpaymentsample" - }, - "depth": 1, - "children": [ - { - "type": "heading", - "data": { - "level": 3, - "title": "Retrieve payment", - "slug": "retrieve-payment" - }, - "depth": 3 - } - ] - } - ] + "depth": 2 }, { "type": "file", "data": { @@ -1664,29 +1488,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/RefundCapture", "title": "RefundCapture" }, - "depth": 2, - "outline": [ - { - "type": "heading", - "data": { - "level": 1, - "title": "Refund Capture Sample", - "slug": "refund-capture-sample" - }, - "depth": 1, - "children": [ - { - "type": "heading", - "data": { - "level": 3, - "title": "Refund", - "slug": "refund" - }, - "depth": 3 - } - ] - } - ] + "depth": 2 }, { "type": "file", "data": { @@ -1850,37 +1652,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/GetSale", "title": "GetSale" }, - "depth": 2, - "outline": [ - { - "type": "heading", - "data": { - "level": 1, - "title": "Get Sale sample", - "slug": "get-sale-sample" - }, - "depth": 1, - "children": [ - { - "type": "heading", - "data": { - "level": 3, - "title": "Get Sale From Created Payment", - "slug": "get-sale-from-created-payment" - }, - "depth": 3 - }, { - "type": "heading", - "data": { - "level": 3, - "title": "Retrieve the sale object", - "slug": "retrieve-the-sale-object" - }, - "depth": 3 - } - ] - } - ] + "depth": 2 }, { "type": "file", "data": { @@ -1898,45 +1670,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/CreateThirdPartyInvoice.html b/sample/doc/invoice/CreateThirdPartyInvoice.html index ae2b318..fe4fb5c 100644 --- a/sample/doc/invoice/CreateThirdPartyInvoice.html +++ b/sample/doc/invoice/CreateThirdPartyInvoice.html @@ -1,7 +1,7 @@
merchantInfo.email as the email address of
use PayPal\Api\InvoiceItem;
use PayPal\Api\MerchantInfo;
use PayPal\Api\PaymentTerm;
-use PayPal\Api\ShippingInfo;
-
-$invoice = new Invoice();Step 1. This would be refresh token retrieved from http://paypal.github.io/PayPal-PHP-SDK/sample/doc/lipp/ObtainUserConsent.html
Step 2. Get the email address of third party merchant who you want to create this invoice for. +This can be retrieved using the refresh token obtained from previous call. Please refer to http://paypal.github.io/PayPal-PHP-SDK/sample/doc/lipp/GetUserInfo.html for more info.
Step 3. Create an invoice object.
+Make sure to set $invoice->getMerchantInfo()->setEmail() with the third party merchant email you retrieved from Step 2.
Fill in all the information that is required for invoice APIs
A resource representing merchant information that can be -used to identify merchant
This would be the email address of third party merchant.
This would be the email address of third party merchant.
For Sample Purposes Only.
This would be refresh token retrieved from http://paypal.github.io/PayPal-PHP-SDK/sample/doc/lipp/ObtainUserConsent.html
For Sample Purposes Only.
MerchantInfo.Email based onCreate an invoice by calling the invoice->create() method
with a valid ApiContext (See bootstrap.php for more on ApiContext)
NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
Create Third Party Invoice Sample
This sample code demonstrate how you can create third party invoice on someone else's behalf. This requires using
Obtain User's Consentto fetch the refresh token of the third party merchant. Please look at http://paypal.github.io/PayPal-PHP-SDK/sample/doc/lipp/ObtainUserConsent.html for more info. -You need the email address of the third party. This can be retrieved using the refresh token obtained from previous call. Please refere to http://paypal.github.io/PayPal-PHP-SDK/sample/doc/lipp/GetUserInfo.html for more info. +You need the email address of the third party. This can be retrieved using the refresh token obtained from previous call. Please refer to http://paypal.github.io/PayPal-PHP-SDK/sample/doc/lipp/GetUserInfo.html for more info. Please make sure to usemerchantInfo.emailas the email address of the third party.