Facades: merchant
Overview
Updates a bill.
Parameters
Parameter | Description |
---|---|
bill | A Bill object with the parameters to update defined. |
billId | The ID of the bill to update. |
Example
$items = [];
$item = new Item();
$item->setPrice(6.0);
$item->setQuantity(1);
$item->setDescription("Test Item 1");
array_push($items, $item);
$bill = new Bill("bill1234-ABCD", Currency::USD, "", $items);
$bill->setEmail("[email protected]");
$basicBill = $bitpay->createBill($bill);
$item2 = new Item();
$item2->setPrice(4.0);
$item2->setQuantity(1);
$item2->setDescription("Test Item 2");
array_push($items, $item2);
$retrievedBill = bitpay->getBill(basicBill.getId());
$retrievedBill->setCurrency(Currency::EUR);
$retrievedBill->setName("updatedBill");
$retrievedBill->setItems($items);
$updatedBill = $bitpay->updateBill($retrievedBill, $retrievedBill->getId());