question

sonu avatar image
sonu asked

Manual Payment through the clover go sdk (new) getting error


D/OnPaymentError: onNext: OnPaymentError(error=CloverTransactionError(code=HAS_INFLIGHT_REQUEST, message=Card reader request is already inflight. Please cancel the existing request before starting another one, severity=ERROR) below is code mentation

 if(GoSdkManager.getGoSdk(this).isLoggedIn()){
     KeyedInCard keyedInCard = new KeyedInCard(
             "4242424242424242",
             "424242",
             "4242",
             false,
             CardType.VISA,
             "1234",
             "1234",
             "Clover Go St",
             "12345"
     );


     PayRequest request = new PayRequest(
             1000,
             true,
             true,
             IdUtils.getReferanceIDs(),
             IdUtils.getNextId(),
             100L,
             100L,keyedInCard

     );
     GoSdkManager.getGoSdk(this).chargeCardReader(
             ManualPayment.this,
             request,
             new GoSdkCallback<ChargeCardReaderState>() {
                 @Override
                 public void onNext(ChargeCardReaderState chargeCardReaderState) {
                     if (chargeCardReaderState instanceof ChargeCardReaderState.OnReaderPaymentProgress) {
                         Log.d("OnReaderPaymentProgress", "onNext: "+chargeCardReaderState);

                     } else if (chargeCardReaderState instanceof ChargeCardReaderState.OnPaymentComplete) {
                         Log.d("OnPaymentComplete", "onNext: "+chargeCardReaderState);

                     } else if (chargeCardReaderState instanceof ChargeCardReaderState.OnPaymentError) {
                         Log.d("OnPaymentError", "onNext: "+chargeCardReaderState);
                     } else {
                         Log.d("OnPaymentError", "onNext: "+"unexpected");

                     }
                 }

                 @Override
                 public void onError(@NonNull Throwable e) {
                     Log.d("OnPaymentError", "Throwable: "+e.getMessage());

                 }
             }
     );
}
Clover Android SDK
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community