Is the payment connector communicating with payment service?
See if SDK kit used to implement this code is corrupted.
If it is then that may be causing problem to show the output as void.
Note: Payment Connector is an extension that facilitates communication between Microsoft Dynamics 365 Commerce (and associated components) and a payment service. The connector that is described in this topic was implemented by using the standard payments software development kit (SDK).