Fix possible NullPointerException crash on cancel payment
This commit is contained in:
parent
c633b770cb
commit
d05db4de8e
|
@ -58,17 +58,15 @@ abstract public class HandlePurchaseTask {
|
||||||
|
|
||||||
public void handlePurchaseRequest(int resultCode, Intent data) {
|
public void handlePurchaseRequest(int resultCode, Intent data) {
|
||||||
//Log.d("XXX", "Handling purchase response");
|
//Log.d("XXX", "Handling purchase response");
|
||||||
//int responseCode = data.getIntExtra("RESPONSE_CODE", 0);
|
|
||||||
PaymentsCache pc = new PaymentsCache(context);
|
|
||||||
|
|
||||||
String purchaseData = data.getStringExtra("INAPP_PURCHASE_DATA");
|
|
||||||
//Log.d("XXX", "Purchase data:" + purchaseData);
|
|
||||||
String dataSignature = data.getStringExtra("INAPP_DATA_SIGNATURE");
|
|
||||||
//Log.d("XXX", "Purchase signature:" + dataSignature);
|
|
||||||
|
|
||||||
if (resultCode == Activity.RESULT_OK) {
|
if (resultCode == Activity.RESULT_OK) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
//int responseCode = data.getIntExtra("RESPONSE_CODE", 0);
|
||||||
|
PaymentsCache pc = new PaymentsCache(context);
|
||||||
|
|
||||||
|
String purchaseData = data.getStringExtra("INAPP_PURCHASE_DATA");
|
||||||
|
//Log.d("XXX", "Purchase data:" + purchaseData);
|
||||||
|
String dataSignature = data.getStringExtra("INAPP_DATA_SIGNATURE");
|
||||||
|
//Log.d("XXX", "Purchase signature:" + dataSignature);
|
||||||
//Log.d("SARLANGA", purchaseData);
|
//Log.d("SARLANGA", purchaseData);
|
||||||
|
|
||||||
JSONObject jo = new JSONObject(purchaseData);
|
JSONObject jo = new JSONObject(purchaseData);
|
||||||
|
|
Loading…
Reference in New Issue