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
)
NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
Cancel Invoice Sample
This sample code demonstrate how you can cancel an invoice.