Template:Using Card Readers

From 360Works Product Documentation Wiki
(Difference between revisions)
Jump to: navigation, search
(Second, determine your Track 1 and 2 formats)
 
(2 intermediate revisions by one user not shown)
Line 7: Line 7:
 
==== Second, determine your Track 1 and 2 formats ====
 
==== Second, determine your Track 1 and 2 formats ====
  
To process a payment using card present accounts, you'll need the information in the magnetic stripe of the credit card. In Plastic, this information may obtained from a keyboard-emulating card reader, which essentially dumps text into a text field when the card is swiped, as if the text had been entered via a keyboard.
+
To process a payment using card present accounts, you'll need the information in the magnetic stripe of the credit card. In Plastic, this information may be obtained from a keyboard-emulating card reader, which essentially dumps text into a text field when the card is swiped, as if the text had been entered via a keyboard.
  
 
While some card readers will contain software that parses that raw data from the magnetic stripe before dumping it to a field, this documentation refers to those keyboard-emulating readers that dump raw data. Raw swipe data contains two delimited pieces of information: Track 1 and Track 2.
 
While some card readers will contain software that parses that raw data from the magnetic stripe before dumping it to a field, this documentation refers to those keyboard-emulating readers that dump raw data. Raw swipe data contains two delimited pieces of information: Track 1 and Track 2.
Line 23: Line 23:
 
<pre>;1234123412341234=11121010000000000111?</pre>
 
<pre>;1234123412341234=11121010000000000111?</pre>
  
See http://www.exeba.com/comm40/creditcardformat.htm for more information about data formats with Track 1 and 2.
+
See http://www.exeba.com/comm40/creditcardformat.htm for more information about Track 1 and Track 2.
  
 
'''Note''': As a convenience, the Plastic function CCTrackData will parse either Track 1 or Track 2 data as a return-separated string containing account code, cardholder name, expiration date (YYMM), and optional discretionary data.
 
'''Note''': As a convenience, the Plastic function CCTrackData will parse either Track 1 or Track 2 data as a return-separated string containing account code, cardholder name, expiration date (YYMM), and optional discretionary data.
Line 29: Line 29:
 
==== Process the payment with CCProcessPayment ====
 
==== Process the payment with CCProcessPayment ====
  
Finally, call CCProcessPayment and pass in track data. When processing a card-present transaction, a gateway will typically require you to pass in either the full raw swipe, Track 1 or Track 2. In most cases, you do not need to pass in card numbers and expiration dates.
+
Finally, call CCProcessPayment and pass in raw swipe or track data. When processing a card-present transaction, a gateway will typically require you to pass in either the full raw swipe, Track 1 or Track 2. In most cases, you do not need to pass in card numbers and expiration dates.

Latest revision as of 15:44, 22 July 2019

Certain types of merchant accounts are set up for reading physical card swipes, instead of taking orders via the web or over the phone. If you account is a card present account, like a retail store, then you will need to also send the data included on the magnetic stripe of a card. It is important to pass in swipe data if you have it, as your transaction may be downgraded to a more expensive rate if you simply type a card number.

[edit] First, set the gateway with card present parameter

To process a card present transaction, first call CCSetGateway with the parameter cardPresent=true. If CCSetGateway returns a 1, then you can perform a card present transaction.

[edit] Second, determine your Track 1 and 2 formats

To process a payment using card present accounts, you'll need the information in the magnetic stripe of the credit card. In Plastic, this information may be obtained from a keyboard-emulating card reader, which essentially dumps text into a text field when the card is swiped, as if the text had been entered via a keyboard.

While some card readers will contain software that parses that raw data from the magnetic stripe before dumping it to a field, this documentation refers to those keyboard-emulating readers that dump raw data. Raw swipe data contains two delimited pieces of information: Track 1 and Track 2.

Raw data would look something like this:

%B1234123412341234^LAST/FIRSTM^1112101000000000011100111000000?;1234123412341234=11121010000000000111?

Track 1 is delimited by a percent symbol and a question mark, so in the previous example Track 1 would be:

%B1234123412341234^LAST/FIRST/^1112101000000000011100111000000?

Track 2 is delimited by a semicolon and question mark, so in the previous example Track 2 would be:

;1234123412341234=11121010000000000111?

See http://www.exeba.com/comm40/creditcardformat.htm for more information about Track 1 and Track 2.

Note: As a convenience, the Plastic function CCTrackData will parse either Track 1 or Track 2 data as a return-separated string containing account code, cardholder name, expiration date (YYMM), and optional discretionary data.

[edit] Process the payment with CCProcessPayment

Finally, call CCProcessPayment and pass in raw swipe or track data. When processing a card-present transaction, a gateway will typically require you to pass in either the full raw swipe, Track 1 or Track 2. In most cases, you do not need to pass in card numbers and expiration dates.

Personal tools
Namespaces

Variants
Actions
Plug-in Products
Other Products
Navigation
Toolbox