-
Add the JitPack repository to your build file
allprojects { repositories { maven { url 'https://jitpack.io' } } }
-
Add the dependency
dependencies { compile 'com.github.bidalihq:commerce-sdk-android:0.0.1' }
import com.bidali.commerce.BidaliSDK;
import com.bidali.commerce.BidaliSDKOptions;
import com.bidali.commerce.PaymentRequest;
...
String apiKey = "12345";
BidaliSDKOptions options = new BidaliSDKOptions(apiKey);
options.listener = new BidaliSDK.BidaliSDKListener() {
@Override
public void onPaymentRequest(PaymentRequest paymentRequest) {
}
};
bidaliSDK.show(context, options);
import com.bidali.commerce.BidaliSDK;
import com.bidali.commerce.BidaliSDKOptions;
import com.bidali.commerce.PaymentRequest;
...
val apiKey = "12345"
val options = BidaliSDKOptions(apiKey)
options.listener = object : BidaliSDK.BidaliSDKListener {
override fun onPaymentRequest(paymentRequest: PaymentRequest) {
}
}
bidaliSDK.show(this, options)