Search in sources :

Example 1 with PaymentService

use of com.asf.appcoins.sdk.iab.payment.PaymentService in project AppCoins-ethereumj by AppStoreFoundation.

the class AppCoinsSdkBuilder method createAppCoinsSdk.

public AppCoinsSdk createAppCoinsSdk() {
    Web3j web3;
    if (debug) {
        networkId = 3;
        web3 = Web3jFactory.build(new HttpService("https://ropsten.infura.io/1YsvKO0VH5aBopMYJzcy"));
    } else {
        networkId = 1;
        web3 = Web3jFactory.build(new HttpService("https://mainnet.infura.io/1YsvKO0VH5aBopMYJzcy"));
    }
    if (this.scheduler == null) {
        this.scheduler = Schedulers.io();
    }
    if (this.skuManager == null) {
        this.skuManager = new SkuManager(skus);
    }
    if (this.asfWeb3j == null) {
        this.asfWeb3j = new AsfWeb3jImpl(web3);
    }
    if (this.paymentService == null) {
        this.paymentService = new PaymentService(networkId, skuManager, developerAddress, asfWeb3j);
    }
    return new AppCoinsSdkImpl(period, scheduler, skuManager, paymentService, debug);
}
Also used : Web3j(org.web3j.protocol.Web3j) HttpService(org.web3j.protocol.http.HttpService) PaymentService(com.asf.appcoins.sdk.iab.payment.PaymentService)

Aggregations

PaymentService (com.asf.appcoins.sdk.iab.payment.PaymentService)1 Web3j (org.web3j.protocol.Web3j)1 HttpService (org.web3j.protocol.http.HttpService)1