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

EncryptedPIN Property

DUKPT DES encrypted pin block, retrieved from a PIN pad.

Syntax

 fdmsbenefit.getEncryptedPIN([callback])
 fdmsbenefit.setEncryptedPIN( encryptedPIN, [callback])

Default Value

""


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 the getEncryptedPIN([callback]) method is defined as:

function(err, data){ }

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

'data' is the value returned by the method.

The callback for the setEncryptedPIN([callback]) 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

A 16-byte encrypted PIN and associated KSN are required for all debit Sale and Credit transactions. These values must be retrieved from a certified DUKPT DES pin pad device.

The EncryptedPIN and KSN are not required for ReverseLastTransaction transactions.

The following code snippet shows how to send a simple debit sale transaction with all required properties.

  
  FDMSDebit1.MerchantNumber = "YOURNUMBER"
  FDMSDebit1.MerchantTerminalNumber = "YOURTERMID"
  FDMSDebit1.DatawireId = "YOURDID"
  FDMSDebit1.URL = "https://staging1.datawire.net/sd"; // test server
  FDMSDebit1.TransactionNumber = 4;
  FDMSDebit1.TransactionAmount = "100";
  FDMSDebit1.Card.EntryDataSource = edsTrack2;
  FDMSDebit1.Card.MagneticStripe = "9876543210012341234=12041200000001"; // (pin 1234)
  FDMSDebit1.EncryptedPIN = "0082943935BA205D";
  FDMSDebit1.KSN = "8765432109003000012";
  FDMSDebit1.ReceiptNumber = "123456";
  FDMSDebit1.Sale();  
If the transaction is successful, the ResponseApprovalCode will start with "AP", and the ResponseCaptureFlag will be true. Even though debit transactions are on-line transactions, it is still necessary to settle them with First Data. The following example shows how to send a simple settlement. The first thing to do is to set up the FDMSSettle class's properties with the same information used for the debit sale:
  FDMSSettle1.MerchantNumber = FDMSDebit1.MerchantNumber;
  FDMSSettle1.MerchantTerminalNumber = FDMSDebit1.MerchantTerminalNumber;
  FDMSSettle1.DatawireId = FDMSDebit1.DatawireId;
  FDMSSettle1.URL = FDMSDebit1.URL;
  FDMSSettle1.MerchantServiceNumber = "8001234567";
  FDMSSettle1.BatchSequenceNumber = "101";  
  FDMSSettle1.IndustryType = itRetail;
Then all that needs to be done is add the detail record from the debit sale to the settlement component and call the SendSettlement method.
  FDMSSettle1.DetailRecords.Add(new FDMSRecordType(FDMSDebit1.GetDetailAggregate());
  FDMSSettle1.SendSettlement();
Note that in a live system you would store detail records in a database and send multiple records in a single batch at the end of the business day.

Data Type

String

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