com.BTPaySDK
Class BTPay_SDK.PINPad

java.lang.Object
  extended by com.BTPaySDK.BTPay_SDK.PINPad
Enclosing class:
BTPay_SDK

public class BTPay_SDK.PINPad
extends java.lang.Object

Class PINPad includes all methods for PINPad function.


Constructor Summary
BTPay_SDK.PINPad()
           
 
Method Summary
 int CancelPin()
          Cancel enter from keypad,includes PIN,Numeric,Account,Encrypted data,Function Key and Amount.
 int getAmount(byte bFlag, byte iMax, byte iMin, int kID)
          Get amount key code from keypad, Returns value of entered amount in OnPinpadData of interface OnReceiverListener.
 int getCardAccount(byte kFlag, int iMax, int iMin, java.lang.String line1, java.lang.String line2)
          Get Card account number from keyboad,Returns value of entered account numbers in OnPinpadData of interface OnReceiverListener.
 int getEncryptedData(boolean eFlag, int iMax, int iMin, int kID)
          Get encrypted data,Returns value of entered data in OnPinpadData of interface OnReceiverListener.
 int getEncryptedPIN(byte kType, java.lang.String account, java.lang.String line1, java.lang.String line2, java.lang.String line3)
          Get Encrypted PIN from keyboard,Returns pinblock/ksn of entered PIN value in OnPinpadData of interface OnReceiverListener.
 int getFunctionKey()
          Get Function Key from keyboard, Returns value of pressed key in OnPinpadData of interface OnReceiverListener.
 int getNumeric(boolean m_eFlag, byte m_iMax, byte m_iMin, int kID)
          Get numeric key code from keypad,Returns value of entered numeric key in OnPinpadData of interface OnReceiverListener.
.
 int getPinLength(byte[] lenBuf)
          Get Encrypted PIN length.
 int getPINpadStatus(byte[] m_Status)
          Get PINPad status.
 int setPinLength(int m_iMin, int m_iMax)
          Set Encrypted PIN length.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BTPay_SDK.PINPad

public BTPay_SDK.PINPad()
Method Detail

getPINpadStatus

public int getPINpadStatus(byte[] m_Status)
Get PINPad status.

Parameters:
m_Status - Pad status,one byte.
1. 0x01:PINPad is inactivate ;
2. 0x02:PINPad has been activated, but Public Key is not loaded;
3. 0x03:Public key has been loaded, but Firmware Key, Numeric Key and Check Value is not loaded;
4. 0x10:PINPad normal work status;
5. 0x30:PINPad suspend status.
Returns:
success or error code.
See Also:
BTPay_ErrorCode

CancelPin

public int CancelPin()
Cancel enter from keypad,includes PIN,Numeric,Account,Encrypted data,Function Key and Amount.

Returns:
success or error code.
See Also:
BTPay_ErrorCode

getFunctionKey

public int getFunctionKey()
Get Function Key from keyboard, Returns value of pressed key in OnPinpadData of interface OnReceiverListener.

Returns:
success or error code.
See Also:
BTPay_ErrorCode

getEncryptedPIN

public int getEncryptedPIN(byte kType,
                           java.lang.String account,
                           java.lang.String line1,
                           java.lang.String line2,
                           java.lang.String line3)
Get Encrypted PIN from keyboard,Returns pinblock/ksn of entered PIN value in OnPinpadData of interface OnReceiverListener.

Parameters:
kType - for the key type.
1. 0x00~0x01:External Account Keys,0x00:MKSK-TDES;0x01:DUKPT-TDES;
2. 0x20~0x21:Internal Account Keys,0x20:MKSK-TDES;0x21:DUKPT-TDES;
account - for external account,ASCII code(0x30~0x39),the account will not exist if the m_kType is 0x10~0x11. the length must be 13~20.
line1 - Display line 1, up to 12 characters.
line2 - Display line 2, up to 16 characters.
line3 - Display line 3, up to 16 characters.
Returns:
success or error code.
See Also:
BTPay_ErrorCode

getNumeric

public int getNumeric(boolean m_eFlag,
                      byte m_iMax,
                      byte m_iMin,
                      int kID)
Get numeric key code from keypad,Returns value of entered numeric key in OnPinpadData of interface OnReceiverListener.
.

Parameters:
m_eFlag - Control whether the numeric key need to display in plain text,one byte.
1. false:display numeric for numeric key on LCD.
2. true:Display "*" for numeric key on LCD.
m_iMax - The max length for numeric,max length can not beyond 16.
m_iMin - The minimum length for numeric, minimum length can not less than 1.
kID - the RSA encryption data ID.every ID for a encryption data of characters and language.
Returns:
success or error code.
See Also:
BTPay_ErrorCode

getCardAccount

public int getCardAccount(byte kFlag,
                          int iMax,
                          int iMin,
                          java.lang.String line1,
                          java.lang.String line2)
Get Card account number from keyboad,Returns value of entered account numbers in OnPinpadData of interface OnReceiverListener.

Parameters:
kFlag - for type.
reserved;
iMax - for max length of card account to be got from keypad, no more than 20.
iMin - for min length of card account to be got from keypad, no less than 12.
line1 - Display line 1, up to 12 characters.
line2 - Display line 2, up to 16 characters.
Returns:
success or error code.
See Also:
BTPay_ErrorCode

getEncryptedData

public int getEncryptedData(boolean eFlag,
                            int iMax,
                            int iMin,
                            int kID)
Get encrypted data,Returns value of entered data in OnPinpadData of interface OnReceiverListener.

Parameters:
eFlag - 1. false:not the last package; 2. true:the last package.
iMax - The max length for numeric,max length can not beyond 16.
iMin - The minimum length for numeric, minimum length can not less than 1.
kID - the RSA encryption data ID.every ID for a encryption data of characters and language.
Returns:
success or error code.
See Also:
BTPay_ErrorCode

getAmount

public int getAmount(byte bFlag,
                     byte iMax,
                     byte iMin,
                     int kID)
Get amount key code from keypad, Returns value of entered amount in OnPinpadData of interface OnReceiverListener.

Parameters:
bFlag - RFU
iMax - The max length for amount,max length can not beyond 15.
iMin - The minimum length for amount, minimum length can not less than 0.
kID - the RSA encryption data ID.every ID for a encryption data of characters and language.
Returns:
success or error code.
See Also:
BTPay_ErrorCode

getPinLength

public int getPinLength(byte[] lenBuf)
Get Encrypted PIN length.

Parameters:
lenBuf - lenBuf[0]is the max length for encrypted PIN and lenBuf[1] is the minimum length for encrypted PIN.
Returns:
success or error code.
See Also:
BTPay_ErrorCode

setPinLength

public int setPinLength(int m_iMin,
                        int m_iMax)
Set Encrypted PIN length. * @param m_iMin The minimum length for encrypted PIN,minimum length can not less than 4.

Parameters:
m_iMax - The max length for encrypted PIN, max length can not beyond 12.
Returns:
success or error code.
See Also:
BTPay_ErrorCode