forked from LiveCarta/PayPal-PHP-SDK
Merge pull request #682 from paypal/payments-experience-v1.3
Payments experience v1.3
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -10,4 +10,4 @@
|
||||
<span class="hljs-keyword">exit</span>(<span class="hljs-number">1</span>);
|
||||
}</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY</p></div></div><div class="code"><div class="wrapper">ResultPrinter::printResult(<span class="hljs-string">"Get all Templates"</span>, <span class="hljs-string">"Templates"</span>, <span class="hljs-keyword">null</span>, <span class="hljs-keyword">null</span>, <span class="hljs-variable">$templates</span>);
|
||||
|
||||
<span class="hljs-keyword">return</span> <span class="hljs-variable">$templates</span>;</div></div></div></div></body></html>
|
||||
<span class="hljs-keyword">return</span> <span class="hljs-variable">$templates</span>;</div></div></div></div></body></html>
|
||||
@@ -16,4 +16,4 @@ Template ID
|
||||
<span class="hljs-keyword">exit</span>(<span class="hljs-number">1</span>);
|
||||
}</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY</p></div></div><div class="code"><div class="wrapper">ResultPrinter::printResult(<span class="hljs-string">"Get Invoice Template"</span>, <span class="hljs-string">"Template"</span>, <span class="hljs-variable">$template</span>->getTemplateId(), <span class="hljs-variable">$templateId</span>, <span class="hljs-variable">$template</span>);
|
||||
|
||||
<span class="hljs-keyword">return</span> <span class="hljs-variable">$template</span>;</div></div></div></div></body></html>
|
||||
<span class="hljs-keyword">return</span> <span class="hljs-variable">$template</span>;</div></div></div></div></body></html>
|
||||
@@ -4,11 +4,8 @@ an invoice.</p></div></div><div class="code"><div class="wrapper"><span class="h
|
||||
<span class="hljs-variable">$invoice</span> = <span class="hljs-keyword">require</span> <span class="hljs-string">'CreateInvoice.php'</span>;
|
||||
<span class="hljs-keyword">use</span> <span class="hljs-title">PayPal</span>\<span class="hljs-title">Api</span>\<span class="hljs-title">Invoice</span>;</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>For Sample Purposes Only.</p></div></div><div class="code"><div class="wrapper"><span class="hljs-variable">$request</span> = <span class="hljs-keyword">clone</span> <span class="hljs-variable">$invoice</span>;</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h3 id="update-invoice">Update Invoice</h3>
|
||||
<p>Lets update some information</p></div></div><div class="code"><div class="wrapper"><span class="hljs-variable">$invoice</span>->setInvoiceDate(<span class="hljs-string">"2014-12-16 PST"</span>);</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h3 id="note-these-are-the-work-around-added-to-the">NOTE: These are the work-around added to the</h3>
|
||||
<p>sample, to get past the bug in PayPal APIs.
|
||||
There is already an internal ticket #PPTIPS-1932 created for it.</p></div></div><div class="code"><div class="wrapper"><span class="hljs-variable">$invoice</span>->setDiscount(<span class="hljs-keyword">null</span>);
|
||||
<span class="hljs-variable">$billingInfo</span> = <span class="hljs-variable">$invoice</span>->getBillingInfo()[<span class="hljs-number">0</span>];
|
||||
<span class="hljs-variable">$billingInfo</span>->setAddress(<span class="hljs-keyword">null</span>);
|
||||
<span class="hljs-variable">$invoice</span>->getPaymentTerm()->setDueDate(<span class="hljs-keyword">null</span>);
|
||||
<p>sample, to get past the bug in PayPal APIs.</p></div></div><div class="code"><div class="wrapper"><span class="hljs-variable">$invoice</span>->setDiscount(<span class="hljs-keyword">null</span>);
|
||||
<span class="hljs-variable">$invoice</span>->getItems()[<span class="hljs-number">1</span>]->setDiscount(<span class="hljs-keyword">null</span>);
|
||||
|
||||
<span class="hljs-keyword">try</span> {</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h3 id="update-invoice">Update Invoice</h3>
|
||||
<p>Update an invoice by calling the invoice->update() method
|
||||
@@ -26,4 +23,4 @@ Invoice ID
|
||||
<span class="hljs-keyword">exit</span>(<span class="hljs-number">1</span>);
|
||||
}</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY</p></div></div><div class="code"><div class="wrapper"> ResultPrinter::printResult(<span class="hljs-string">"Get Invoice (Not Required - For Sample Only)"</span>, <span class="hljs-string">"Invoice"</span>, <span class="hljs-variable">$invoice</span>->getId(), <span class="hljs-variable">$invoice</span>->getId(), <span class="hljs-variable">$invoice</span>);
|
||||
|
||||
<span class="hljs-keyword">return</span> <span class="hljs-variable">$invoice</span>;</div></div></div></div></body></html>
|
||||
<span class="hljs-keyword">return</span> <span class="hljs-variable">$invoice</span>;</div></div></div></div></body></html>
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user