This is my code block to launch Clover pay screen, even when the payment is successful the result code is always RESULT_CANCELED. It should be RESULT_OK. It is failing on both the devkit and the emulator. Please help.
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);
}