Hi all ,
I am trying to wrap rave on their documentation the result is passed via onactivityresult
I tried both methods described in this thread https://www.b4x.com/android/forum/threads/java-guide-using-onactivityresult.7297/ but could not get the result
I am getting onActivityResult: wi is null
I am trying to wrap rave on their documentation the result is passed via onactivityresult
I tried both methods described in this thread https://www.b4x.com/android/forum/threads/java-guide-using-onactivityresult.7297/ but could not get the result
I am getting onActivityResult: wi is null
In the calling activity, override the onActivityResult method to receive the payment response as shown below
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
/*
* We advise you to do a further verification of transaction's details on your server to be
* sure everything checks out before providing service or goods.
*/
if (requestCode == RaveConstants.RAVE_REQUEST_CODE && data != null) {
String message = data.getStringExtra("response");
if (resultCode == RavePayActivity.RESULT_SUCCESS) {
Toast.makeText(this, "SUCCESS " + message, Toast.LENGTH_SHORT).show();
}
else if (resultCode == RavePayActivity.RESULT_ERROR) {
Toast.makeText(this, "ERROR " + message, Toast.LENGTH_SHORT).show();
}
else if (resultCode == RavePayActivity.RESULT_CANCELLED) {
Toast.makeText(this, "CANCELLED " + message, Toast.LENGTH_SHORT).show();
}
}
else {
super.onActivityResult(requestCode, resultCode, data);
}
}