This sample code demonstrate how you can void an authorized payment API used: /v1/payments/authorization/<{authorizationid}>/void"
You can void a previously authorized payment by invoking the $authorization->void method with a valid ApiContext (See bootstrap.php for more on ApiContext)
ApiContext
create payment to get authorization Id createAuthorization is defined in common.php
VoidAuthorization
This sample code demonstrate how you can void an authorized payment API used: /v1/payments/authorization/<{authorizationid}>/void"