The code snippet below shows virtually all the 4GL code you need to run OneStep Charge.
{tri8osc/oscapi}
create trExec no-error.
assign trExec.transNo = 12345 /* use a Progress sequence, for example */
trExec.cardNo = "1234123412341234"
trExec.expDate = "0109"
trExec.amount = 100.34
trExec.action = CCA_AUTHONLY
trExec.timeout = 12
no-error.
run tri8osc/oscengin.p (input-output table trExec) no-error.
/* Now use the authorization results, found in trExec, however
// you please. Example:
//
// if trExec.authStatus = CCS_DECL
// then do:
// message "Card DECLINED".
// end.
*/
- OR -
|