This would send a notification to both merchant as well the payer about the cancellation. The information of merchant and payer is retrieved from the invoice details
Cancel invoice object by calling the
static cancel
method
on the Invoice class by passing a valid
notification object
(See bootstrap.php for more on ApiContext
)
Cancel Invoice Sample
This sample code demonstrate how you can cancel an invoice.