VFN_GetSignature()
This subprocedure can be used to retrieve a customer signature using Verifone’s Signature service.
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_GETSGNTR
// Description:
// This is a test program to illustrate how to call the
// VFN_GetSignature() 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 SignatureReqDS LikeDS(VFN_GetSignatureReqDS_t) Inz(*LikeDS);
// This will store parsed response data from the API call
Dcl-Ds SignatureRspDS LikeDS(VFN_GetSignatureRspDS_t) Inz(*LikeDS);
// This must be a device which has been registered and exists in VFNDVC
SignatureReqDS.DeviceID = 'test';
SignatureReqDS.DisplayText = 'I hereby agree...';
// These are the filenames for the request and response log files.
SignatureReqDS.RequestLog = 'T_GETSGNTR_Request.xml';
SignatureReqDS.ResponseLog = 'T_GETSGNTR_Response.xml';
if not VFN_GetSignature( SignatureReqDS : SignatureRspDS : ErrorDS );
// Handle error
WriteToJobLog( 'Message ID: ' + ErrorDS.MessageID + NewLine );
WriteToJobLog( 'Message: ' + ErrorDS.Message + NewLine );
*INLR = *ON;
return;
else;
WriteToJobLog( 'SIGNATURE CAPTURE RESPONSE' + NewLine );
WriteToJobLog( 'Response Text: ' + SignatureRspDS.ResponseText
+ NewLine );
WriteToJobLog( 'Result: ' + SignatureRspDS.Result + NewLine );
WriteToJobLog( 'Result Code: ' + SignatureRspDS.ResultCode + NewLine );
WriteToJobLog( 'Termination Status: '
+ SignatureRspDS.TerminationStatus + NewLine );
WriteToJobLog( 'Counter: ' + %Char(SignatureRspDS.Counter)
+ NewLine );
WriteToJobLog( 'Signature Data: ' + SignatureRspDS.SignatureData
+ NewLine );
WriteToJobLog( 'Mime Type: ' + SignatureRspDS.MimeType + NewLine );
endif;
*INLR = *ON;
return;
Data Structures
|
|
|
Required The ID of the payment device, registered in VFNDVC, on which a signature is to be captured. |
|
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: |
|
The text that will be displayed on the signature capture screen on the payment device. |
|
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. |
|
This field corresponds to the field COUNTER in your device's Verifone documentation. |
|
This field corresponds to the field SIGNATUREDATA in your device's Verifone documentation. |
|
This field corresponds to the field MIME_TYPE in your device's Verifone documentation. |