ACTION_CLOVER_PAY action always return RESULT_CANCELLED
vuleanh opened this issue · comments
Anh Vu commented
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);
}