Documentation and example of Digital Virgo Direct Carrier Billing (from now on DCB) SDK for Android (Including Android TV) and iOS (Including tvOS)
Following this guide your app will be techically enabled to be promoted and integrated with Digital Virgo mobile payment.
After the integration of the sdk the resultant app can check if the user coming from Digital Virgo acquisition (optionally with explicit login with msdisdn+pin) and can check expiration date and several informations.
This integration can be used in apps already published on Google Play/App Store or only in case of Android environment, outside Google Play.
Android Studio ™ with Gradle 2.x+
or
XCode 10+ ™ with Carthage
Java/Kotlin/Swift
Follow this documention that you find on this link DCB Android Documentation
You can download this project on iOS App Test for test and see the behavior.
Create a Cartfile or add belows line on Cartfile
Open the terminal and run "carthage update". This will fetch dependencies into a Carthage folder and build each source based framework or download the pre-builded framework.
Note: This SDK support the Carthage dependency. If the first time that you use Carthage, you can learn more on this link https://github.com/Carthage/Carthage
On your application targets’ General settings tab, in the “Linked Frameworks and Libraries” section, drag and drop the "DCBApiExt" and "Newton" frameworks from the Carthage build folder on disk.
Build Phases
settings tab, click the + icon and choose New Run Script
Phase. Create a Run Script in which you specify your shell (ex: /bin/sh)
, add the following contents to the script area below the shell:/usr/local/bin/carthage copy-frameworks
$(SRCROOT)/Carthage/Build/iOS/DCBApiExt.framework
$(SRCROOT)/Carthage/Build/iOS/Newton.framework
You can now implement the code for this SDK, on you project:
import DCBApiExt
var dcbApiClient: (baseDomain: String, confInfoDomain: String, apikey: String, catalog: String, country: String, namespace: String) {
return ("<baseDomain>", "<confInfoDomain>", "<key>", "<service-key>", "<country>", "<storage-space>")
}
let client = DCBApiClient(baseDomain: dcbApiClient.baseDomain,
confInfoDomain: dcbApiClient.confInfoDomain,
apikey: dcbApiClient.apikey,
catalog: dcbApiClient.catalog,
country: dcbApiClient.country,
namespace: dcbApiClient.namespace)
DCBUserManager(client: client).checkFlowDCB(isActive: false) { date in
if let dcbUser = DCBUserManager.dcbUser {
//User is recognised as Digital Virgo Acquisition
if let date = date {
//User is subscribed
}
else {
//User expired, not subscribed
//user must pay again to access the product
}
}
else {
//Normal user discover the app from AppStore
}
}
Best from
Native App Team