Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ACTION_CLOVER_PAY action always return RESULT_CANCELLED #96

Open
vuleanh opened this issue Aug 15, 2023 · 0 comments
Open

ACTION_CLOVER_PAY action always return RESULT_CANCELLED #96

vuleanh opened this issue Aug 15, 2023 · 0 comments

Comments

@vuleanh
Copy link

vuleanh commented Aug 15, 2023

This is my code block to launch Clover pay screen, but even when the payment was successful but the result code is always RESULT_CANCELED. It should be RESULT_OK. Please help to check

ActivityResultLauncher<Intent> launchCloverPay = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new ActivityResultCallback<ActivityResult>() {
        @Override
        public void onActivityResult(ActivityResult result) {
           // result.getResultCode() is always RESULT_CANCELED
        }
    });


private void startRegisterIntent(String orderId) {
        Intent intent = new Intent(Intents.ACTION_CLOVER_PAY);
        intent.putExtra(Intents.EXTRA_CLOVER_ORDER_ID, orderId);
        intent.putExtra(Intents.EXTRA_OBEY_AUTO_LOGOUT, false);
        launchCloverPay.launch(intent);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant