Direct Payment Integrator V6 - Online Help
Direct Payment Integrator V6
Questions / Feedback?

Authorize Method

Authorizes a Canadian debit card transaction.

Syntax

ptechcanadiandebit.authorize([callback])

Callback

The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).

The callback for this method is defined as:

function(err){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'err' has 2 properties which hold detailed information:

err.code
err.message

Remarks

This method sends a Canadian (Interac) debit card transaction to the Paymentech Server The transaction sent is based on the InteracTransactionType. Authorize can only be used to send customer-initiated transactions that require that the customer physically enter his PIN on the PIN pad device - meaning Sales, Returns, and Voids. Administrative transactions are handled via the RequestCurrentKeys, ReversalAdvice, and MACReversal methods.

An example sale is shown below:


  class.MerchantNumber = "yourMerchantNumber"  
  class.TerminalNumber = "100"
  class.ClientNumber = "0002"
  class.UserId = "yourUserId"
  class.Password = "yourPassword"
  class.SequenceNumber = 2
  class.TransactionAmount = "1.00" 
  class.PinPadSerialNumber = "30700015P3600000" ' from label on back of PIN pad
  class.InteracTransactionType = ittSale 
  class.AccountType = acctChecking       
  class.CardTrack2Data = "9999999800002773=05121015432112345678" ' from card reader
  class.EncryptedPIN = "FFFFFFFFFFFFFFFF" ' from the PIN pad 

  ' Now use the PIN pad to MAC the value returned from GetRequestDataToMAC 
  ' and then set MACValue with the results
  class.MACValue = "FFFFFFFF"             

  class.Authorize()
If the ResponseCode is "A", load the PIN pad device with the ResponsePINKey and ResponseMACKey, and then validate the ResponseMACValue against the value returned by GetResponseDataToMAC using the PIN pad. If the MAC does not validate, call MACReversal to reverse the transaction.

 
 
Copyright (c) 2017 /n software inc. - All rights reserved.
Build 6.0.6240.0