forked from LiveCarta/PayPal-PHP-SDK
Fixing Invoice Phone Attribute
- Also updated the Update Invoice Sample
This commit is contained in:
@@ -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
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Reference in New Issue
Block a user