Prevent NullPointerException when data is null during a Payment
This commit is contained in:
parent
0b180a0732
commit
d87578c3cd
@ -56,12 +56,11 @@ abstract public class HandlePurchaseTask {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void handlePurchaseRequest(int resultCode, Intent data) {
|
public void handlePurchaseRequest(int resultCode, Intent data) {
|
||||||
PaymentsCache pc = new PaymentsCache(context);
|
|
||||||
|
|
||||||
String purchaseData = data.getStringExtra("INAPP_PURCHASE_DATA");
|
|
||||||
String dataSignature = data.getStringExtra("INAPP_DATA_SIGNATURE");
|
|
||||||
|
|
||||||
if (resultCode == Activity.RESULT_OK) {
|
if (resultCode == Activity.RESULT_OK) {
|
||||||
|
PaymentsCache pc = new PaymentsCache(context);
|
||||||
|
|
||||||
|
String purchaseData = data.getStringExtra("INAPP_PURCHASE_DATA");
|
||||||
|
String dataSignature = data.getStringExtra("INAPP_DATA_SIGNATURE");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
JSONObject jo = new JSONObject(purchaseData);
|
JSONObject jo = new JSONObject(purchaseData);
|
||||||
|
Loading…
Reference in New Issue
Block a user