我在onActivityResult()方法中得到了resultCode = Result_Canceled。我怎么知道原因。
protected function getInlineParams(): array
{
$stream = $this->parser->getStream();
$params = [];
while (!$stream->test(\Twig_Token::BLOCK_END_TYPE)) {
$params[] = $this->parser->getStream()->next()->getValue();
}
$stream->expect(\Twig_Token::BLOCK_END_TYPE);
return $params;
}
输出:
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data != null) {
TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager.INTENT_EXTRA_TRANSACTION_RESPONSE);
ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);
if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {
Log.e("TAG", "tran "+payuResponse+"---"+ merchantResponse);
} else if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_CANCELED) {
Toast.makeText(this, "Payment Cancelled ", Toast.LENGTH_SHORT).show();
}
}
}