Configuration

You can find the Appcharge configuration file in your Assets -> Resources -> Appcharge -> AppchargeConfig directory.

If the file doesn't exist, you can create one by right-click -> Create -> Appcharge -> Configuration -> AppchargeConfig

Note: This file must be located at Assets -> Resources -> Appcharge -> AppchargeConfig

The configuration file is divided into sections:

Publisher Info

PropertyValueDescription
EnvironmentEnumSetup the checkout environment:
Use Sandbox for tests and Production for Real money.
Publisher TokenStringSet the publisher token. You may find it by going to the Publisher Dashboard -> Settings -> Integration.
Checkout Public KeyStringSet the checkout public key. You may find it by going to the Publisher Dashboard -> Settings -> Integration.

Auto Integration

PropertyValueDescription
Disable Auto IntegrationBooleanBy default, the SDK will automatically apply necessary configurations during the build process. Check this option to manually set up internal configurations and dependencies.

Note: Disabling this option will prevent the automatic configuration needed for your project to run the Checkout SDK properly. You will then need to manually configure each file as needed.

Gradle Template Config

PropertyValueDescription
Exclude Android XBooleanExclude the useAndroidX property from the gradleTemplate.properties file.
Exclude JetifierBooleanExclude the enableJetifier property from the gradelTemplate.properties file.

If neither option is excluded, the gradleTemplate.properties file will look as follows during the build process:

**Unity Standart Settings goes here**
**ADDITIONAL_PROPERTIES**
android.useAndroidX=true
android.enableJetifier=true

Main Template Config

PropertyValueDescription
Exclude AppcompatBooleanExclude the AppCompat dependency from the mainTemplate.gradle file.
Exclude Android BrowserBooleanExclude the AndroidbrowserHelper dependency from the mainTemplate.gradle file.
Exclude KotlinBooleanExclude the Kotlin packages dependencies from the mainTemplate.gradle file.

If none excluded, final template will look like this:

**---------------**

dependencies {
  implementation fileTree(dir: 'libs', include: ['*.jar'])
    
	**DEPS**

	implementation 'androidx.appcompat:appcompat:1.3.0'
	implementation 'com.google.androidbrowserhelper:androidbrowserhelper:2.4.0'
	implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1'
	implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1'
}

**---------------**

Android Manifest Config

PropertyValueDescription
Exclude Internet PermissionBooleanExclude the Internet Permission from the AndroidManifest.xml file.
Exclude Appcharge Https SchemeBooleanExclude the Appcharge's required Https Scheme from the AndroidManifest.xml file.
Exclude Appcharge ActivityBooleanExclude the Appcharge's required Activity from the AndroidManifest.xml file.
Enable Debug ModeBooleanEnable this to print a summary of the automatic integration changes after the build.

If the options are not marked as excluded, the final manifest will look like this:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools">
    
    <!-- Added  !-->
    <uses-permission android:name="android.permission.INTERNET" />
		
    <!-- Added  !-->
    <queries>
        <intent>
            <action android:name="android.intent.action.VIEW" />
            <data android:scheme="https" />
        </intent>
    </queries>

    <application

    		<!-- Added  !-->
        <activity
            android:name="com.appcharge.core.CheckoutActivity"
            android:exported="true"
            android:launchMode="standard"
            android:configChanges="orientation|screenSize"
            android:screenOrientation="unspecified"
            tools:ignore="DiscouragedApi">
            <!-- Custom scheme !-->
            <intent-filter android:autoVerify="true">
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="acnative-identifier"/>
                <data android:host="action"/>
                <data android:scheme="https"/>
            </intent-filter>
        </activity>

    </application>

</manifest>