PiLink 1.0.3
Object class null values were causing a bug. It's fixed in the latest version.
See the version list below for details.
dotnet add package PiLink --version 1.0.3
NuGet\Install-Package PiLink -Version 1.0.3
<PackageReference Include="PiLink" Version="1.0.3" />
paket add PiLink --version 1.0.3
#r "nuget: PiLink, 1.0.3"
// Install PiLink as a Cake Addin #addin nuget:?package=PiLink&version=1.0.3 // Install PiLink as a Cake Tool #tool nuget:?package=PiLink&version=1.0.3
Payment Innovators
Pi Link DLL
Copyright 2020-2022
Pi Link DLL
Pi Link DLL provides a library to integrate with Pi Plus. Pi Link DLL allows a simple implementation of Pi Plus in card-present and card-not-present environments with a library call.
Anatomy:
PiLink contains a class called PiPlusLink, which in turn includes all objects, methods and classes you will need.
Methods:
LaunchPiPlus Method
This public method instantiates all objects and classes.
Transaction Methods
These are the accepted transaction types you can call from PiLink.dll:
creditsale creditauth creditreturn gettoken creditcapture creditvoid creditadjust
The followings are public methods to perform transactions:
CreditSale() : Perform a credit sale transaction
CreditAuth() : Performs a credit auth transaction
CreditReturn() : Performs a credit return transaction
CreditVoid() : Performs a credit void transaction
CreditCapture() : Performs a credit capture transaction on an auth
CreditAdjust() : Performs a credit adjust transaction
GetToken() : Performs a request token transaction
Classes:
The following classes represent objects that store and return field values in requests and responses:
Transaction Fields (Request): Class name: TransFields
Field Description
Account Valid Pi Account number
Serial Device Serial Number
Ticket Ticket Id,or Invoice Id
Token Valid card token
Ptk Pi Transaction Key
Zip Zip Code
Address Street Address
Userid User or Clerk Id
Email Email address for receipt
Format Output file format. xml or txt ONLY
Amount Transaction amount
TipReq Send tip amount along with the sales amount.
Only 0 or 1. Default = 0
Tip Send tip amount along with the sales amount.
Path Path to where you want to save the response file
FirstName Customer first name
LastName Customer last name
Executable Path to PiPlus executable
Receipt receipt request. True or False
ShowUI Show or Hide PiPlus Window. True or False
AutoRun Automatically run the transaction on the
terminal. True or False
Response fields are grouped into three separate groups:
- TransactionFields
- EMVFields
- ReceiptFields
Transaction Details (Response)
Class name: TransactionFields
Field Description
TransactionResult Returns Transaction result true or false
TransactionType Returns the transaction type
Description Returns the response message
ApprovalCode Returns the transaction approval code
CardHolder Returns the cardholder name (name on card)
LastFour Returns the last four digits the card
Expiration Returns the card’s expiration date (mm/yy)
Ptk Returns Pi Transaction Key
CardType Returns the card type (VISA, MASTERCARD...)
Amount Returns the requested amount of the transaction
ApprovedAmount Returns the approved amount by the processor
TipAmount Returns tip amount
Swiped Returns card-present or card-Not-Present status
Token Returns card token generated by the processor
Surcharge Returns Transaction surcharge amount. If set to
apply on the terminal
AVSResult Address Verification results
Receipt Fields (Response)
Class name: ReceiptFields
Field Description
ReceiptAC Application Cryptogram
ReceiptAID Application Identifier
ReceiptAL Application Label
ReceiptAPN Application Preferred Name
ReceiptATC Application Transaction Counter
ReceiptApprovalCode Approval Code
ReceiptResponseCode Authorization Response Code
ReceiptCardNumber Card Number
ReceiptCardType Card Type (Visa, Mastercard...)
ReceiptUser User or Clerk
ReceiptEntry Entry Legend
ReceiptMethod Entry Method
ReceiptMerchantId Merchant ID
ReceiptPinText Pin Verification Text
ReceiptNumber Receipt Number
ReceiptSalesTax Receipt Sales Tax
ReceiptSignature Receipt Signature text
ReceiptSubTotal Sub Total
ReceiptTVR Terminal Verification Result
ReceiptTip Tip Amount
ReceiptTotalAmount Total Amount
ReceiptDateTime Receipt Date/Time
ReceiptTransactionId Transaction Id
ReceiptTransactionRef Transaction Reference Number
ReceiptTransactionStatus Transaction Status Information
ReceiptTransactionType Transaction Type
ReceiptVerbiage Receipt Verbiage
EMV Fields (Response)
Class name: EMVFields
Field Description
TC Transaction Certificate
TVR Transaction Verification Result
AID Application Identification
TSI Transaction Status Information
ATC Application Transaction Counter
APPLAB Application Laboratory
APPPN Application Preferred Name
IAD Issuer Application Data
ARC Authorization Response Cryptogram
CID Cryptogram Information Data
Installation
Pi Link DLL requires .Net Framework version 4.7 or higher. This guide explains adding the Pi Link DLL to your .Net application in the Visual Studio environment.
- Download the Pi Link from our website, and copy it to a folder in your development system.
- In VS, open your project, and in the Solution Explorer, right-click on the project name.
- Select Add, and then from the next menu options, select Existing item.
- Browse to the location where you saved the PiLink.dll file. Select the file and click on the Add button.
- After the file is added to your project, select it, and go to its properties windows.
- In the Copy to Output Directory property, select the Copy always. That's it!
If your application uses a setup program, make sure to include the PiLink.dll to your setup application. In your code, you must name the DLL and request its import:
using PiLink;
Usage:
link contains a class called PiPlusLink, which in turn includes all objects, methods, and classes you will need. Start by creating an instance of PiPlusLink in your code:
PiPlusLink myLink = new PiPlusLink();
Call the LaunchPiPlus() Public method to set everything up:
myLink.LaunchPiPlus();
Next, you will need to build a request object. The following code shows how to build a request for a credit sale transaction:
myLink.transFields.Amount = Convert.ToDouble(textAmount); myLink.transFields.Ticket = textTicket ; myLink.transFields.Ptk = textPTK ; myLink.transFields.Address = textAddress ; myLink.transFields.Email = textEmail ; myLink.transFields.Executable = textExe ; myLink.transFields.FirstName = textFname ; myLink.transFields.LastName = textLname ; myLink.transFields.Path = textPath ; myLink.transFields.Serial = textSerial ; myLink.transFields.Token = textToken ; myLink.transFields.Userid = textUser ; myLink.transFields.Zip = textZip ;
Let’s call the credit sale method:
myLink.CreditSale();
This method performs the credit sale transaction and returns a Boolean value that indicates whether the transaction succeeded or not.
Assuming that you have a control to show the transaction results, the following code snippet will provide you with the transaction results:
"Transaction Type: " + myLink.transactionDetails.TransactionType "Transaction Result: " + myLink.transactionDetails.TransactionResult "Amount: " + myLink.transactionDetails.Amount "Approved Amount: " + myLink.transactionDetails.ApprovedAmount "Tip Amount: " + myLink.transactionDetails.TipAmount "Approval Code: " + myLink.transactionDetails.ApprovalCode "Token: " + myLink.transactionDetails.Token "Card Type: " + myLink.transactionDetails.CardType "Card Holder: " + myLink.transactionDetails.CardHolder "Description: " + myLink.transactionDetails.Description "PTK: " + myLink.transactionDetails.Ptk "Last four: " + myLink.transactionDetails.LastFour "Expiration: " + myLink.transactionDetails.Expiration "Surcharge: " + myLink.transactionDetails.Surcharge "Avs Result: " + myLink.transactionDetails.AvsResult
In addition, you can call myLink.receiptDetails to extract response receipt fields and call myLink.emvDetails to get EMV fields from the response.
For more information, please visit our website at paymentinnovators.com or contact us :
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.7.2
- Newtonsoft.Json (>= 13.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
1.0.25 | 73 | 11/17/2024 | |
1.0.24 | 70 | 11/14/2024 | |
1.0.23 | 82 | 11/14/2024 | |
1.0.22 | 78 | 11/14/2024 | |
1.0.21 | 75 | 11/14/2024 | |
1.0.20 | 77 | 11/14/2024 | |
1.0.18 | 251 | 11/28/2023 | |
1.0.17 | 137 | 11/28/2023 | |
1.0.12 | 238 | 4/5/2023 | |
1.0.11 | 326 | 11/8/2022 | |
1.0.10 | 382 | 5/29/2022 | |
1.0.9 | 375 | 5/19/2022 | |
1.0.7 | 393 | 5/10/2022 | |
1.0.6 | 396 | 5/10/2022 | |
1.0.5 | 422 | 4/6/2022 | |
1.0.4 | 411 | 4/6/2022 | |
1.0.3 | 431 | 4/6/2022 | |
1.0.2 | 470 | 4/5/2022 |
Latest version with updates for Pi Plus WPF