cafebazaar / Poolakey

Android In-App Billing SDK for Cafe Bazaar App Store
Apache License 2.0
71 stars 22 forks source link

The integration documentation is out of date #66

Closed Husseinhj closed 2 years ago

Husseinhj commented 2 years ago

Integration documentation is totally wrong and hasn't been updated with breaking changes. I'm using the latest version of the library (v2.0.0).

Please review your integration documentation and fix these errors:

1- subscribeProduct:

Incorrect:

payment.subscribeProduct(activity = this, request = purchaseRequest) {...}

Correct

fun purchaseProduct(
        registry: ActivityResultRegistry,
        request: PurchaseRequest,
        callback: PurchaseCallback.() -> Unit
    ) {

2- PurchaseRequest

Incorrect:

val purchaseRequest = PurchaseRequest(
    productId = "subscriptionProduct",
    requestCode = 1234,
    payload = ""
)

Correct:

data class PurchaseRequest(
    val productId: String,
    val payload: String? = null,
    val dynamicPriceToken: String? = null
)

3- onActivityResult:

No longer exists:

payment.onActivityResult(requestCode, resultCode, data) {...}
msmoradi commented 2 years ago

Hi @Husseinhj, Thanks for reporting, These issues will be fixed as soon as possible.

Husseinhj commented 2 years ago

Hi @msmoradi

Thanks for your swift response. I see that you made several changes that affected developers who would like to migrate from your old to your new library. It would be helpful if you would provide migration documentation on the website.

msmoradi commented 2 years ago

Fixed