forked from LiveCarta/PayPal-PHP-SDK
Fixing Invoice Phone Attribute
- Also updated the Update Invoice Sample
This commit is contained in:
@@ -1020,6 +1020,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": "update-invoice"
|
||||
},
|
||||
"depth": 3
|
||||
}, {
|
||||
"type": "heading",
|
||||
"data": {
|
||||
"level": 3,
|
||||
"title": "NOTE: These are the work-around added to the",
|
||||
"slug": "note-these-are-the-work-around-added-to-the"
|
||||
},
|
||||
"depth": 3
|
||||
}, {
|
||||
"type": "heading",
|
||||
"data": {
|
||||
|
||||
@@ -2,8 +2,13 @@
|
||||
<p>This sample code demonstrate how you can update
|
||||
an invoice.</p></div></div><div class="code"><div class="wrapper"><span class="hljs-comment">/**<span class="hljs-phpdoc"> @var</span> Invoice $invoice */</span>
|
||||
<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"><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-11-16 PST"</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>;
|
||||
<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>);
|
||||
|
||||
<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
|
||||
|
||||
Reference in New Issue
Block a user