handpoint / hp-android-sdk

The Handpoint sdk for Android
0 stars 0 forks source link

error: cannot find symbol variable status #2

Closed JohnnySheffield closed 8 years ago

JohnnySheffield commented 8 years ago

When i try something like this:

@Override
 public void currentTransactionStatus(StatusInfo statusInfo, Device device) {
if (statusInfo.getStatus() == status.WaitingForCard) {
    Log.d(TAG,"WaitingForCard");
}
 }

it results with the following error:

HandPointPlugin.java:481: error: cannot find symbol
if (statusInfo.getStatus() == status.WaitingForCard) {

  symbol:   variable status
  location: class HandPointPlugin

i tried with Status.WaitingForCard,Status.WAITINGFORCARD - no luck.

Not sure am i doing something wrong - but similar works flawlessly when trying to access financial status eg.:

//THIS WORKS
@Override
 public void endOfTransaction(TransactionResult transactionResult, Device device) {
if (transactionResult.getFinStatus() == FinancialStatus.AUTHORISED) {
   Log.d(TAG, "TRAN AUTHORISED");
}
}
juanfuria commented 8 years ago

Is it maybe a typo in status.WaitingForCard where status should have capital S?

JohnnySheffield commented 8 years ago

Unfortunately, nope:

HandPointPlugin.java:481: error: cannot find symbol
if (statusInfo.getStatus() == Status.WaitingForCard) {

  symbol:   variable Status
  location: class HandPointPlugin

I'm working on a Cordova/Ionic plugin, so it might be some Cordova issue, but this works: transactionResult.getFinStatus() == FinancialStatus.AUTHORISED, so it seems it's on the HandPoint side?

I'm working around with statusInfo.getMessage() and then comparing strings, so it's not a show stopper, but wanted to report nevertheless.

juanfuria commented 8 years ago

Can you try StatusInfo.Status.WaitingForCard ?

JohnnySheffield commented 8 years ago

:100: :+1:

StatusInfo.Status.WaitingForCard works!

You guys are superb, thanks so much! Closing.