public class WePay
extends java.lang.Object
Constructor and Description |
---|
WePay(Config config)
Instantiates a new WePay instance.
|
Modifier and Type | Method and Description |
---|---|
void |
calibrateCardReader(CalibrationHandler calibrationHandler)
Use this method to try calibrating a charged card reader that doesn't seem to work on a device.
|
void |
forgetRememberedCardReader()
Use this method to clear the name of the most recently used card reader.
|
void |
getCardReaderBatteryLevel(CardReaderHandler cardReaderHandler,
BatteryLevelHandler batteryLevelHandler)
Use this method to get the current battery level of the card reader.
|
java.lang.String |
getRememberedCardReader()
Use this method to get the name of the most recently used card reader.
|
void |
startTransactionForReading(CardReaderHandler cardReaderHandler)
Use this method if you just want to read non-sensitive data from the card, without actually charging the card.
|
void |
startTransactionForTokenizing(CardReaderHandler cardReaderHandler,
TokenizationHandler tokenizationHandler,
AuthorizationHandler authorizationHandler)
Use this method if you want to tokenize the card info.
|
void |
stopCardReader()
Stops the reader.
|
void |
storeSignatureImage(android.graphics.Bitmap image,
java.lang.String checkoutId,
CheckoutHandler checkoutHandler)
Use this method to store a signature image associated with a checkout id on WePay's servers.
|
void |
tokenize(PaymentInfo paymentInfo,
TokenizationHandler tokenizationHandler)
Use this method to tokenize any PaymentInfo object, such as one representing credit card info obtained manually.
|
public WePay(Config config)
config
- the WePay configpublic void startTransactionForReading(CardReaderHandler cardReaderHandler)
cardReaderHandler
- the card reader handlerpublic void startTransactionForTokenizing(CardReaderHandler cardReaderHandler, TokenizationHandler tokenizationHandler, AuthorizationHandler authorizationHandler)
cardReaderHandler
- the card reader handlertokenizationHandler
- the tokenization handlerauthorizationHandler
- the authorization handlerpublic void stopCardReader()
public void calibrateCardReader(CalibrationHandler calibrationHandler)
calibrationHandler
- the calibration handlerpublic void getCardReaderBatteryLevel(CardReaderHandler cardReaderHandler, BatteryLevelHandler batteryLevelHandler)
cardReaderHandler
- the card reader handlerbatteryLevelHandler
- the battery level handlerpublic void tokenize(PaymentInfo paymentInfo, TokenizationHandler tokenizationHandler)
paymentInfo
- the payment info to be tokenizedtokenizationHandler
- the tokenization handlerpublic void storeSignatureImage(android.graphics.Bitmap image, java.lang.String checkoutId, CheckoutHandler checkoutHandler)
image
- the signature image to be stored.checkoutId
- the checkout id associated with the signaturecheckoutHandler
- the signature handlerpublic java.lang.String getRememberedCardReader()
public void forgetRememberedCardReader()