From a471ea1338fb522b90ac226b194aa00bb884d2b9 Mon Sep 17 00:00:00 2001
From: Jay Patel
Date: Fri, 27 Feb 2015 14:58:35 -0600
Subject: [PATCH] Small Sample Fix
- Updated Get Authorization to User Proper Authorization
---
sample/doc/assets/behavior.js | 384 ++++++++++++++++------
sample/doc/payments/GetAuthorization.html | 2 +-
sample/payments/GetAuthorization.php | 2 +-
3 files changed, 281 insertions(+), 107 deletions(-)
diff --git a/sample/doc/assets/behavior.js b/sample/doc/assets/behavior.js
index a0cde1e..393b104 100644
--- a/sample/doc/assets/behavior.js
+++ b/sample/doc/assets/behavior.js
@@ -310,104 +310,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": "invoice/CreateInvoice",
"title": "CreateInvoice"
},
- "depth": 2,
- "outline": [
- {
- "type": "heading",
- "data": {
- "level": 1,
- "title": "Create Invoice Sample",
- "slug": "create-invoice-sample"
- },
- "depth": 1,
- "children": [
- {
- "type": "heading",
- "data": {
- "level": 3,
- "title": "Invoice Info",
- "slug": "invoice-info"
- },
- "depth": 3
- }, {
- "type": "heading",
- "data": {
- "level": 3,
- "title": "Merchant Info",
- "slug": "merchant-info"
- },
- "depth": 3
- }, {
- "type": "heading",
- "data": {
- "level": 3,
- "title": "Address Information",
- "slug": "address-information"
- },
- "depth": 3
- }, {
- "type": "heading",
- "data": {
- "level": 3,
- "title": "Billing Information",
- "slug": "billing-information"
- },
- "depth": 3
- }, {
- "type": "heading",
- "data": {
- "level": 3,
- "title": "Items List",
- "slug": "items-list"
- },
- "depth": 3,
- "children": [
- {
- "type": "heading",
- "data": {
- "level": 4,
- "title": "Tax Item",
- "slug": "tax-item"
- },
- "depth": 4
- }, {
- "type": "heading",
- "data": {
- "level": 4,
- "title": "Tax Item",
- "slug": "tax-item"
- },
- "depth": 4
- }
- ]
- }, {
- "type": "heading",
- "data": {
- "level": 3,
- "title": "Shipping Information",
- "slug": "shipping-information"
- },
- "depth": 3
- }, {
- "type": "heading",
- "data": {
- "level": 3,
- "title": "Logo",
- "slug": "logo"
- },
- "depth": 3
- }, {
- "type": "heading",
- "data": {
- "level": 3,
- "title": "Create Invoice",
- "slug": "create-invoice"
- },
- "depth": 3
- }
- ]
- }
- ]
+ "depth": 2
}, {
"type": "file",
"data": {
@@ -651,7 +554,18 @@ 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": "lipp/ObtainUserConsent",
"title": "ObtainUserConsent"
},
- "depth": 2
+ "depth": 2,
+ "outline": [
+ {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Get User Consent URL",
+ "slug": "get-user-consent-url"
+ },
+ "depth": 3
+ }
+ ]
}, {
"type": "file",
"data": {
@@ -987,7 +901,29 @@ 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/AuthorizationCapture",
"title": "AuthorizationCapture"
},
- "depth": 2
+ "depth": 2,
+ "outline": [
+ {
+ "type": "heading",
+ "data": {
+ "level": 1,
+ "title": "AuthorizationCapture",
+ "slug": "authorizationcapture"
+ },
+ "depth": 1,
+ "children": [
+ {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Capture Payment",
+ "slug": "capture-payment"
+ },
+ "depth": 3
+ }
+ ]
+ }
+ ]
}, {
"type": "file",
"data": {
@@ -1005,7 +941,29 @@ 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/AuthorizePayment",
"title": "AuthorizePayment"
},
- "depth": 2
+ "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
+ }
+ ]
+ }
+ ]
}, {
"type": "file",
"data": {
@@ -1059,7 +1017,93 @@ 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
+ "depth": 2,
+ "outline": [
+ {
+ "type": "heading",
+ "data": {
+ "level": 1,
+ "title": "CreatePaymentSample",
+ "slug": "createpaymentsample"
+ },
+ "depth": 1,
+ "children": [
+ {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "CreditCard",
+ "slug": "creditcard"
+ },
+ "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
+ }
+ ]
+ }
+ ]
}, {
"type": "file",
"data": {
@@ -1077,7 +1121,93 @@ 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
+ "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
+ }
+ ]
+ }
+ ]
}, {
"type": "file",
"data": {
@@ -1131,7 +1261,29 @@ 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/GetAuthorization",
"title": "GetAuthorization"
},
- "depth": 2
+ "depth": 2,
+ "outline": [
+ {
+ "type": "heading",
+ "data": {
+ "level": 1,
+ "title": "GetAuthorization",
+ "slug": "getauthorization"
+ },
+ "depth": 1,
+ "children": [
+ {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "GetAuthorization",
+ "slug": "getauthorization"
+ },
+ "depth": 3
+ }
+ ]
+ }
+ ]
}, {
"type": "file",
"data": {
@@ -1149,7 +1301,29 @@ 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/GetCapture",
"title": "GetCapture"
},
- "depth": 2
+ "depth": 2,
+ "outline": [
+ {
+ "type": "heading",
+ "data": {
+ "level": 1,
+ "title": "GetCapture",
+ "slug": "getcapture"
+ },
+ "depth": 1,
+ "children": [
+ {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Retrieve Capture details",
+ "slug": "retrieve-capture-details"
+ },
+ "depth": 3
+ }
+ ]
+ }
+ ]
}, {
"type": "file",
"data": {
diff --git a/sample/doc/payments/GetAuthorization.html b/sample/doc/payments/GetAuthorization.html
index 2121362..688727d 100644
--- a/sample/doc/payments/GetAuthorization.html
+++ b/sample/doc/payments/GetAuthorization.html
@@ -3,7 +3,7 @@
of an authorized payment.
API used: /v1/payments/authorization/<$authorizationId>
$authorization = require 'AuthorizePayment.php';
-$authorizationId = '4U805254HC285294Y';
+$authorizationId = $authorization->getId();
use PayPal\Api\Authorization;
use PayPal\Api\Payment;
GetAuthorization
You can retrieve info about an Authorization diff --git a/sample/payments/GetAuthorization.php b/sample/payments/GetAuthorization.php index 2a7185d..7171cb2 100644 --- a/sample/payments/GetAuthorization.php +++ b/sample/payments/GetAuthorization.php @@ -6,7 +6,7 @@ /** @var Authorization $authorization */ $authorization = require 'AuthorizePayment.php'; -$authorizationId = '4U805254HC285294Y'; // $authorization->getId(); +$authorizationId = $authorization->getId(); use PayPal\Api\Authorization; use PayPal\Api\Payment;