blusalt_checkout 1.1.9 
blusalt_checkout: ^1.1.9 copied to clipboard
Checkout SDK for Blusalt Payment
blusalt_checkout #
Checkout SDK for Blusalt Payment
Get your checkout credentials from Blusalt
Features #
- Received Money Via Card
 - Received Money Via Bank Transfer
 
Usage #
dependencies:
  blusalt_checkout: ^lastVersion 
startSdk() async {
  BlusaltCheckoutResultResponse? response =
  await _checkoutPlugin.startSDK(
      apiKey: apiKey,
      isDev: isDev,
      amount: amount,
      currency: currency,
      walletId: walletId,
      reference: null,
      iosConfig: IosConfig(
        iosPresentationStyle: IosPresentationStyle.fancyBottomModal,
      ),
  );
}
Installation #
Android #
Step 1
Create a [github.properties] file in root of android folder and put below into content. Replace values with your github credentials from github and make sure to grant necessary permissions especially for github packages
USERNAME_GITHUB=SampleUsername
TOKEN_GITHUB=SampleClassicToken
Step 2
Add below to project level gradle file /android/build.gradle
buildscript {
    ext.kotlin_version = '1.9.+'
    ...
    dependencies {
        classpath 'com.android.tools.build:gradle:7.3.+'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}
allprojects {
    def githubPropertiesFile = rootProject.file("github.properties")
    def githubProperties = new Properties()
    githubProperties.load(new FileInputStream(githubPropertiesFile))
    repositories {
        maven {
            name "GitHubPackages"
            url 'https://maven.pkg.github.com/Blusalt-FS/Checkout-Android-Package'
            credentials {
                username githubProperties['USERNAME_GITHUB']
                password githubProperties['TOKEN_GITHUB']
            }
        }
    }
}
Step 3
Change the minimum Android sdk version to 24 (or higher) in your /android/app/build.gradle file.
android {
    ...
    defaultConfig {
      ...
      minSdkVersion 24
    }
    ...
}
Step 4
If you're experiencing crashes or timeouts.
Add below to your progaurd.pro file if using progaurd or minify is enabled
/android/app/proguard-rules.pro
-keep class net.blusalt.checkout.** { *; }
Enable proguard in /android/app/build.gradle file like below.
android {
    
    ...
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    ...
}
Note on Android: #
If you are getting an error on android which says "Unauthorized" when gradle is downloading or building, generate a new github token that have access to clone, read and write to repo, access github packages. If you don't know which to tick, tick all boxes. Cheers
iOS #
Minimum iOS Deployment = 14
📱 Note on iOS #
- Ensure 
BlusaltCheckout.xcframeworkis Linked
In your Xcode workspace:- Navigate to 
Pods>BlusaltCheckout.xcframework - Confirm that it is properly linked and included in your app’s build target.
 
 - Navigate to 
 
2Add Required Frameworks to Xcode
If you encounter errors related to WebKit, follow these steps:
- Open your project in Xcode.
 - Under the 
TARGETSsection, click on Runner. - Go to the General tab and scroll to Frameworks, Libraries, and Embedded Content.
 - Click the 
+button and add the following frameworks:WebKit.framework