3fbaa479e3
GodotPaymentV3 currently consumes purchased item right after purchasing. But, some in-app item should not consume like "remove ads permanently" So, I added "setAutoConsume(boolean)", "requestPurchased()", "consume(sku_string)". AutoConsume is true by default as before. usage: func _ready(): var payment = Globals.get_singleton("GodotPayments") payment.setPurchaseCallbackId(get_instance_ID()) payment.setAutoConsume(false) # default : true payment.requestPurchased() # callback : has_purchased payment.purchase("item_name") # callback : purchase_success, purchase_fail, purchase_cancel, purchase_owned payment.consume("item_name") # callback : consume_success func purchase_success(receipt, signature, sku): print("purchase_success : ", sku) func purchase_fail(): print("purchase_fail") func purchase_cancel(): print("purchase_cancel") func purchase_owned(sku): print("purchase_owned : ", sku) func consume_success(receipt, signature, sku): print("consume_success : ", sku) func has_purchased(receipt, signature, sku): if sku == "": print("has_purchased : nothing") else: print("has_purchased : ", sku) |
||
---|---|---|
.. | ||
export | ||
globals | ||
java | ||
libs | ||
android_native_app_glue.c | ||
android_native_app_glue.h | ||
AndroidManifest.xml.template | ||
audio_driver_jandroid.cpp | ||
audio_driver_jandroid.h | ||
audio_driver_opensl.cpp | ||
audio_driver_opensl.h | ||
cpu-features.c | ||
cpu-features.h | ||
detect.py | ||
dir_access_android.cpp | ||
dir_access_android.h | ||
dir_access_jandroid.cpp | ||
dir_access_jandroid.h | ||
file_access_android.cpp | ||
file_access_android.h | ||
file_access_jandroid.cpp | ||
file_access_jandroid.h | ||
godot_android.cpp | ||
ifaddrs_android.cpp | ||
ifaddrs_android.h | ||
java_bind.cpp | ||
java_bind.h | ||
java_class_wrapper.cpp | ||
java_class_wrapper.h | ||
java_glue.cpp | ||
java_glue.h | ||
logo.png | ||
os_android.cpp | ||
os_android.h | ||
platform_config.h | ||
project.properties.template | ||
SCsub | ||
sign.sh | ||
thread_jandroid.cpp | ||
thread_jandroid.h |