Skip to content

Commit 47d6788

Browse files
committed
minor wording changes
1 parent be44e81 commit 47d6788

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,15 @@ Simply call static method `BillingProcessor.isIabServiceAvailable()`:
122122
// continue
123123
}
124124
```
125-
Please take a note that calling to `BillingProcessor.isIabServiceAvailable()` (only checks Play Market app installed or not) is not enough because there might be a case when it returns true but still payment won't success. Therefore, it's better to
126-
call to method `isOnTimePurchaseSupported()` after initializing `BillingProcessor`:
125+
Please notice that calling `BillingProcessor.isIabServiceAvailable()` (only checks Play Market app installed or not) is not enough because there might be a case when it returns true but still payment won't succeed.
126+
Therefore, it's better to call `isOneTimePurchaseSupported()` after initializing `BillingProcessor`:
127127
```java
128-
boolean isOneTimePurchaseSupported = billingProcessor.isOnTimePurchaseSupported();
128+
boolean isOneTimePurchaseSupported = billingProcessor.isOneTimePurchaseSupported();
129129
if(isOneTimePurchaseSupported) {
130130
// launch payment flow
131131
}
132132
```
133-
or call to method `isSubscriptionUpdateSupported()` for checking update subcription usecase:
133+
or call `isSubscriptionUpdateSupported()` for checking update subscription use case:
134134
```java
135135
boolean isSubsUpdateSupported = billingProcessor.isSubscriptionUpdateSupported();
136136
if(isSubsUpdateSupported) {

library/src/main/java/com/anjlab/android/iab/v3/BillingProcessor.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public interface IBillingHandler {
7474
private BillingCache cachedSubscriptions;
7575
private IBillingHandler eventHandler;
7676
private String developerMerchantId;
77-
private boolean isOneTimePurchaseSupported;
77+
private boolean isOneTimePurchasesSupported;
7878
private boolean isSubsUpdateSupported;
7979

8080
private class HistoryInitializationTask extends AsyncTask<Void, Void, Boolean>
@@ -235,16 +235,16 @@ public boolean subscribe(Activity activity, String productId, String developerPa
235235
}
236236

237237
public boolean isOnTimePurchaseSupported(){
238-
if (isOneTimePurchaseSupported)
238+
if (isOneTimePurchasesSupported)
239239
return true;
240240

241241
try {
242242
int response = billingService.isBillingSupported(Constants.GOOGLE_API_VERSION, contextPackageName, Constants.PRODUCT_TYPE_MANAGED);
243-
isOneTimePurchaseSupported = response == Constants.BILLING_RESPONSE_RESULT_OK;
243+
isOneTimePurchasesSupported = response == Constants.BILLING_RESPONSE_RESULT_OK;
244244
} catch (RemoteException e) {
245245
e.printStackTrace();
246246
}
247-
return isOneTimePurchaseSupported;
247+
return isOneTimePurchasesSupported;
248248
}
249249

250250
public boolean isSubscriptionUpdateSupported() {

0 commit comments

Comments
 (0)