4D Payments SDK 2016 .NET Edition

Questions / Feedback?

Authorize Method

Authorizes a Canadian debit card transaction.


public void Authorize();
Public Sub Authorize()


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:

  component.MerchantNumber = "yourMerchantNumber"  
  component.TerminalNumber = "100"
  component.ClientNumber = "0002"
  component.UserId = "yourUserId"
  component.Password = "yourPassword"
  component.SequenceNumber = 2
  component.TransactionAmount = "1.00" 
  component.PinPadSerialNumber = "30700015P3600000" ' from label on back of PIN pad
  component.InteracTransactionType = ittSale 
  component.AccountType = acctChecking       
  component.CardTrack2Data = "9999999800002773=05121015432112345678" ' from card reader
  component.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
  component.MACValue = "FFFFFFFF"             

If the Code is "A", load the PIN pad device with the PINKey and MACKey, and then validate the MACValue against the value returned by GetResponseDataToMAC using the PIN pad. If the MAC does not validate, call MACReversal to reverse the transaction.

.NET Standard Notes

To call this method in an asynchronous manner call AuthorizeAsync instead. When the method completes (or an error is encountered) the AuthorizeCompleted event will fire.

Copyright (c) 2021 4D Payments Inc. - All rights reserved.
4D Payments SDK 2016 .NET Edition - Version 16.0 [Build 7809]