Android SDK reader Payment Failed

I am using the reader sdk in my app.

We are passing the invalid zip code . When the payment is failed , it does not goes to the onCheckoutResult method.

Next time, when we try to do the payment, then it goes to this method automatically and display the message “card_transaction_already_in_progress” and same message is appear untill we did not kill the app.

Can you please guide me how to fix this issue?

I have implement the below code

CheckoutManager checkoutManager = ReaderSdk.checkoutManager();
checkoutCallbackRef = checkoutManager.addCheckoutActivityCallback(this::onCheckoutResult);

:wave: What version of the SDK are you seeing this with? :slightly_smiling_face:

I have tried with 1.6.1 and also check with 1.5.1
but facing the same issue

Hi

I am waiting for your reply. We are stucked it.
clinet is very disappointed.

What’s your application Id, location_id and approximate time this happened? :slightly_smiling_face:

Hi
Appliction_id :
sq0idp-USfqSgrEu8pNsDu2be21Ww

Hi
I am waiting for your reply.

What’s the location_id, and the approximate time this happened? :slightly_smiling_face:

Hi

Could you please explain the location_id ?

The Square location_id that the payments would got to. :slightly_smiling_face:

Hi Bran

If you dont mind , How can i get the location_id?

I have write this code

CheckoutManager checkoutManager = ReaderSdk.checkoutManager();
CheckoutParameters.Builder params = CheckoutParameters.newBuilder(checkoutAmount);
params.additionalPaymentTypes(AdditionalPaymentType.MANUAL_CARD_ENTRY);
//params.note(“Hello :credit_card: :moneybag: World!”);
params.skipReceipt(true);
params.noTip();
params.collectSignature(false);
params.allowSplitTender(false);
params.noNote();
checkoutManager.startCheckoutActivity(this, params.build());

SQUARE_READER_SDK_APPLICATION_ID=sq0idp-USfqSgrEu8pNsDu2be21Ww

The Repository Password from the Reader SDK tab in the Square Application Control Panel.

SQUARE_READER_SDK_REPOSITORY_PASSWORD=hmiul6s6vilxzkn4wlvw5pzgtwoah7f65qrxkrbpgobpkq26uctq

Also

I am sharing the client email id

phil@kicmail.com that have used for payment account setup

Hi Bran

Are you checking the issue?

The location_id is what’s use when calling MobileAuthorization in the body of the request. :slightly_smiling_face:

Hi Bran

I am using the below code for authorization

//Automatic Authorization
AuthorizationManager authManager = ReaderSdk.authorizationManager();
authorizeCallbackRef =
authManager.addAuthorizeCallback(this::onAuthorizeResult );

private void onAuthorizeResult(Result<Location,
ResultError> result) {
if (result.isSuccess()) {
goToCheckoutActivity();
} else {
ResultError error = result.getError();
switch (error.getCode()) {
case NO_NETWORK:
//showDialog(getString(R.string.no_network), error.getMessage());
//noNetwork
break;
case USAGE_ERROR:
String dialogMessage = error.getMessage();
if (BuildConfig.DEBUG) {
dialogMessage += "\n\nDebug Message: " + error.getDebugMessage();
//there was an error
//Log.d(“Auth”, error.getDebugCode() + ", " + error.getDebugMessage());
}
//showDialog(getString(R.string.error_dialog_title), dialogMessage);
//error
break;
}
}
}

Do you have the access token for the seller that’s running into this issue? If so you can call ListLocations to get the location_id. :slightly_smiling_face:

Hi Bryan

We don’t have access token

Has this seller completed a payment previously? If so do you have any of the following:

  • payment_id
  • transaction_id

Or any unique ID that we can use to identify the sellers account and Square location within that account? :slightly_smiling_face: