|
|
|
|
@ -103,7 +103,6 @@ public class PaymentsManager {
|
|
|
|
|
|
|
|
|
|
public void requestPurchase(final String sku, String transactionId) {
|
|
|
|
|
new PurchaseTask(mService, Godot.getInstance()) {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
protected void error(String message) {
|
|
|
|
|
godotPaymentV3.callbackFail();
|
|
|
|
|
@ -118,14 +117,12 @@ public class PaymentsManager {
|
|
|
|
|
protected void alreadyOwned() {
|
|
|
|
|
godotPaymentV3.callbackAlreadyOwned(sku);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
.purchase(sku, transactionId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void consumeUnconsumedPurchases() {
|
|
|
|
|
new ReleaseAllConsumablesTask(mService, activity) {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
protected void success(String sku, String receipt, String signature, String token) {
|
|
|
|
|
godotPaymentV3.callbackSuccessProductMassConsumed(receipt, signature, sku);
|
|
|
|
|
@ -194,14 +191,12 @@ public class PaymentsManager {
|
|
|
|
|
|
|
|
|
|
public void processPurchaseResponse(int resultCode, Intent data) {
|
|
|
|
|
new HandlePurchaseTask(activity) {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
protected void success(final String sku, final String signature, final String ticket) {
|
|
|
|
|
godotPaymentV3.callbackSuccess(ticket, signature, sku);
|
|
|
|
|
|
|
|
|
|
if (auto_consume) {
|
|
|
|
|
new ConsumeTask(mService, activity) {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
protected void success(String ticket) {
|
|
|
|
|
}
|
|
|
|
|
@ -231,12 +226,10 @@ public class PaymentsManager {
|
|
|
|
|
public void validatePurchase(String purchaseToken, final String sku) {
|
|
|
|
|
|
|
|
|
|
new ValidateTask(activity, godotPaymentV3) {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
protected void success() {
|
|
|
|
|
|
|
|
|
|
new ConsumeTask(mService, activity) {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
protected void success(String ticket) {
|
|
|
|
|
godotPaymentV3.callbackSuccess(ticket, null, sku);
|
|
|
|
|
@ -269,7 +262,6 @@ public class PaymentsManager {
|
|
|
|
|
|
|
|
|
|
public void consume(final String sku) {
|
|
|
|
|
new ConsumeTask(mService, activity) {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
protected void success(String ticket) {
|
|
|
|
|
godotPaymentV3.callbackSuccessProductMassConsumed(ticket, "", sku);
|
|
|
|
|
|