Skip to content

Commit

Permalink
Update deprecated api (#411)
Browse files Browse the repository at this point in the history
* - update gradle version 3.1.0
- remove Warning:Configuration 'compile' replaced with 'implementation'
- update targetSdkVersion 26 (Google Play requires that apps target API level 26 or higher)
- remove IInAppBillingService.aidl file and Use the Google Play Billing Library
- update deprecated API

* sample project use annotations version 26.0.1

* revert compileSdkVersion and buildToolsVersion

* revert gradle version
  • Loading branch information
Jin Wooram Seo authored and serggl committed Jul 15, 2019
1 parent d749cd3 commit 450b46d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 285 deletions.
9 changes: 9 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ buildscript {
repositories {
mavenCentral()
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
Expand All @@ -15,6 +19,11 @@ allprojects {

repositories {
mavenCentral()
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}

sourceSets {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Wed Mar 15 08:51:52 MSK 2017
#Wed Jul 03 11:27:59 KST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
Expand Down
1 change: 1 addition & 0 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ dependencies {
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support.test:rules:0.5'
compile 'com.android.support:support-annotations:25.3.1'
compile 'com.android.billingclient:billing:2.0.1'
}

configurations.archives.extendsFrom configurations.default
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -782,11 +782,11 @@ public boolean consumePurchase(String productId)
try
{
TransactionDetails transaction = getPurchaseTransactionDetails(productId, cachedProducts);
if (transaction != null && !TextUtils.isEmpty(transaction.purchaseToken))
if (transaction != null && !TextUtils.isEmpty(transaction.purchaseInfo.purchaseData.purchaseToken))
{
int response = billingService.consumePurchase(Constants.GOOGLE_API_VERSION,
contextPackageName,
transaction.purchaseToken);
transaction.purchaseInfo.purchaseData.purchaseToken);
if (response == Constants.BILLING_RESPONSE_RESULT_OK)
{
cachedProducts.remove(productId);
Expand Down Expand Up @@ -988,7 +988,7 @@ private boolean verifyPurchaseSignature(String productId, String purchaseData, S

public boolean isValidTransactionDetails(TransactionDetails transactionDetails)
{
return verifyPurchaseSignature(transactionDetails.productId,
return verifyPurchaseSignature(transactionDetails.purchaseInfo.purchaseData.productId,
transactionDetails.purchaseInfo.responseData,
transactionDetails.purchaseInfo.signature) &&
checkMerchant(transactionDetails);
Expand Down

0 comments on commit 450b46d

Please sign in to comment.