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);
}
Aggregations