Android In-App Billing SDK for Bazaar, Myket and IranApps App Stores.
To start working with MarketPay, you need to add it's dependency:
Add into your project-level build.gradle
file
allprojects {
repositories {
//...
maven { url "https://jitpack.io" }
}
}
Add into your app-level build.gradle
file
dependencies {
//...
implementation "com.github.arefbhrn:marketpay:[latest_version]:[market_name]@aar"
}
For more information regarding the usage of MarketPay, Please check out the wiki page.
There is a fully functional sample application which demonstrates the usage of MarketPay, all you have to do is cloning the project and running the app module.
Yes, you've read that right! MarketPay supports Reactive Extension framework. Just add it's dependency in your build.gradle
file:
dependencies {
// RxJava 3
implementation "com.github.arefbhrn:marketpay-rx3:[latest_version]:[market_name]@aar"
// RxJava 2
implementation "com.github.arefbhrn:marketpay-rx:[latest_version]:[market_name]@aar"
}
And instead of using MarketPay's callbacks, use the reactive fuctions:
payment.getPurchasedProducts()
.subscribe({ purchasedProducts ->
//...
}, { throwable ->
//...
})
This library is an extension of Mahdi Nouri's nice library Poolaky. Thank you Mahdi! ;)