VFN_UnregisterAll()
This subprocedure can be used to unregister all POS connections from a device.
Subprocedure Prototype
|
Returns *OFF if an error occurs during processing, *ON otherwise. |
|
|
|
|
|
Optional parameter that, if passed, will contain error data returned from the subprocedure. |
Example Code
// Example Program: T_UNRGALL
// Description:
// This is a test program to illustrate how to call the
// VFN_UnregisterAll() subprocedure.
Ctl-Opt DftActGrp(*No) ActGrp(*Caller) BndDir('PTTIBND');
/COPY QRPGLECPY,VFNCB
// This is included for demo output purposes.
Dcl-Pr WriteToJobLog Int(10) Extproc('Qp0zLprintf');
pString Pointer Value Options(*String);
End-Pr;
Dcl-C NewLine x'15';
// This will capture returned error information
Dcl-Ds ErrorDS LikeDS(VFN_ErrorDS_t) Inz(*LikeDS);
// This will be used to pass request information to the API call
Dcl-Ds UnregAllReqDS LikeDS(VFN_UnregisterAllReqDS_t) Inz(*LikeDS);
// This will store parsed response data from the API call
Dcl-Ds UnregAllRspDS LikeDS(VFN_UnregisterAllRspDS_t) Inz(*LikeDS);
reset ErrorDS;
reset UnregAllReqDS;
reset UnregAllRspDS;
// This must be a device registered in VFNDVC. This field is needed
// in order to retrieve the host name of the POS.
UnregAllReqDS.DeviceID = 'test';
// These fields are used to specify a logging output file for the request
// and response XML, and will have no effect if logging is disabled.
UnregAllReqDS.RequestLog = 'T_UNRGALL_Request.xml';
UnregAllReqDS.ResponseLog = 'T_UNRGALL_Response.xml';
if not VFN_UnregisterAll( UnregAllReqDS : UnregAllRspDS : ErrorDS );
// handle error
WriteToJobLog( 'Message ID: ' + ErrorDS.MessageId + NewLine );
WriteToJobLog( 'Message: ' + ErrorDS.Message + NewLine );
*INLR = *On;
return;
else;
// Check the response data to confirm successful unregistration.
WriteToJobLog( 'Response Text: ' + UnregAllRspDS.ResponseText );
WriteToJobLog( 'Result: ' + UnregAllRspDS.Result );
WriteToJobLog( 'Result Code: ' + UnregAllRspDS.ResultCode );
WriteToJobLog( 'Termination Status: '
+ UnregAllRspDS.TerminationStatus );
endif;
Data Structures
|
|
|
Required The ID of a payment device registered in VFNDVC. This is used to retrieve the host name of the POS. |
|
Specifies the file name or path of the request log file. Will have no effect if logging is not enabled. Example: |
|
Specifies the file name or path of the response log file. Will have no effect if logging is not enabled. Example: |
|
Override the default value set in VFN_Register() or REGVFNDVC. Default Value: |
|
Override the default value set in VFN_Register() or REGVFNDVC. Default Value: |
|
Override the default value set in VFN_Register() or REGVFNDVC. Default Value: |
|
|
|
This field corresponds to the field RESPONSE_TEXT in your device's Verifone documentation. |
|
This field corresponds to the field RESULT in your device's Verifone documentation. |
|
This field corresponds to the field RESULT_CODE in your device's Verifone documentation. |
|
This field corresponds to the field TERMINATION_STATUS in your device's Verifone documentation. |