-
Notifications
You must be signed in to change notification settings - Fork 12
This BillingProvider
implementation add support for Google Play.
Only API 3 is supported.
###Links
###Dependency
dependencies {
compile 'org.onepf:opfiab-google:x.x.x@aar'
}
Add following entry to your AndroidManifest.xml
:
<uses-permission android:name="com.android.vending.BILLING"/>
final GoogleBillingProvider google = new GoogleBillingProvider.Builder(context)
// optional
.setPurchaseVerifier(new SimpleGooglePurchaseVerifier(GOOGLE_PLAY_KEY))
// required
.setSkuResolver(new GoogleMapSkuResolver())
.build();
According to Security and Design you should perform signature verification on all purchased items.
Easiest way to do it is extending PublicKeyPurchaseVerifier
class.
It's strongly recommended to encrypt you public key in some way.
Easiest way to test Google Play billing with your app is using pre-defined SKUs. Please note that Google doesn't sign purchases made with this SKUs, so you can't test purchase verification with them.
It's also strongly recommended to test your app thoroughly using one of the test distribution channels.
-keepattributes InnerClasses
-keep class com.android.vending.billing.** {*;}
I canceled my subscription from developer console but I get
ITEM_ALREADY_OWNED
status from library when I try to re-purchase it.
Unfortunately there's nothing to be done. Once subscription is canceled it's no longer returned in users inventory but purchasing it again remains unavailable.