onepf / OpenIAB

Open In-App Billing for Google Play, SlideMe, Amazon Store, Nokia Store, Samsung Apps, Yandex.Store, Appland, Aptoide, AppMall and Fortumo.
http://onepf.org/openiab/
Apache License 2.0
473 stars 172 forks source link

How to integrate a payment gateway in OpenIAB? #514

Open nikita21 opened 8 years ago

nikita21 commented 8 years ago

for in-app billing, i would like to know how can i integrate the payment gateway api in OpenIAB

RomanZhilich commented 8 years ago

If you want to give user an option to choose what store to use, then it's out of scope for this library. The idea is to bill store responsible for app installation.

You can sort of do this with OPFIab supplying different BillingProvider sets in OPFIab.init().

nikita21 commented 8 years ago

Can you please elaborate how can i integrate the api in OPFIab?

RomanZhilich commented 8 years ago

Apparently I misunderstood your question.

The actual billing is handled by the store, this library is a wrapper for multiple SDKs to simplify integration.

So this library won't help you with that, and nether will OPFIab.

nikita21 commented 8 years ago

Even Fortumo does not have application store. They just provide billing service. Can i explicitly provide the store name as OpenIabHelper.Options.Builder builder = new OpenIabHelper.Options.Builder() .setStoreSearchStrategy(OpenIabHelper.Options.SEARCH_STRATEGY_BEST_FIT) .addAvailableStoreNames(OpenIabHelper.NAME_DEFAULT) .setVerifyMode(OpenIabHelper.Options.VERIFY_EVERYTHING) .addPreferredStoreName(OpenIabHelper.NAME_DEFAULT);

so it will be redirected to launchPurchaseFlow() of my billing service class. Is that possible?

RomanZhilich commented 8 years ago

Even Fortumo does not have application store. They just provide billing service.

That is what I meant, the actual billing is handled by their SDK.

Can i explicitly provide the store name as

You mean you want to implement custom billing service?

nikita21 commented 8 years ago

yes suppose the app is installed from google play store but i don't want the in-app payment to take place through google play, instead i want to redirect to my billing service class.

RomanZhilich commented 8 years ago

For that you indeed better check out OPFIab. You can supply your own BillingProvider implementation in configuration, although I don't think it would be easy. You better copy\paste GooglePlay or OpenStore as a base. It all kinda depends on what sort of billing service you want to add.

nikita21 commented 8 years ago

it's a carrier billing payment gateway and want to integrate the same for the apps installed from google play.