Storing user signatures

The Gravity Payments EasyIntegrator API makes adding signature capture to your application easy. You do not have to interface with the signature capture device directly. The API handles all communications with the device including the card swiper and all user prompts.

The signature is returned at the end of a transaction as string along with the usual properties like card type, masked account number etc. You can then use the included functions to convert the string back into an image for printing or simply to display it.

Utilities.SaveSignatureAsBMP(Signature as String, FileName as String) as Boolean

  • Saves signature string as a bitmap Utilities.SaveSignatureAsJPG(Signature as String, FileName as String) as Boolean
  • Saves signature string as a jpeg Utilities.ShowSignature(Signature as String)
  • Displays signature in a pop-up window easyIntegrator.RequestSignature as Boolean
  • Prompts the customer to sign. There is no need to specifically prompt for a customer signature as part of the transaction process. The API handles that automatically. This function allows you to add signature capture to other parts of your application. ResultsFields.Signature as String
  • The signature is returned as part of the normal transaction process and also after RequestSignature is called. Tip: If the Signature is empty, print 2 copies of the receipt so the customer has something to sign. ResultsFields.TransactionType as String

ResultsFields.Signature Field to Store in Your Database per Invoice

  • ResultsFields.Signature
  • Your software must be able to reprint receipts including the image of the signature along with the usual elements including the AccountCardType, Amount, MaskedAccount, TransactionType, and ApprovalNumberResult.
  • The size of the string will vary depending on the complexity of the signature.
MAIP:MVIyUTNRNFA1UDVRNVA2UDZRNVE0UT
NQMlAxUDBPL04uTi1OLU0sTSxMK0sqSylKKUko
SCdHJkYlRSVEJEMkQiNBI0AjPyI9IjwiOyI6ITkhOC
E2IDUgMyAxIC8gLh8sHysfKR8oICcgJiAlICQgIyAiI
SIhISIgIx8kHiUeJh4nHigfKR8qICshLCEtIi4jLyQwJjE
nMigyKTMqNCs0LDUuNS82MTYzNzQ3Njg4ODk4
Ozg9OD84QjdEN0Y2STZLNU41UDRTM1YyWTFc
MF8vYS5kLWYsaStrK20qbilvKHAocSdxJnElcCRvJ
G4kbSRsJGskaiVpJWglZyVmJmUmZCdjJ2EoYChfKF4pXSlcKlsrWStYLFcsVi1VLVQuVC5
TL1M``wUzFSMlIzUjRSNVI2UjdSOFI5UTpRPFE9UT5RP1FAUkFSQlJDUkRSRlN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MIM0hjiJPIdDjUaQSpVPmVKeVaBYo1qkXKRepl+nX6Veo1yfW
ZZW//95KIIpjCuOL5EzlDmXPptFnUuiUqVYp16tYrJktWa1Z7RotWazZK5grlykV///kk3//4Mh
hCL//4Yqiy2QMpQ4lD6MRJxJmk2gUadSq1OsVK1UrFP//5NPhEiVQ///kBqVGpYcmx6cIZUn
oSmlLqYyqTirPK5AskO1RrhIu0q9S71MvkzBSsBIvUW4Qrk9tDr//7EwqCz//6cilCClHLQZtRi
2GLcauRy8IL4lwivGMck2zTzOQ9JI1U3YUdlU2VXbVtpW2lXYU9dQ1E7SStFHykPHP8E7u
zemMv//sCW7IbwfvB69Hr4ewR/CIcQkxyjLK84w0jbVPNlC3UfeTN9R41PmVeZX51joWedZ
5VfiVN1R2kzWR8xDzT67Ov//ri+2Kq8otiS6IsEexB7FHscgySLMJs4r0i/WNdo73kLhSONO51
PpV+ta7FvtXOpc6FrmV+NU3lLVT9lL1UbDRK9B//+7O///vjTCM8UyxzLIMsczxzXIN8c6xzz
GQMFEvUizSv//u1b//75WwVa9Vv//ECAUIhUkFygZLBswHjUiOCU8KEAqRCpGKUgrSCpI/
/8VHhgfGCT//wwu//8=

Process a transaction

The code to run a transaction is the same as with any transaction with the device activated.

Valid transaction types include:

  • CreditSale
  • CreditReturn
  • CreditAuth
  • DebitSale
  • DebitReturn
easyIntegrator.LoadSetup(StringSavedSetup)
easyIntegrator.Clear()
easyIntegrator.transFields.Cashier = "Janet"
easyIntegrator.TransFields.TransactionReference = "YourReceiptNumber"
easyIntegrator.TransFields.AmountTotal = 156.23
easyIntegrator.CreditSale()
'save to identify transaction to Void
StringSaveToVoid = easyIntegrator.resultsFields.UniqueTransID
easyIntegrator.ResultsFields.MaskedAccount
easyIntegrator.ResultsFields.AccountCardType
easyIntegrator.ResultsFields.TransactionType
easyIntegrator.ResultsFields.ApprovalNumberResult
easyIntegrator.ResultsFields.Signature
easyIntegrator.ResultsFields.BillingName '(recommended but not required)

Acct: XXXXXXXXXXXX1008
CardType: AX
Transaction Type: CreditSale
Approval Code: 034823

I AGREE TO PAY ABOVE TOTAL AMOUNT ACCORDING TO CARD ISSUER AGREEMENT

Converting signature text to an image

Use either of the following functions to write the Signature string saved in your database to an image file on the hard drive.

  • BMP – easyIntegrator.Utilities.SaveSignatureAsBMP(StringSavedSignature, StringFileName)
  • JPG – easyIntegrator.Utilities.SaveSignatureAsJPG(StringSavedSignature, StringFileName)

Displaying signature on screen

This will display the saved Signature string in a popup window.
easyIntegrator.Utilities.ShowSignature(StringSavedSignature)

Prompting for signature without processing a transaction

If you want to add the ability to capture signatures in other parts of your application use the RequestSignature function. The signature will be returned as a string in ResultsFields.Signature just like when processing a transaction.

easyIntegrator.RequestSignature
easyIntegrator.ResultsFields.Signature

Best practices

Signature Format

When using the utility SaveSignatureAsBMP or SaveSignatureAsJPG, the resultant image will be 205 pixels by 83 pixels.

Depending on the signature capture device being used, the image may contain white space. The Gravity Payments software creates a canvas of 205 x 83 pixels and places the signature within the canvas. Gravity Payments will increase or decrease the size of the original image and centers it to best fit within the canvas.

Sample signatures

The following signatures were created using a PAX MT30:

As can be seen, by the above examples, the image may vary depending on the signature. Because of this, we strongly recommend showing the entire canvas and not cropping out white space or scaling the image on a single axis (as this would create a skewed signature).

Presenting the signature

Because each signature varies, and each device has a different sized screen, there is no way to insure that a signature will fall within a specific space in the 205 x 83 Pixel canvas. Therefore we recommend (and have seen the best results with) placing the entire canvas on the screen or in print rather than cropping the canvas to fit within a specific space.

In addition, placing a border around the canvas further emphasizes that the signature was captured using an electronic means of signature capture rather than a physical means (such as a pen).