(* To run this as a card present transaction you must use the track data property.  You normally capture this information from a Card Swipe (a HID device).  I have provided a sample of data from a test credit card in this script.  This information will show up as a Track1 or Track2 transaction on the EFSnet web site xml report.  


A transaction that is manually entered (comment out the track data line and run the script with the hard-coded information), will show up as Keyed on the EFSnet web site xml report. 

You will note that if the track data is populated as well as the other information, track data takes precedence over any other data that is sent to First Data.  You must send manually entered data or track data, though you can send both.  If both are sent, track data is used.  *)


tell application "AuthPayX (First Data) Demo"

(* Reads: tell application "AuthPayX (First Data) Client Demo" *)

make new sale

tell sale 1

set the card type to Debit Card

set the type to Charge

 

(* You should send a unique reference number for each transaction *)

 

set the reference number to "0412212117"

 

(* The amount is also unique per transaction...  *)

 

set the amount to "59.25"

 

(* Although the following 2 properties are required for each and every transaction, in this case they will be ignored at EFSnet as track data is present.  Track data supercedes any manual entry when it is present, in relation to the account number and expiration date.  The following 2 set lines simulate manually setting these properties...  They are not used by First Data/EFSnet for this transaction since track data is set and sent.  *)

 

set the account number to "4012888888881"

set the expiration date to "0512"

 

(* Note that the test card that was swiped is a Discover Card, not Visa.  *)

 

set the track data to "%B6011031100333334^DISCOVER TEST CARD^0806111111?

;6011031100333334=08062425242524252425?"

 

(* The following properties are optional and are not required to be sent if track data is present.    *)

 

set the street to "1234"

set the zip to "12345"

 

solicit PIN -- Ask the customer for their PIN number.

 

submit transaction

end tell

 

set x to properties of sale 1

delete sale 1

set the result to x

end tell