Fixing Invoice Phone Attribute

- Also updated the Update Invoice Sample
This commit is contained in:
japatel
2014-11-20 17:00:19 -06:00
parent b5809666b4
commit 24e0609e5b
15 changed files with 460 additions and 265 deletions

View File

@@ -8,14 +8,21 @@
$invoice = require 'CreateInvoice.php';
use PayPal\Api\Invoice;
// ### Update Invoice
// Lets update some information
$invoice->setInvoiceDate("2014-11-16 PST");
// For Sample Purposes Only.
$request = clone $invoice;
// ### Update Invoice
// Lets update some information
$invoice->setInvoiceDate("2014-12-16 PST");
// ### NOTE: These are the work-around added to the
// sample, to get past the bug in PayPal APIs.
// There is already an internal ticket #PPTIPS-1932 created for it.
$invoice->setDiscount(null);
$billingInfo = $invoice->getBillingInfo()[0];
$billingInfo->setAddress(null);
$invoice->getPaymentTerm()->setDueDate(null);
try {
// ### Update Invoice
// Update an invoice by calling the invoice->update() method