From b67913d0e5a56366447d7a2b6860e681b940b2b8 Mon Sep 17 00:00:00 2001 From: jaypatel512 and sdcoffey Date: Mon, 31 Oct 2016 16:13:01 -0500 Subject: [PATCH] Update third party sample --- sample/doc/assets/behavior.js | 368 +++++++----------- .../doc/payments/CreateThirdPartyPayment.html | 74 ++-- sample/payments/CreateThirdPartyPayment.php | 82 ++-- 3 files changed, 215 insertions(+), 309 deletions(-) diff --git a/sample/doc/assets/behavior.js b/sample/doc/assets/behavior.js index 6b2f840..b0a183f 100644 --- a/sample/doc/assets/behavior.js +++ b/sample/doc/assets/behavior.js @@ -6,25 +6,6 @@ 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 tableOfContents = [ { - "type": "file", - "data": { - "language": { - "nameMatchers": [{}, ".fbp"], - "pygmentsLexer": "php", - "singleLineComment": ["//"], - "ignorePrefix": "}", - "foldPrefix": "^", - "name": "PHP" - }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/index.php", - "projectPath": "index.php", - "targetPath": "index", - "pageTitle": "index", - "title": "index" - }, - "depth": 1, - "outline": [] - }, { "type": "folder", "data": { "path": "billing", @@ -43,7 +24,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/billing/CreateBillingAgreementWithCreditCard.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/billing/CreateBillingAgreementWithCreditCard.php", "projectPath": "billing/CreateBillingAgreementWithCreditCard.php", "targetPath": "billing/CreateBillingAgreementWithCreditCard", "pageTitle": "billing/CreateBillingAgreementWithCreditCard", @@ -83,7 +64,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/billing/CreateBillingAgreementWithPayPal.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/billing/CreateBillingAgreementWithPayPal.php", "projectPath": "billing/CreateBillingAgreementWithPayPal.php", "targetPath": "billing/CreateBillingAgreementWithPayPal", "pageTitle": "billing/CreateBillingAgreementWithPayPal", @@ -101,7 +82,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/billing/CreatePlan.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/billing/CreatePlan.php", "projectPath": "billing/CreatePlan.php", "targetPath": "billing/CreatePlan", "pageTitle": "billing/CreatePlan", @@ -119,7 +100,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/billing/DeletePlan.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/billing/DeletePlan.php", "projectPath": "billing/DeletePlan.php", "targetPath": "billing/DeletePlan", "pageTitle": "billing/DeletePlan", @@ -137,7 +118,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/billing/ExecuteAgreement.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/billing/ExecuteAgreement.php", "projectPath": "billing/ExecuteAgreement.php", "targetPath": "billing/ExecuteAgreement", "pageTitle": "billing/ExecuteAgreement", @@ -155,7 +136,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/billing/GetBillingAgreement.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/billing/GetBillingAgreement.php", "projectPath": "billing/GetBillingAgreement.php", "targetPath": "billing/GetBillingAgreement", "pageTitle": "billing/GetBillingAgreement", @@ -173,7 +154,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/billing/GetPlan.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/billing/GetPlan.php", "projectPath": "billing/GetPlan.php", "targetPath": "billing/GetPlan", "pageTitle": "billing/GetPlan", @@ -191,7 +172,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/billing/ListPlans.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/billing/ListPlans.php", "projectPath": "billing/ListPlans.php", "targetPath": "billing/ListPlans", "pageTitle": "billing/ListPlans", @@ -209,7 +190,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/billing/ReactivateBillingAgreement.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/billing/ReactivateBillingAgreement.php", "projectPath": "billing/ReactivateBillingAgreement.php", "targetPath": "billing/ReactivateBillingAgreement", "pageTitle": "billing/ReactivateBillingAgreement", @@ -227,7 +208,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/billing/SearchBillingTransactions.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/billing/SearchBillingTransactions.php", "projectPath": "billing/SearchBillingTransactions.php", "targetPath": "billing/SearchBillingTransactions", "pageTitle": "billing/SearchBillingTransactions", @@ -245,7 +226,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/billing/SuspendBillingAgreement.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/billing/SuspendBillingAgreement.php", "projectPath": "billing/SuspendBillingAgreement.php", "targetPath": "billing/SuspendBillingAgreement", "pageTitle": "billing/SuspendBillingAgreement", @@ -263,7 +244,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/billing/UpdateBillingAgreement.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/billing/UpdateBillingAgreement.php", "projectPath": "billing/UpdateBillingAgreement.php", "targetPath": "billing/UpdateBillingAgreement", "pageTitle": "billing/UpdateBillingAgreement", @@ -281,7 +262,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/billing/UpdatePlan.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/billing/UpdatePlan.php", "projectPath": "billing/UpdatePlan.php", "targetPath": "billing/UpdatePlan", "pageTitle": "billing/UpdatePlan", @@ -299,7 +280,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/billing/UpdatePlanPaymentDefinitions.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/billing/UpdatePlanPaymentDefinitions.php", "projectPath": "billing/UpdatePlanPaymentDefinitions.php", "targetPath": "billing/UpdatePlanPaymentDefinitions", "pageTitle": "billing/UpdatePlanPaymentDefinitions", @@ -308,62 +289,6 @@ 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 "depth": 2 } ] - }, { - "type": "file", - "data": { - "language": { - "nameMatchers": [{}, ".fbp"], - "pygmentsLexer": "php", - "singleLineComment": ["//"], - "ignorePrefix": "}", - "foldPrefix": "^", - "name": "PHP" - }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/bootstrap.php", - "projectPath": "bootstrap.php", - "targetPath": "bootstrap", - "pageTitle": "bootstrap", - "title": "bootstrap" - }, - "depth": 1, - "outline": [ - { - "type": "heading", - "data": { - "level": 4, - "title": "SDK configuration", - "slug": "sdk-configuration" - }, - "depth": 4 - }, { - "type": "heading", - "data": { - "level": 3, - "title": "Api context", - "slug": "api-context" - }, - "depth": 3 - } - ] - }, { - "type": "file", - "data": { - "language": { - "nameMatchers": [{}, ".fbp"], - "pygmentsLexer": "php", - "singleLineComment": ["//"], - "ignorePrefix": "}", - "foldPrefix": "^", - "name": "PHP" - }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/common.php", - "projectPath": "common.php", - "targetPath": "common", - "pageTitle": "common", - "title": "common" - }, - "depth": 1, - "outline": [] }, { "type": "folder", "data": { @@ -383,7 +308,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/invoice-templates/CreateInvoiceTemplate.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/invoice-templates/CreateInvoiceTemplate.php", "projectPath": "invoice-templates/CreateInvoiceTemplate.php", "targetPath": "invoice-templates/CreateInvoiceTemplate", "pageTitle": "invoice-templates/CreateInvoiceTemplate", @@ -401,7 +326,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/invoice-templates/DeleteInvoiceTemplate.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/invoice-templates/DeleteInvoiceTemplate.php", "projectPath": "invoice-templates/DeleteInvoiceTemplate.php", "targetPath": "invoice-templates/DeleteInvoiceTemplate", "pageTitle": "invoice-templates/DeleteInvoiceTemplate", @@ -419,7 +344,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/invoice-templates/GetAllInvoiceTemplates.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/invoice-templates/GetAllInvoiceTemplates.php", "projectPath": "invoice-templates/GetAllInvoiceTemplates.php", "targetPath": "invoice-templates/GetAllInvoiceTemplates", "pageTitle": "invoice-templates/GetAllInvoiceTemplates", @@ -437,7 +362,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/invoice-templates/GetInvoiceTemplate.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/invoice-templates/GetInvoiceTemplate.php", "projectPath": "invoice-templates/GetInvoiceTemplate.php", "targetPath": "invoice-templates/GetInvoiceTemplate", "pageTitle": "invoice-templates/GetInvoiceTemplate", @@ -455,7 +380,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/invoice-templates/UpdateInvoiceTemplate.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/invoice-templates/UpdateInvoiceTemplate.php", "projectPath": "invoice-templates/UpdateInvoiceTemplate.php", "targetPath": "invoice-templates/UpdateInvoiceTemplate", "pageTitle": "invoice-templates/UpdateInvoiceTemplate", @@ -483,7 +408,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/invoice/CancelInvoice.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/invoice/CancelInvoice.php", "projectPath": "invoice/CancelInvoice.php", "targetPath": "invoice/CancelInvoice", "pageTitle": "invoice/CancelInvoice", @@ -501,7 +426,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/invoice/CreateInvoice.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/invoice/CreateInvoice.php", "projectPath": "invoice/CreateInvoice.php", "targetPath": "invoice/CreateInvoice", "pageTitle": "invoice/CreateInvoice", @@ -519,7 +444,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/invoice/CreateThirdPartyInvoice.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/invoice/CreateThirdPartyInvoice.php", "projectPath": "invoice/CreateThirdPartyInvoice.php", "targetPath": "invoice/CreateThirdPartyInvoice", "pageTitle": "invoice/CreateThirdPartyInvoice", @@ -537,7 +462,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/invoice/DeleteInvoice.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/invoice/DeleteInvoice.php", "projectPath": "invoice/DeleteInvoice.php", "targetPath": "invoice/DeleteInvoice", "pageTitle": "invoice/DeleteInvoice", @@ -555,7 +480,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/invoice/GetInvoice.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/invoice/GetInvoice.php", "projectPath": "invoice/GetInvoice.php", "targetPath": "invoice/GetInvoice", "pageTitle": "invoice/GetInvoice", @@ -573,7 +498,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/invoice/GetNextInvoiceNumber.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/invoice/GetNextInvoiceNumber.php", "projectPath": "invoice/GetNextInvoiceNumber.php", "targetPath": "invoice/GetNextInvoiceNumber", "pageTitle": "invoice/GetNextInvoiceNumber", @@ -591,7 +516,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/invoice/ListInvoice.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/invoice/ListInvoice.php", "projectPath": "invoice/ListInvoice.php", "targetPath": "invoice/ListInvoice", "pageTitle": "invoice/ListInvoice", @@ -609,7 +534,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/invoice/RecordPayment.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/invoice/RecordPayment.php", "projectPath": "invoice/RecordPayment.php", "targetPath": "invoice/RecordPayment", "pageTitle": "invoice/RecordPayment", @@ -627,7 +552,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/invoice/RecordRefund.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/invoice/RecordRefund.php", "projectPath": "invoice/RecordRefund.php", "targetPath": "invoice/RecordRefund", "pageTitle": "invoice/RecordRefund", @@ -645,7 +570,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/invoice/RemindInvoice.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/invoice/RemindInvoice.php", "projectPath": "invoice/RemindInvoice.php", "targetPath": "invoice/RemindInvoice", "pageTitle": "invoice/RemindInvoice", @@ -663,7 +588,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/invoice/RetrieveQRCode.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/invoice/RetrieveQRCode.php", "projectPath": "invoice/RetrieveQRCode.php", "targetPath": "invoice/RetrieveQRCode", "pageTitle": "invoice/RetrieveQRCode", @@ -681,7 +606,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/invoice/SearchInvoices.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/invoice/SearchInvoices.php", "projectPath": "invoice/SearchInvoices.php", "targetPath": "invoice/SearchInvoices", "pageTitle": "invoice/SearchInvoices", @@ -699,7 +624,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/invoice/SendInvoice.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/invoice/SendInvoice.php", "projectPath": "invoice/SendInvoice.php", "targetPath": "invoice/SendInvoice", "pageTitle": "invoice/SendInvoice", @@ -717,7 +642,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/invoice/UpdateInvoice.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/invoice/UpdateInvoice.php", "projectPath": "invoice/UpdateInvoice.php", "targetPath": "invoice/UpdateInvoice", "pageTitle": "invoice/UpdateInvoice", @@ -745,7 +670,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/lipp/GenerateAccessTokenFromRefreshToken.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/lipp/GenerateAccessTokenFromRefreshToken.php", "projectPath": "lipp/GenerateAccessTokenFromRefreshToken.php", "targetPath": "lipp/GenerateAccessTokenFromRefreshToken", "pageTitle": "lipp/GenerateAccessTokenFromRefreshToken", @@ -763,7 +688,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/lipp/GetUserInfo.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/lipp/GetUserInfo.php", "projectPath": "lipp/GetUserInfo.php", "targetPath": "lipp/GetUserInfo", "pageTitle": "lipp/GetUserInfo", @@ -781,7 +706,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/lipp/ObtainUserConsent.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/lipp/ObtainUserConsent.php", "projectPath": "lipp/ObtainUserConsent.php", "targetPath": "lipp/ObtainUserConsent", "pageTitle": "lipp/ObtainUserConsent", @@ -799,7 +724,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/lipp/UserConsentRedirect.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/lipp/UserConsentRedirect.php", "projectPath": "lipp/UserConsentRedirect.php", "targetPath": "lipp/UserConsentRedirect", "pageTitle": "lipp/UserConsentRedirect", @@ -827,7 +752,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/notifications/CreateWebhook.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/notifications/CreateWebhook.php", "projectPath": "notifications/CreateWebhook.php", "targetPath": "notifications/CreateWebhook", "pageTitle": "notifications/CreateWebhook", @@ -845,7 +770,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/notifications/DeleteAllWebhooks.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/notifications/DeleteAllWebhooks.php", "projectPath": "notifications/DeleteAllWebhooks.php", "targetPath": "notifications/DeleteAllWebhooks", "pageTitle": "notifications/DeleteAllWebhooks", @@ -863,7 +788,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/notifications/DeleteWebhook.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/notifications/DeleteWebhook.php", "projectPath": "notifications/DeleteWebhook.php", "targetPath": "notifications/DeleteWebhook", "pageTitle": "notifications/DeleteWebhook", @@ -881,7 +806,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/notifications/GetWebhook.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/notifications/GetWebhook.php", "projectPath": "notifications/GetWebhook.php", "targetPath": "notifications/GetWebhook", "pageTitle": "notifications/GetWebhook", @@ -899,7 +824,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/notifications/ListSubscribedWebhookEventTypes.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/notifications/ListSubscribedWebhookEventTypes.php", "projectPath": "notifications/ListSubscribedWebhookEventTypes.php", "targetPath": "notifications/ListSubscribedWebhookEventTypes", "pageTitle": "notifications/ListSubscribedWebhookEventTypes", @@ -917,7 +842,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/notifications/ListWebhooks.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/notifications/ListWebhooks.php", "projectPath": "notifications/ListWebhooks.php", "targetPath": "notifications/ListWebhooks", "pageTitle": "notifications/ListWebhooks", @@ -935,7 +860,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/notifications/SearchWebhookEvents.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/notifications/SearchWebhookEvents.php", "projectPath": "notifications/SearchWebhookEvents.php", "targetPath": "notifications/SearchWebhookEvents", "pageTitle": "notifications/SearchWebhookEvents", @@ -953,7 +878,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/notifications/UpdateWebhook.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/notifications/UpdateWebhook.php", "projectPath": "notifications/UpdateWebhook.php", "targetPath": "notifications/UpdateWebhook", "pageTitle": "notifications/UpdateWebhook", @@ -971,24 +896,13 @@ 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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/notifications/ValidateWebhookEvent.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/notifications/ValidateWebhookEvent.php", "projectPath": "notifications/ValidateWebhookEvent.php", "targetPath": "notifications/ValidateWebhookEvent", "pageTitle": "notifications/ValidateWebhookEvent", "title": "ValidateWebhookEvent" }, - "depth": 2, - "outline": [ - { - "type": "heading", - "data": { - "level": 1, - "title": "Validate Webhook", - "slug": "validate-webhook" - }, - "depth": 1 - } - ] + "depth": 2 }, { "type": "file", "data": { @@ -1000,7 +914,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/notifications/WebhookEventTypesList.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/notifications/WebhookEventTypesList.php", "projectPath": "notifications/WebhookEventTypesList.php", "targetPath": "notifications/WebhookEventTypesList", "pageTitle": "notifications/WebhookEventTypesList", @@ -1028,7 +942,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payment-experience/CreateWebProfile.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payment-experience/CreateWebProfile.php", "projectPath": "payment-experience/CreateWebProfile.php", "targetPath": "payment-experience/CreateWebProfile", "pageTitle": "payment-experience/CreateWebProfile", @@ -1046,7 +960,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payment-experience/DeleteWebProfile.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payment-experience/DeleteWebProfile.php", "projectPath": "payment-experience/DeleteWebProfile.php", "targetPath": "payment-experience/DeleteWebProfile", "pageTitle": "payment-experience/DeleteWebProfile", @@ -1064,7 +978,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payment-experience/GetWebProfile.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payment-experience/GetWebProfile.php", "projectPath": "payment-experience/GetWebProfile.php", "targetPath": "payment-experience/GetWebProfile", "pageTitle": "payment-experience/GetWebProfile", @@ -1082,7 +996,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payment-experience/ListWebProfiles.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payment-experience/ListWebProfiles.php", "projectPath": "payment-experience/ListWebProfiles.php", "targetPath": "payment-experience/ListWebProfiles", "pageTitle": "payment-experience/ListWebProfiles", @@ -1100,7 +1014,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payment-experience/PartiallyUpdateWebProfile.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payment-experience/PartiallyUpdateWebProfile.php", "projectPath": "payment-experience/PartiallyUpdateWebProfile.php", "targetPath": "payment-experience/PartiallyUpdateWebProfile", "pageTitle": "payment-experience/PartiallyUpdateWebProfile", @@ -1118,7 +1032,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payment-experience/UpdateWebProfile.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payment-experience/UpdateWebProfile.php", "projectPath": "payment-experience/UpdateWebProfile.php", "targetPath": "payment-experience/UpdateWebProfile", "pageTitle": "payment-experience/UpdateWebProfile", @@ -1146,7 +1060,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payments/AuthorizationCapture.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payments/AuthorizationCapture.php", "projectPath": "payments/AuthorizationCapture.php", "targetPath": "payments/AuthorizationCapture", "pageTitle": "payments/AuthorizationCapture", @@ -1164,35 +1078,13 @@ 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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payments/AuthorizePayment.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payments/AuthorizePayment.php", "projectPath": "payments/AuthorizePayment.php", "targetPath": "payments/AuthorizePayment", "pageTitle": "payments/AuthorizePayment", "title": "AuthorizePayment" }, - "depth": 2, - "outline": [ - { - "type": "heading", - "data": { - "level": 1, - "title": "Authorize Payment", - "slug": "authorize-payment" - }, - "depth": 1, - "children": [ - { - "type": "heading", - "data": { - "level": 3, - "title": "Create Payment", - "slug": "create-payment" - }, - "depth": 3 - } - ] - } - ] + "depth": 2 }, { "type": "file", "data": { @@ -1204,7 +1096,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payments/AuthorizePaymentUsingPayPal.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payments/AuthorizePaymentUsingPayPal.php", "projectPath": "payments/AuthorizePaymentUsingPayPal.php", "targetPath": "payments/AuthorizePaymentUsingPayPal", "pageTitle": "payments/AuthorizePaymentUsingPayPal", @@ -1222,7 +1114,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payments/CreateFuturePayment.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payments/CreateFuturePayment.php", "projectPath": "payments/CreateFuturePayment.php", "targetPath": "payments/CreateFuturePayment", "pageTitle": "payments/CreateFuturePayment", @@ -1240,7 +1132,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payments/CreatePayment.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payments/CreatePayment.php", "projectPath": "payments/CreatePayment.php", "targetPath": "payments/CreatePayment", "pageTitle": "payments/CreatePayment", @@ -1344,7 +1236,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payments/CreatePaymentUsingPayPal.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payments/CreatePaymentUsingPayPal.php", "projectPath": "payments/CreatePaymentUsingPayPal.php", "targetPath": "payments/CreatePaymentUsingPayPal", "pageTitle": "payments/CreatePaymentUsingPayPal", @@ -1362,7 +1254,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payments/CreatePaymentUsingSavedCard.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payments/CreatePaymentUsingSavedCard.php", "projectPath": "payments/CreatePaymentUsingSavedCard.php", "targetPath": "payments/CreatePaymentUsingSavedCard", "pageTitle": "payments/CreatePaymentUsingSavedCard", @@ -1380,7 +1272,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payments/CreateThirdPartyPayment.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payments/CreateThirdPartyPayment.php", "projectPath": "payments/CreateThirdPartyPayment.php", "targetPath": "payments/CreateThirdPartyPayment", "pageTitle": "payments/CreateThirdPartyPayment", @@ -1392,28 +1284,12 @@ 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 "type": "heading", "data": { "level": 1, - "title": "CreatePaymentSample", - "slug": "createpaymentsample" + "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": "PaymentCard", - "slug": "paymentcard" - }, - "depth": 3 - }, { - "type": "heading", - "data": { - "level": 3, - "title": "FundingInstrument", - "slug": "fundinginstrument" - }, - "depth": 3 - }, { "type": "heading", "data": { "level": 3, @@ -1461,6 +1337,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": "transaction" }, "depth": 3 + }, { + "type": "heading", + "data": { + "level": 3, + "title": "Redirect urls", + "slug": "redirect-urls" + }, + "depth": 3 }, { "type": "heading", "data": { @@ -1477,6 +1361,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": "create-payment" }, "depth": 3 + }, { + "type": "heading", + "data": { + "level": 3, + "title": "Get redirect url", + "slug": "get-redirect-url" + }, + "depth": 3 } ] } @@ -1492,7 +1384,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payments/ExecutePayment.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payments/ExecutePayment.php", "projectPath": "payments/ExecutePayment.php", "targetPath": "payments/ExecutePayment", "pageTitle": "payments/ExecutePayment", @@ -1510,7 +1402,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payments/GetAuthorization.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payments/GetAuthorization.php", "projectPath": "payments/GetAuthorization.php", "targetPath": "payments/GetAuthorization", "pageTitle": "payments/GetAuthorization", @@ -1528,7 +1420,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payments/GetCapture.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payments/GetCapture.php", "projectPath": "payments/GetCapture.php", "targetPath": "payments/GetCapture", "pageTitle": "payments/GetCapture", @@ -1546,7 +1438,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payments/GetPayment.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payments/GetPayment.php", "projectPath": "payments/GetPayment.php", "targetPath": "payments/GetPayment", "pageTitle": "payments/GetPayment", @@ -1586,7 +1478,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payments/ListPayments.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payments/ListPayments.php", "projectPath": "payments/ListPayments.php", "targetPath": "payments/ListPayments", "pageTitle": "payments/ListPayments", @@ -1604,7 +1496,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payments/OrderAuthorize.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payments/OrderAuthorize.php", "projectPath": "payments/OrderAuthorize.php", "targetPath": "payments/OrderAuthorize", "pageTitle": "payments/OrderAuthorize", @@ -1622,7 +1514,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payments/OrderCapture.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payments/OrderCapture.php", "projectPath": "payments/OrderCapture.php", "targetPath": "payments/OrderCapture", "pageTitle": "payments/OrderCapture", @@ -1640,7 +1532,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payments/OrderCreateForAuthorization.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payments/OrderCreateForAuthorization.php", "projectPath": "payments/OrderCreateForAuthorization.php", "targetPath": "payments/OrderCreateForAuthorization", "pageTitle": "payments/OrderCreateForAuthorization", @@ -1658,7 +1550,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payments/OrderCreateForCapture.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payments/OrderCreateForCapture.php", "projectPath": "payments/OrderCreateForCapture.php", "targetPath": "payments/OrderCreateForCapture", "pageTitle": "payments/OrderCreateForCapture", @@ -1676,7 +1568,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payments/OrderCreateForVoid.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payments/OrderCreateForVoid.php", "projectPath": "payments/OrderCreateForVoid.php", "targetPath": "payments/OrderCreateForVoid", "pageTitle": "payments/OrderCreateForVoid", @@ -1694,7 +1586,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payments/OrderCreateUsingPayPal.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payments/OrderCreateUsingPayPal.php", "projectPath": "payments/OrderCreateUsingPayPal.php", "targetPath": "payments/OrderCreateUsingPayPal", "pageTitle": "payments/OrderCreateUsingPayPal", @@ -1712,7 +1604,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payments/OrderDoVoid.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payments/OrderDoVoid.php", "projectPath": "payments/OrderDoVoid.php", "targetPath": "payments/OrderDoVoid", "pageTitle": "payments/OrderDoVoid", @@ -1730,7 +1622,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payments/OrderGet.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payments/OrderGet.php", "projectPath": "payments/OrderGet.php", "targetPath": "payments/OrderGet", "pageTitle": "payments/OrderGet", @@ -1748,7 +1640,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payments/Reauthorization.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payments/Reauthorization.php", "projectPath": "payments/Reauthorization.php", "targetPath": "payments/Reauthorization", "pageTitle": "payments/Reauthorization", @@ -1766,7 +1658,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payments/RefundCapture.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payments/RefundCapture.php", "projectPath": "payments/RefundCapture.php", "targetPath": "payments/RefundCapture", "pageTitle": "payments/RefundCapture", @@ -1806,7 +1698,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payments/UpdatePayment.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payments/UpdatePayment.php", "projectPath": "payments/UpdatePayment.php", "targetPath": "payments/UpdatePayment", "pageTitle": "payments/UpdatePayment", @@ -1824,7 +1716,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payments/VoidAuthorization.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payments/VoidAuthorization.php", "projectPath": "payments/VoidAuthorization.php", "targetPath": "payments/VoidAuthorization", "pageTitle": "payments/VoidAuthorization", @@ -1852,7 +1744,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payouts/CancelPayoutItem.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payouts/CancelPayoutItem.php", "projectPath": "payouts/CancelPayoutItem.php", "targetPath": "payouts/CancelPayoutItem", "pageTitle": "payouts/CancelPayoutItem", @@ -1870,7 +1762,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payouts/CreateBatchPayout.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payouts/CreateBatchPayout.php", "projectPath": "payouts/CreateBatchPayout.php", "targetPath": "payouts/CreateBatchPayout", "pageTitle": "payouts/CreateBatchPayout", @@ -1888,7 +1780,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payouts/CreateSinglePayout.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payouts/CreateSinglePayout.php", "projectPath": "payouts/CreateSinglePayout.php", "targetPath": "payouts/CreateSinglePayout", "pageTitle": "payouts/CreateSinglePayout", @@ -1906,7 +1798,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payouts/GetPayoutBatchStatus.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payouts/GetPayoutBatchStatus.php", "projectPath": "payouts/GetPayoutBatchStatus.php", "targetPath": "payouts/GetPayoutBatchStatus", "pageTitle": "payouts/GetPayoutBatchStatus", @@ -1924,7 +1816,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/payouts/GetPayoutItemStatus.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/payouts/GetPayoutItemStatus.php", "projectPath": "payouts/GetPayoutItemStatus.php", "targetPath": "payouts/GetPayoutItemStatus", "pageTitle": "payouts/GetPayoutItemStatus", @@ -1952,13 +1844,43 @@ 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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/sale/GetSale.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/sale/GetSale.php", "projectPath": "sale/GetSale.php", "targetPath": "sale/GetSale", "pageTitle": "sale/GetSale", "title": "GetSale" }, - "depth": 2 + "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 + } + ] + } + ] }, { "type": "file", "data": { @@ -1970,7 +1892,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/sale/RefundSale.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/sale/RefundSale.php", "projectPath": "sale/RefundSale.php", "targetPath": "sale/RefundSale", "pageTitle": "sale/RefundSale", @@ -2036,7 +1958,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/tls/TlsCheck.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/tls/TlsCheck.php", "projectPath": "tls/TlsCheck.php", "targetPath": "tls/TlsCheck", "pageTitle": "tls/TlsCheck", @@ -2064,7 +1986,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/vault/CreateBankAccount.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/vault/CreateBankAccount.php", "projectPath": "vault/CreateBankAccount.php", "targetPath": "vault/CreateBankAccount", "pageTitle": "vault/CreateBankAccount", @@ -2082,7 +2004,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/vault/CreateCreditCard.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/vault/CreateCreditCard.php", "projectPath": "vault/CreateCreditCard.php", "targetPath": "vault/CreateCreditCard", "pageTitle": "vault/CreateCreditCard", @@ -2100,7 +2022,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/vault/DeleteBankAccount.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/vault/DeleteBankAccount.php", "projectPath": "vault/DeleteBankAccount.php", "targetPath": "vault/DeleteBankAccount", "pageTitle": "vault/DeleteBankAccount", @@ -2118,7 +2040,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/vault/DeleteCreditCard.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/vault/DeleteCreditCard.php", "projectPath": "vault/DeleteCreditCard.php", "targetPath": "vault/DeleteCreditCard", "pageTitle": "vault/DeleteCreditCard", @@ -2136,7 +2058,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/vault/GetBankAccount.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/vault/GetBankAccount.php", "projectPath": "vault/GetBankAccount.php", "targetPath": "vault/GetBankAccount", "pageTitle": "vault/GetBankAccount", @@ -2154,7 +2076,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/vault/GetCreditCard.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/vault/GetCreditCard.php", "projectPath": "vault/GetCreditCard.php", "targetPath": "vault/GetCreditCard", "pageTitle": "vault/GetCreditCard", @@ -2172,7 +2094,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/vault/ListCreditCards.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/vault/ListCreditCards.php", "projectPath": "vault/ListCreditCards.php", "targetPath": "vault/ListCreditCards", "pageTitle": "vault/ListCreditCards", @@ -2190,7 +2112,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 "foldPrefix": "^", "name": "PHP" }, - "sourcePath": "/Users/scoffey/paypal/server_sdk/PayPal-PHP-SDK/sample/vault/UpdateCreditCard.php", + "sourcePath": "/Users/japatel/paypal/github/PayPal-PHP-SDK/sample/vault/UpdateCreditCard.php", "projectPath": "vault/UpdateCreditCard.php", "targetPath": "vault/UpdateCreditCard", "pageTitle": "vault/UpdateCreditCard", diff --git a/sample/doc/payments/CreateThirdPartyPayment.html b/sample/doc/payments/CreateThirdPartyPayment.html index 33de391..df5c58a 100644 --- a/sample/doc/payments/CreateThirdPartyPayment.html +++ b/sample/doc/payments/CreateThirdPartyPayment.html @@ -1,52 +1,32 @@ -payments/CreateThirdPartyPayment
payments/CreateThirdPartyPayment.php
<?php

CreatePaymentSample

-

This sample code demonstrate how you can process -a direct credit card payment. Please note that direct -credit card payment and related features using the -REST API is restricted in some countries. +payments/CreateThirdPartyPayment

payments/CreateThirdPartyPayment.php
<?php

Create Third Party Payment using PayPal as payment method

+

This sample code demonstrates how you can process a +PayPal Account based Payment with a third party paypal account. API used: /v1/payments/payment

require __DIR__ . '/../bootstrap.php'; use PayPal\Api\Amount; use PayPal\Api\Details; -use PayPal\Api\FundingInstrument; use PayPal\Api\Item; use PayPal\Api\ItemList; use PayPal\Api\Payee; use PayPal\Api\Payer; use PayPal\Api\Payment; -use PayPal\Api\PaymentCard; -use PayPal\Api\Transaction;

PaymentCard

-

A resource representing a payment card that can be -used to fund a payment.

$card = new PaymentCard(); -$card->setType("visa") - ->setNumber("4669424246660779") - ->setExpireMonth("11") - ->setExpireYear("2019") - ->setCvv2("012") - ->setFirstName("Joe") - ->setBillingCountry("US") - ->setLastName("Shopper");

FundingInstrument

-

A resource representing a Payer's funding instrument. -For direct credit card payments, set the CreditCard -field on this object.

$fi = new FundingInstrument(); -$fi->setPaymentCard($card);

Payer

+use PayPal\Api\RedirectUrls; +use PayPal\Api\Transaction;

Payer

A resource representing a Payer that funds a payment -For direct credit card payments, set payment method -to 'credit_card' and add an array of funding instruments.

$payer = new Payer(); -$payer->setPaymentMethod("credit_card") - ->setFundingInstruments(array($fi));

Itemized information

+For paypal account payments, set payment method +to 'paypal'.

$payer = new Payer(); +$payer->setPaymentMethod("paypal");

Itemized information

(Optional) Lets you specify item wise information

$item1 = new Item(); $item1->setName('Ground Coffee 40 oz') - ->setDescription('Ground Coffee 40 oz') ->setCurrency('USD') ->setQuantity(1) - ->setTax(0.3) - ->setPrice(7.50); + ->setSku("123123") // Similar to `item_number` in Classic API + ->setPrice(7.5); $item2 = new Item(); $item2->setName('Granola bars') - ->setDescription('Granola Bars with Peanuts') ->setCurrency('USD') ->setQuantity(5) - ->setTax(0.2) + ->setSku("321321") // Similar to `item_number` in Classic API ->setPrice(2); $itemList = new ItemList(); @@ -56,7 +36,7 @@ payment information such as tax, shipping charges etc.

$details = new Details(); $details->setShipping(1.2) ->setTax(1.3) - ->setSubtotal(17.5);

Amount

+ ->setSubtotal(17.50);

Amount

Lets you specify a payment amount. You can also specify additional details such as shipping, tax.

$amount = new Amount(); @@ -68,23 +48,35 @@ Merchant Id can be found at $payee->setEmail("stevendcoffey-facilitator@gmail.com");
+return $payment;
\ No newline at end of file diff --git a/sample/payments/CreateThirdPartyPayment.php b/sample/payments/CreateThirdPartyPayment.php index e90a9e6..74d7aab 100644 --- a/sample/payments/CreateThirdPartyPayment.php +++ b/sample/payments/CreateThirdPartyPayment.php @@ -1,69 +1,42 @@ setType("visa") - ->setNumber("4669424246660779") - ->setExpireMonth("11") - ->setExpireYear("2019") - ->setCvv2("012") - ->setFirstName("Joe") - ->setBillingCountry("US") - ->setLastName("Shopper"); - -// ### FundingInstrument -// A resource representing a Payer's funding instrument. -// For direct credit card payments, set the CreditCard -// field on this object. -$fi = new FundingInstrument(); -$fi->setPaymentCard($card); - // ### Payer // A resource representing a Payer that funds a payment -// For direct credit card payments, set payment method -// to 'credit_card' and add an array of funding instruments. +// For paypal account payments, set payment method +// to 'paypal'. $payer = new Payer(); -$payer->setPaymentMethod("credit_card") - ->setFundingInstruments(array($fi)); +$payer->setPaymentMethod("paypal"); // ### Itemized information // (Optional) Lets you specify item wise // information $item1 = new Item(); $item1->setName('Ground Coffee 40 oz') - ->setDescription('Ground Coffee 40 oz') ->setCurrency('USD') ->setQuantity(1) - ->setTax(0.3) - ->setPrice(7.50); + ->setSku("123123") // Similar to `item_number` in Classic API + ->setPrice(7.5); $item2 = new Item(); $item2->setName('Granola bars') - ->setDescription('Granola Bars with Peanuts') ->setCurrency('USD') ->setQuantity(5) - ->setTax(0.2) + ->setSku("321321") // Similar to `item_number` in Classic API ->setPrice(2); $itemList = new ItemList(); @@ -76,7 +49,7 @@ $itemList->setItems(array($item1, $item2)); $details = new Details(); $details->setShipping(1.2) ->setTax(1.3) - ->setSubtotal(17.5); + ->setSubtotal(17.50); // ### Amount // Lets you specify a payment amount. @@ -96,7 +69,7 @@ $payee->setEmail("stevendcoffey-facilitator@gmail.com"); // ### Transaction // A transaction defines the contract of a // payment - what is the payment for and who -// is fulfilling it. +// is fulfilling it. $transaction = new Transaction(); $transaction->setAmount($amount) ->setItemList($itemList) @@ -104,30 +77,49 @@ $transaction->setAmount($amount) ->setPayee($payee) ->setInvoiceNumber(uniqid()); +// ### Redirect urls +// Set the urls that the buyer must be redirected to after +// payment approval/ cancellation. +$baseUrl = getBaseUrl(); +$redirectUrls = new RedirectUrls(); +$redirectUrls->setReturnUrl("$baseUrl/ExecutePayment.php?success=true") + ->setCancelUrl("$baseUrl/ExecutePayment.php?success=false"); + // ### Payment // A Payment Resource; create one using -// the above types and intent set to sale 'sale' +// the above types and intent set to 'sale' $payment = new Payment(); $payment->setIntent("sale") ->setPayer($payer) + ->setRedirectUrls($redirectUrls) ->setTransactions(array($transaction)); + // For Sample Purposes Only. $request = clone $payment; // ### Create Payment -// Create a payment by calling the payment->create() method -// with a valid ApiContext (See bootstrap.php for more on `ApiContext`) -// The return object contains the state. +// Create a payment by calling the 'create' method +// passing it a valid apiContext. +// (See bootstrap.php for more on `ApiContext`) +// The return object contains the state and the +// url to which the buyer must be redirected to +// for payment approval try { $payment->create($apiContext); } catch (Exception $ex) { // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printError('Create Payment Using Credit Card. If 500 Exception, try creating a new Credit Card using Step 4, on this link, and using it.', 'Payment', null, $request, $ex); + ResultPrinter::printError("Created Payment Using PayPal. Please visit the URL to Approve.", "Payment", null, $request, $ex); exit(1); } +// ### Get redirect url +// The API response provides the url that you must redirect +// the buyer to. Retrieve the url from the $payment->getApprovalLink() +// method +$approvalUrl = $payment->getApprovalLink(); + // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY - ResultPrinter::printResult('Create Payment Using Credit Card', 'Payment', $payment->getId(), $request, $payment); +ResultPrinter::printResult("Created Payment Using PayPal. Please visit the URL to Approve.", "Payment", "$approvalUrl", $request, $payment); return $payment;