C_LONGINT($iErrorCode)
C_POINTER($pTR)
C_POINTER($pResponse)
C_TEXT($xFileName)
  `
  `create AuthorizeNet transaction in eTrans
  `"testdriver" is test account at AN
$pTR:=ETRANS_AN_Create_Direct ("testdriver";1.01;"4444333322221111";"05/02")
  `make certain transaction was successfully created
If ($pTR#NULL_Get_Pointer )
    `set flag indicating test request
  $iErrorCode:=ETRANS_Set_Field_TR ($pTR;ETRANS_TestRequest ;"TRUE")
    `set transaction type
  $iErrorCode:=ETRANS_Set_Field_TR ($pTR;ETRANS_TransactionType ;"CAPTURE_ONLY")
    `set CVV2 code from card
    `$iErrorCode:=ETRANS_Set_Field_TR ($pTR;ETRANS_CardSecurityCode ;"009")
    `
    `get temp var to hold response
  $pResponse:=DSS_Get_Variable_by_Type (Is BLOB )
    `run transaction through AN
  $iErrorCode:=ETRANS_Transact ($pTR;$pResponse)
    `
    `release transaction from eTrans
  ETRANS_Return_TR ($pTR)
    `
    `the following is to help debug parsing of response
  $xFileName:="MacHD:Desktop Folder:AN_Response.txt"
  $iErrorCode:=BLOB_BLOB_to_Document ($pResponse;$xFileName)
  SET DOCUMENT CREATOR($xFileName;"R*ch")  `BBEdit file
    `
    `clean up
  DSS_Return_Variable ($pResponse)
End if 
