Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge dev into master #405

Merged
merged 110 commits into from
Aug 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
a94962f
Release/v1.6.13 to dev (#240)
Sep 15, 2021
424d0c3
Bump dokka_version from 1.5.0 to 1.5.30 (#242)
dependabot[bot] Sep 16, 2021
a993d56
Improve default validation (#243)
Sep 16, 2021
02b23a0
Update MIGRATING.md (#244)
Sep 16, 2021
b0d3f8f
Release v1.6.14 (#246)
Sep 16, 2021
ad536a9
Bump cardscan-ui from 2.1.0011 to 2.1.0012 (#249)
dependabot[bot] Sep 17, 2021
facbe65
Bump kotlin-gradle-plugin from 1.5.30 to 1.5.31 (#253)
dependabot[bot] Sep 21, 2021
49f8bce
Bump constraintlayout from 2.1.0 to 2.1.1 (#257)
dependabot[bot] Sep 28, 2021
498be1f
Improve validation logic, fix tests (#261)
DmytroDm Oct 5, 2021
9a20ba4
Fix nullable return type (#260)
DmytroDm Oct 5, 2021
a03e341
Bump okhttp from 4.9.1 to 4.9.2 (#258)
dependabot[bot] Oct 5, 2021
65db2a9
Bump dokka_version from 1.5.30 to 1.5.31 (#264)
dependabot[bot] Oct 5, 2021
7564561
Merge branch 'master' into develop
DmytroDm Oct 5, 2021
eb2d649
Public release v1.6.15 (#266)
DmytroDm Oct 5, 2021
b8c246a
Bump firebase-bom from 28.4.1 to 28.4.2 (#270)
dependabot[bot] Oct 6, 2021
2485764
Bump mockito_version from 3.12.4 to 4.0.0 (#271)
dependabot[bot] Oct 8, 2021
4a0a110
Bump gradle from 7.0.2 to 7.0.3 (#273)
dependabot[bot] Oct 13, 2021
3918d6b
Fix submit function response body (#274)
DmytroDm Oct 15, 2021
6b193eb
Public release v1.6.16 (#275)
DmytroDm Oct 15, 2021
41e3c9d
Merge branch 'master' into develop
DmytroDm Oct 15, 2021
f5e2a25
Bump tensorflow-lite from 2.1.0011 to 2.1.0015 (#262)
dependabot[bot] Oct 18, 2021
ec67900
Bump scan-payment-full from 2.1.0011 to 2.1.0015 (#265)
dependabot[bot] Oct 18, 2021
e2b514c
Bump cardscan-ui from 2.1.0012 to 2.1.0015 (#263)
dependabot[bot] Oct 18, 2021
327553b
Bump bouncer versions from 2.1.0015 -> 2.1.0016 (#279)
DmytroDm Oct 18, 2021
8237776
Bouncer adapter version name & code rise (#278)
DmytroDm Oct 18, 2021
de6e33f
Bump core-ktx from 1.6.0 to 1.7.0 (#285)
dependabot[bot] Oct 29, 2021
bb5c090
Bump firebase-bom from 28.4.2 to 29.0.0 (#286)
dependabot[bot] Nov 2, 2021
acd722c
Bump robolectric from 4.6.1 to 4.7 (#287)
dependabot[bot] Nov 15, 2021
0d968e6
Bump kotlin-gradle-plugin from 1.5.31 to 1.6.0 (#288)
dependabot[bot] Nov 16, 2021
6982c63
add max Length (#289)
Nov 18, 2021
9df5831
Bump mockk from 1.12.0 to 1.12.1 (#290)
dependabot[bot] Nov 18, 2021
63cee55
Bump appcompat from 1.3.1 to 1.4.0 (#291)
dependabot[bot] Nov 22, 2021
1e27d49
Bump robolectric from 4.7 to 4.7.1 (#292)
dependabot[bot] Nov 22, 2021
9113e2c
Bump constraintlayout from 2.1.1 to 2.1.2 (#293)
dependabot[bot] Nov 23, 2021
5a7ac2f
Bump okhttp from 4.9.2 to 4.9.3 (#294)
dependabot[bot] Nov 23, 2021
09b0e41
Bump mockito_version from 4.0.0 to 4.1.0 (#295)
dependabot[bot] Nov 23, 2021
c7d431e
Bump robolectric from 4.7.1 to 4.7.2 (#296)
dependabot[bot] Nov 23, 2021
49566f1
Bump dokka_version from 1.5.31 to 1.6.0 (#297)
dependabot[bot] Nov 24, 2021
e78d2b8
Merge public release v1.16.17 into development (#299)
DmytroDm Nov 29, 2021
3753ce0
Bump firebase-bom from 29.0.0 to 29.0.1 (#302)
dependabot[bot] Dec 3, 2021
139fa7d
Bump robolectric from 4.7.2 to 4.7.3 (#303)
dependabot[bot] Dec 3, 2021
b6d7805
Bump json from 20210307 to 20211205 (#304)
dependabot[bot] Dec 10, 2021
1f922a8
Bump play-services-auth from 19.2.0 to 20.0.0 (#306)
dependabot[bot] Dec 10, 2021
e3e9714
Bump firebase-bom from 29.0.1 to 29.0.2 (#311)
dependabot[bot] Dec 15, 2021
0f7edef
Move google-services.json to ci (#307)
DmytroDm Dec 15, 2021
dceafce
Fix TextInputFieldLayout.kt error restore after screen rotation (#312)
DmytroDm Dec 15, 2021
631158a
Bump kotlin-gradle-plugin from 1.6.0 to 1.6.10 (#313)
dependabot[bot] Dec 15, 2021
dcf0517
Bump gradle from 7.0.3 to 7.0.4 (#305)
dependabot[bot] Dec 15, 2021
7c1794e
Merge public release v1.6.18 into dev (#315)
DmytroDm Dec 16, 2021
fb1af2e
Bump play-services-auth from 19.2.0 to 20.0.0 (#318)
dependabot[bot] Dec 20, 2021
7b44bb3
Bump mockito_version from 4.1.0 to 4.2.0 (#316)
dependabot[bot] Dec 20, 2021
298a92a
Fix focus/state change listeners when end icon mode `clear_text`. (#321)
DmytroDm Dec 20, 2021
3fa2d59
Bump dokka_version from 1.6.0 to 1.6.10 (#326)
dependabot[bot] Dec 28, 2021
eb71f89
Bump mockk from 1.12.1 to 1.12.2 (#327)
dependabot[bot] Jan 6, 2022
36d700f
Bump play-services-auth from 20.0.0 to 20.0.1 (#329)
dependabot[bot] Jan 6, 2022
db374ec
Bump leakcanary-android from 2.7 to 2.8 (#328)
dependabot[bot] Jan 6, 2022
d38bd5d
Bump appcompat from 1.4.0 to 1.4.1 (#331)
dependabot[bot] Jan 13, 2022
732150a
Bump constraintlayout from 2.1.2 to 2.1.3 (#333)
dependabot[bot] Jan 17, 2022
71f3dc5
Bump leakcanary-android from 2.8 to 2.8.1 (#330)
dependabot[bot] Feb 2, 2022
9d0198c
Update docs (#343)
DmytroDm Feb 2, 2022
e1e8178
Add EXTRA_KEEP_APPLICATION_THEME flag which force card.io to use appl…
DmytroDm Feb 9, 2022
8497d7d
Bump material from 1.4.0 to 1.5.0 (#332)
dependabot[bot] Feb 9, 2022
3b6c3c4
Bump mockito_version from 4.2.0 to 4.3.1 (#348)
dependabot[bot] Feb 9, 2022
78d0c62
Bump gradle from 7.0.4 to 7.1.1 (#349)
dependabot[bot] Feb 9, 2022
b83b374
Update compile/target SDK versions (#351)
DmytroDm Feb 9, 2022
f34b1fa
Add Material3 widget styles (#352)
DmytroDm Feb 9, 2022
90bfa89
Update ScanActivity.kt javadoc (#353)
DmytroDm Feb 10, 2022
8c81a23
Merge "Public release adapter-cardio v 1.0.3" into development (#354)
DmytroDm Feb 10, 2022
580e0b7
Fix `VGSTextInputLayout` start/end icons (#356)
DmytroDm Feb 17, 2022
dabdcb1
Bump mockk from 1.12.2 to 1.12.3 (#358)
dependabot[bot] Mar 7, 2022
8dcf2a8
Bump gradle from 7.1.1 to 7.1.2 (#357)
dependabot[bot] Mar 7, 2022
9c7a088
Bump gradle-maven-publish-plugin from 0.18.0 to 0.19.0 (#359)
dependabot[bot] Mar 7, 2022
f238f0f
Bump mockito_version from 4.3.1 to 4.4.0 (#360)
dependabot[bot] Mar 9, 2022
3b841da
Update gradle files (#361)
DmytroDm Mar 16, 2022
0ac849e
Rename versions.gradle to dependancies.gradle, to support dependabot …
DmytroDm Mar 30, 2022
ff53191
bump versions (#365)
May 30, 2022
ee82b03
Remove content triming in validation rules (#366)
May 30, 2022
4c5b566
Release VGS Collect v1.6.19 (#369)
May 31, 2022
657b779
Improve dependancy management (#370)
DmytroDm Jun 23, 2022
6870af5
Bump core-ktx from 1.7.0 to 1.8.0 (#371)
dependabot[bot] Jun 27, 2022
512fab2
Bump okhttp from 4.9.3 to 4.10.0 (#372)
dependabot[bot] Jun 27, 2022
2db0bae
Bump mockito-core from 4.4.0 to 4.6.1 (#374)
dependabot[bot] Jun 27, 2022
17facfc
Bump appcompat from 1.4.1 to 1.4.2 (#379)
dependabot[bot] Jun 29, 2022
fb0ea55
Bump mockito-inline from 4.4.0 to 4.6.1 (#378)
dependabot[bot] Jun 29, 2022
abf050a
Bump mockk from 1.12.3 to 1.12.4 (#377)
dependabot[bot] Jun 29, 2022
978c761
Add tokenization API (#376)
Jun 29, 2022
afa715d
Bump constraintlayout from 2.1.3 to 2.1.4 (#381)
dependabot[bot] Jun 30, 2022
07e700a
Bump leakcanary-android from 2.8.1 to 2.9.1 (#380)
dependabot[bot] Jun 30, 2022
7dcad80
Add tokenization tests (#385)
DmytroDm Jul 1, 2022
142bfcb
Bump robolectric from 4.7.3 to 4.8.1 (#383)
dependabot[bot] Jul 5, 2022
7637477
Bump json from 20211205 to 20220320 (#384)
dependabot[bot] Jul 5, 2022
6521651
update config (#387)
Jul 5, 2022
28481c2
Update minSdkVersion version to 21 (#386)
DmytroDm Jul 5, 2022
4ec7b1d
Bump jsonassert from 1.5.0 to 1.5.1 (#389)
dependabot[bot] Jul 6, 2022
14ba10b
Implement tokenization analytics (#390)
DmytroDm Jul 6, 2022
b99f00e
Add supporting route id (#391)
Jul 7, 2022
07f5277
Tokenization demo (#393)
DmytroDm Jul 14, 2022
a0772d5
Bump dokka-base from 1.6.10 to 1.7.0 (#373)
dependabot[bot] Jul 26, 2022
1cd4f02
Bump gradle-maven-publish-plugin from 0.19.0 to 0.21.0 (#394)
dependabot[bot] Jul 26, 2022
d08c65c
Bump dokka-gradle-plugin from 1.6.10 to 1.7.10 (#395)
dependabot[bot] Jul 26, 2022
7dd8247
Bump dokka-base from 1.7.0 to 1.7.10 (#397)
dependabot[bot] Jul 27, 2022
f572784
Bump kotlin-gradle-plugin from 1.6.10 to 1.7.0 (#382)
dependabot[bot] Aug 2, 2022
5489127
Implement 8 chars bin & update tests (#396)
DmytroDm Aug 3, 2022
db059b3
Implement validation error messages (#400)
DmytroDm Aug 3, 2022
7bee5a0
Bump gradle from 7.2.1 to 7.2.2 (#402)
dependabot[bot] Aug 3, 2022
b8bcafd
Bump kotlin-gradle-plugin from 1.7.0 to 1.7.10 (#401)
dependabot[bot] Aug 3, 2022
b668d91
Add `setRule/setRules/appendRule` functions (#403)
DmytroDm Aug 4, 2022
4bc599d
Public release v1.7.1 (#404)
DmytroDm Aug 4, 2022
13431ee
Update docs (#406)
DmytroDm Aug 4, 2022
03a426f
Merge branch 'master' into develop
DmytroDm Aug 4, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
23 changes: 23 additions & 0 deletions MIGRATING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
## Migration Guides

### Migrating from versions < v1.7.1
Function `addRule` is now deprecated. It's still can be used, but **Android Studio** will highlight it.

**Before:**

```
view.addRule(
VGSInfoRule.ValidationBuilder()
.setRegex("^[0-9]{5}(?:-[0-9]{4})?\$")
.build()
)
```

**Now:**

```
view.setRule(
VGSInfoRule.ValidationBuilder()
.setRegex("^[0-9]{5}(?:-[0-9]{4})?\$")
.build()
)
```

### Migrating from versions < v1.6.14

Field state will be valid if no validation rules defined.
Expand Down
10 changes: 9 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ android {

buildConfigField("String", "VAULT_ID", "\"${getLocalProperty("VGS_VAULT_ID")}\"")
buildConfigField("String", "PATH", "\"${getLocalProperty("VGS_PATH")}\"")
buildConfigField("String", "ROUTE_ID", "\"${getLocalProperty("VGS_ROUTE_ID")}\"")
}

buildTypes {
Expand Down Expand Up @@ -53,6 +54,11 @@ android {
}
}

repositories {

maven { url "https://jitpack.io" }
}

dependencies {
implementation project(":vgscollect")
implementation project(":vgscollect-cardio")
Expand All @@ -61,9 +67,11 @@ dependencies {
implementation libs.androidx.core.ktx
implementation libs.androidx.constraintlayout
implementation libs.androidx.multidex

implementation libs.material

implementation 'androidx.preference:preference-ktx:1.2.0'
implementation 'com.github.kbiakov:CodeView-Android:1.3.2'

debugImplementation debugLibs.leakcanary

testImplementation testLibs.junit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import androidx.test.espresso.ViewInteraction
import androidx.test.espresso.action.ViewActions.*
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.intent.Intents.*
import androidx.test.espresso.intent.matcher.IntentMatchers.*
import androidx.test.espresso.intent.matcher.IntentMatchers.hasComponent
import androidx.test.espresso.matcher.ViewMatchers.*
import androidx.test.ext.junit.rules.activityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
Expand Down Expand Up @@ -196,14 +196,18 @@ class ActivityCaseInstrumentedTest {
}

private fun startMainScreen() {
val startWithActivityBtn = onView(withId(R.id.startWithActivityBtn))
.check(matches(isDisplayed()))

onView(withId(R.id.userVault)).perform(
onView(withId(R.id.tiedVaultId)).perform(
typeText(Utils.DEFAULT_TENANT_ID),
closeSoftKeyboard()
)
onView(withId(R.id.userPath)).perform(typeText(Utils.DEFAULT_PATH), closeSoftKeyboard())
onView(withId(R.id.tiedPath)).perform(
typeText(Utils.DEFAULT_PATH),
closeSoftKeyboard()
)

val startWithActivityBtn = onView(withId(R.id.llCollectActivityFlow))
.perform(scrollTo())
.check(matches(isDisplayed()))

performClick(startWithActivityBtn)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,12 @@ class FragmentCaseInstrumentedTest {
}

private fun startMainScreen() {
val startWithActivityBtn = onView(withId(R.id.startWithFragmentBtn))
.check(matches(isDisplayed()))
onView(withId(R.id.tiedVaultId)).perform(typeText(Utils.DEFAULT_TENANT_ID))
onView(withId(R.id.tiedPath)).perform(typeText(Utils.DEFAULT_PATH), closeSoftKeyboard())

onView(withId(R.id.userVault)).perform(typeText(Utils.DEFAULT_TENANT_ID))
onView(withId(R.id.userPath)).perform(typeText(Utils.DEFAULT_PATH), closeSoftKeyboard())
val startWithActivityBtn = onView(withId(R.id.llCollectFragmentFlow))
.perform(scrollTo())
.check(matches(isDisplayed()))

startWithActivityBtn.perform(click())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import android.widget.DatePicker
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.ViewInteraction
import androidx.test.espresso.action.ViewActions.click
import androidx.test.espresso.action.ViewActions.scrollTo
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.contrib.PickerActions
import androidx.test.espresso.matcher.ViewMatchers.*
Expand Down Expand Up @@ -179,7 +180,8 @@ class ViewPagerCaseInstrumentedTest {
}

private fun startMainScreen() {
val startWithActivityBtn = onView(withId(R.id.startWithViewPagerBtn))
val startWithActivityBtn = onView(withId(R.id.llCollectViewPagerFlow))
.perform(scrollTo())
.check(matches(isDisplayed()))

startWithActivityBtn.perform(click())
Expand Down
24 changes: 19 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
android:theme="@style/AppTheme"
tools:replace="android:allowBackup">

<activity
android:name=".StartActivity"
Expand All @@ -28,18 +29,31 @@
</intent-filter>
</activity>


<activity
android:name=".activity_case.VGSCollectActivity"
android:label="Activity Demo" />
android:label="Collect (Activity)" />

<!-- TODO(Think about resize)-->
<activity
android:name=".tokenization.TokenizationActivity"
android:label="Tokenization"
android:screenOrientation="portrait"
tools:ignore="LockedOrientationActivity" />

<activity
android:name=".tokenization.settings.TokenizationSettingsActivity"
android:label="Settings"
android:theme="@style/AppTheme.TokenizationSettings"
android:screenOrientation="portrait"
tools:ignore="LockedOrientationActivity" />

<activity
android:name=".fragment_case.VGSCollectFragmentActivity"
android:label="Fragment Demo" />
android:label="Collect (Fragment)" />

<activity
android:name=".viewpager_case.VGSViewPagerActivity"
android:label="ViewPager Demo" />
android:label="Collect (ViewPager)" />

<activity
android:name=".instrumented.VGSEditTextInputTypeActivity"
Expand Down
99 changes: 33 additions & 66 deletions app/src/main/java/com/verygoodsecurity/demoapp/StartActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,91 +3,58 @@ package com.verygoodsecurity.demoapp
import android.app.Activity
import android.content.Intent
import android.os.Bundle
import android.view.View
import android.widget.ArrayAdapter
import androidx.appcompat.app.AppCompatActivity
import com.verygoodsecurity.demoapp.activity_case.VGSCollectActivity
import com.verygoodsecurity.demoapp.fragment_case.VGSCollectFragmentActivity
import com.verygoodsecurity.demoapp.tokenization.TokenizationActivity
import com.verygoodsecurity.demoapp.viewpager_case.VGSViewPagerActivity
import com.verygoodsecurity.vgscollect.core.Environment
import kotlinx.android.synthetic.main.activity_start.*

class StartActivity:AppCompatActivity(), View.OnClickListener {

companion object {
const val VAULT_ID = "user_vault_id"
const val ENVIROMENT = "user_env"
const val PATH = "user_path"
}

private val spinnerAdapter:ArrayAdapter<String> by lazy {
val envArr = arrayOf(
Environment.SANDBOX.rawValue.toUpperCase(),
Environment.LIVE.rawValue.toUpperCase()
)
val layout = android.R.layout.simple_spinner_item
val spinnerArrayAdapter = ArrayAdapter<String>(this, layout, envArr)

spinnerArrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item)

spinnerArrayAdapter
}
class StartActivity : AppCompatActivity(R.layout.activity_start) {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_start)

setupSpinner()
setupUI()

startWithActivityBtn?.setOnClickListener(this)
startWithFragmentBtn?.setOnClickListener(this)
startWithViewPagerBtn?.setOnClickListener(this)
}

private fun setupUI() {
userVault?.setText(BuildConfig.VAULT_ID)
userPath?.setText(BuildConfig.PATH)

environmentSpinner.setSelection(BuildConfig.ENVIRINMENT.ordinal)
setupViews()
}

private fun setupSpinner() {
environmentSpinner.adapter = spinnerAdapter
}

override fun onClick(v: View) {
when(v.id) {
R.id.startWithActivityBtn -> startInteractionWithActivity()
R.id.startWithFragmentBtn -> startInteractionWithFragment()
R.id.startWithViewPagerBtn -> startInteractionWithViewPager()
private fun setupViews() {
tiedVaultId?.setText(BuildConfig.VAULT_ID)
tiedPath?.setText(BuildConfig.PATH)
llTokenizationFlow?.setOnClickListener {
startActivity(TokenizationActivity::class.java)
}
llCollectActivityFlow?.setOnClickListener {
startActivity(VGSCollectActivity::class.java)
}
llCollectFragmentFlow?.setOnClickListener {
startActivity(VGSCollectFragmentActivity::class.java)
}
llCollectViewPagerFlow?.setOnClickListener {
startActivity(VGSViewPagerActivity::class.java)
}
}

private fun startInteractionWithActivity() {
val intent = prepareIntent(VGSCollectActivity::class.java)
startActivity(intent)
private fun startActivity(activity: Class<out Activity>) {
startActivity(Intent(this, activity).apply {
putExtra(KEY_BUNDLE_VAULT_ID, tiedVaultId.text.toString())
putExtra(KEY_BUNDLE_PATH, tiedPath.text.toString())
putExtra(KEY_BUNDLE_ENVIRONMENT, getEnvironment())
})
}

private fun startInteractionWithFragment() {
val intent = prepareIntent(VGSCollectFragmentActivity::class.java)
startActivity(intent)
private fun getEnvironment() = when (mbGroupEnvironment.checkedButtonId) {
R.id.mbSandbox -> SANDBOX
R.id.mbLive -> LIVE
else -> throw IllegalArgumentException("Not implemented")
}

private fun startInteractionWithViewPager() {
val intent = prepareIntent(VGSViewPagerActivity::class.java)
startActivity(intent)
}
companion object {

private fun prepareIntent(componentClass: Class<out Activity>):Intent {
return Intent(this, componentClass).apply {
val vaultId = userVault.text.toString()
val path = userPath.text.toString()
val env = environmentSpinner.selectedItemPosition
private const val SANDBOX = "sandbox"
private const val LIVE = "live"

putExtra(VAULT_ID, vaultId)
putExtra(ENVIROMENT, env)
putExtra(PATH, path)
}
const val KEY_BUNDLE_VAULT_ID = "user_vault_id"
const val KEY_BUNDLE_ENVIRONMENT = "user_env"
const val KEY_BUNDLE_PATH = "user_path"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class VGSCollectActivity : AppCompatActivity(), VgsCollectResponseListener, View

.build()

cardNumberField.addRule(rule)
cardNumberField.setRule(rule)
}

private fun addCustomBrands() {
Expand Down Expand Up @@ -229,14 +229,14 @@ class VGSCollectActivity : AppCompatActivity(), VgsCollectResponseListener, View
}

private fun retrieveSettings() {
VGSCollectLogger.logLevel = VGSCollectLogger.Level.WARN
VGSCollectLogger.logLevel = VGSCollectLogger.Level.DEBUG

val bndl = intent?.extras

vault_id = bndl?.getString(StartActivity.VAULT_ID, "") ?: ""
path = bndl?.getString(StartActivity.PATH, "/") ?: ""
vault_id = bndl?.getString(StartActivity.KEY_BUNDLE_VAULT_ID, "") ?: ""
path = bndl?.getString(StartActivity.KEY_BUNDLE_PATH, "/") ?: ""

val envId = bndl?.getInt(StartActivity.ENVIROMENT, 0) ?: 0
val envId = bndl?.getInt(StartActivity.KEY_BUNDLE_ENVIRONMENT, 0) ?: 0
env = Environment.values()[envId]

vgsForm = VGSCollect.Builder(this, vault_id)
Expand Down Expand Up @@ -329,6 +329,7 @@ class VGSCollectActivity : AppCompatActivity(), VgsCollectResponseListener, View
is VGSResponse.SuccessResponse -> responseContainerView.text =
"Code: ${response.successCode}"
is VGSResponse.ErrorResponse -> responseContainerView.text = response.toString()
else -> return
}
}

Expand Down
Loading