Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
Prepaid Bank Simulator
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OPEN-SHARING
Prepaid Bank Simulator
Commits
5207e2cb
Commit
5207e2cb
authored
Mar 21, 2025
by
Abdullah Hafizh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: Update project configuration and dependencies
parent
ee3a2f86
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
56 additions
and
23 deletions
+56
-23
compiler.xml
.idea/compiler.xml
+1
-1
misc.xml
.idea/misc.xml
+1
-1
build.gradle
app/build.gradle
+5
-2
MainActivity.kt
app/src/main/java/id/mdd/prepaidbank/MainActivity.kt
+18
-13
build.gradle
build.gradle
+27
-2
gradle-wrapper.properties
gradle/wrapper/gradle-wrapper.properties
+2
-2
settings.gradle
settings.gradle
+2
-2
No files found.
.idea/compiler.xml
View file @
5207e2cb
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"CompilerConfiguration"
>
<bytecodeTargetLevel
target=
"
17
"
/>
<bytecodeTargetLevel
target=
"
21
"
/>
</component>
</project>
\ No newline at end of file
.idea/misc.xml
View file @
5207e2cb
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"ExternalStorageConfigurationManager"
enabled=
"true"
/>
<component
name=
"ProjectRootManager"
version=
"2"
languageLevel=
"JDK_
17"
default=
"true"
project-jdk-name=
"jbr-17
"
project-jdk-type=
"JavaSDK"
>
<component
name=
"ProjectRootManager"
version=
"2"
languageLevel=
"JDK_
21"
default=
"true"
project-jdk-name=
"jbr-21
"
project-jdk-type=
"JavaSDK"
>
<output
url=
"file://$PROJECT_DIR$/build/classes"
/>
</component>
<component
name=
"ProjectType"
>
...
...
app/build.gradle
View file @
5207e2cb
...
...
@@ -49,11 +49,14 @@ dependencies {
testImplementation
'junit:junit:4.13.2'
androidTestImplementation
'androidx.test.ext:junit:1.1.5'
androidTestImplementation
'androidx.test.espresso:espresso-core:3.5.1'
implementation
(
group:
'com.mdd.payment'
,
name:
'mybanklibrary-release'
,
version:
'3.8.1
3
'
,
ext:
'aar'
)
implementation
(
group:
'com.mdd.payment'
,
name:
'organicdrv-release'
,
version:
'2.1.
4
'
,
ext:
'aar'
)
implementation
(
group:
'com.mdd.payment'
,
name:
'mybanklibrary-release'
,
version:
'3.8.1
9-P18Q
'
,
ext:
'aar'
)
implementation
(
group:
'com.mdd.payment'
,
name:
'organicdrv-release'
,
version:
'2.1.
8-P18Q
'
,
ext:
'aar'
)
implementation
(
group:
'com.mdd.payment'
,
name:
'paxlibrary-release'
,
version:
'2.1.5'
,
ext:
'aar'
)
implementation
(
group:
'com.mdd.payment'
,
name:
'aar-deviceid-release'
,
version:
'2.0.13'
,
ext:
'aar'
)
implementation
(
group:
'com.mdd.payment'
,
name:
'isodeplibrary-release'
,
version:
'2.1.8-P18Q'
,
ext:
'aar'
)
implementation
(
group:
'com.mdd.payment'
,
name:
'nativecripto-release'
,
version:
'2.0.1'
,
ext:
'aar'
)
implementation
(
group:
'com.mdd.payment'
,
name:
'p18q_x1-release'
,
version:
'2.0.4'
,
ext:
'aar'
)
implementation
(
group:
'com.mdd.payment'
,
name:
'creatort301t003-release'
,
version:
'1.0.3'
,
ext:
'aar'
)
// retrofit
implementation
'com.squareup.retrofit2:retrofit:2.9.0'
...
...
app/src/main/java/id/mdd/prepaidbank/MainActivity.kt
View file @
5207e2cb
...
...
@@ -26,7 +26,7 @@ class MainActivity : AppCompatActivity() {
private
val
TAG
:
String
=
"PrepaidBank"
private
val
DEFAULT_TIMEOUT
:
Int
=
5000
lateinit
var
myReader
:
readerLib
val
idxDriver
:
Int
=
halDriver
.
USE_P
AX_ENGGINE
val
idxDriver
:
Int
=
halDriver
.
USE_P
18q_x1
lateinit
var
aarDevice
:
AarDeviceId
lateinit
var
debugToken
:
String
lateinit
var
nativeLibrary
:
nativeLib
...
...
@@ -38,6 +38,7 @@ class MainActivity : AppCompatActivity() {
lateinit
var
balanceButton
:
Button
lateinit
var
deductButton
:
Button
val
tokenUnlock
=
""
//PROVIDE BY MDD
private
val
accessToken
=
"9ef471364bca478faf77f8cc0710b7c4"
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
...
...
@@ -52,7 +53,9 @@ class MainActivity : AppCompatActivity() {
nativeLibrary
=
nativeLib
(
this
,
idxDriver
)
aarDevice
=
AarDeviceId
(
this
)
// aarDevice.init(accessToken, DeviceEnvironment.PROD)
val
accessTokenInit
=
"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJhdXRoLXNlcnZpY2U6MS4wLjAiLCJzdWIiOnsibmFtZSI6IlRyYW5zSmFrYXJ0YSIsInVzZXJuYW1lIjoidGoiLCJhdXRoX2xldmVsIjoiTUVSQ0hBTlRfR1JPVVAiLCJtaWQiOiJUSiJ9LCJpYXQiOjE1ODkxMjc5NTksImV4cCI6MTc0NjkxMjcxOSwibmJmIjoxNTg5MTI3OTYxfQ.YmCfzXR3j2B9LDogPUKgF32OD4d3hNucrQeadM7tywu3JHB31xvlVaqfzmzBdBgm8Xn8s4u20_6tGQCQ9rTq62UGWIoMr2Tq_sUmcRoX61N_QfgCJVbamtmDh_lGcpwQIzm1782kJsMYQRLRCk7bYfTt6RCpbNJzwLJIrFDHNeAEhnNs7L3-v4PFmIf4hbjpmTqPlWZIMvJrBG8SUdTdsmlzehus--XGzU2l4y5CIj6m09qfxZluRP45KFlHLbPln4DIac-8wpKhDYx3gSiIuacCI4dWIc837GuC8yDyr3TmIz4VV7PsjEl_NmQ6tEof2CyBy-L3NJRqLluGRGtA0w"
aarDevice
.
init
(
accessTokenInit
,
DeviceEnvironment
.
PROD
)
debugToken
=
nativeLibrary
.
generateDebugCert
()
...
...
@@ -77,18 +80,19 @@ class MainActivity : AppCompatActivity() {
}
fun
activation
()
{
fun
activation
():
Boolean
{
val
unlockAarResponse
:
UnlockAarResponse
=
aarDevice
.
unlockLibrary
(
tokenUnlock
,
accessToken
,
DeviceEnvironment
.
UNLOCK
,
aarDevice
.
getDeviceId
(),
debugToken
,
"1"
)
val
debugResponse
:
String
=
unlockAarResponse
.
getData
().
getDebugResponse
()
val
debugResponse
:
String
=
unlockAarResponse
.
data
.
debugResponse
myReader
=
readerLib
(
this
,
false
,
idxDriver
)
myReader
.
activateDebug
(
this
,
debugResponse
)
var
flash
:
configFlash
?
=
null
if
(
myReader
.
readerFlashAvail
())
{
val
blockSize
=
IntArray
(
1
)
...
...
@@ -129,23 +133,23 @@ class MainActivity : AppCompatActivity() {
val
merriedCode
=
utilsLib
.
HexStringToByteArray
(
"BE749E8D73438335E7329BF749DF1F27"
)
val
bniTid
=
utilsLib
.
HexStringToByteArray
(
"06911101"
)
myReader
.
bniSetConfig
(
merriedCode
,
bniTid
)
myReader
.
readerBniSetSamSlot
(
OrganicDriver
.
ORGANIC_SAM
1
)
myReader
.
readerBniSetSamSlot
(
OrganicDriver
.
ORGANIC_SAM
3
)
}
if
(
myReader
.
bcaEnabled
())
{
val
bcamid
:
String
=
""
val
bcatid
:
String
=
""
val
bcamid
:
String
=
"
000885000015999
"
val
bcatid
:
String
=
"
ECR00001
"
val
bcaMinBalance
:
Int
=
0
myReader
.
readerBcaSetSamSlot
(
OrganicDriver
.
ORGANIC_SAM
1
)
myReader
.
readerBcaSetSamSlot
(
OrganicDriver
.
ORGANIC_SAM
4
)
val
strlogRsp
=
arrayOfNulls
<
String
>(
1
)
myReader
.
bcaSetConfig
(
bcamid
,
bcatid
,
bcaMinBalance
,
strlogRsp
)
}
if
(
myReader
.
briEnabled
())
{
val
brimid
=
utilsLib
.
HexStringToByteArray
(
""
)
val
britid
=
utilsLib
.
HexStringToByteArray
(
""
)
val
brimid
=
utilsLib
.
HexStringToByteArray
(
"
0000001995170000
"
)
val
britid
=
utilsLib
.
HexStringToByteArray
(
"
10258170
"
)
val
briprocode
=
utilsLib
.
HexStringToByteArray
(
"
012345
"
)
utilsLib
.
HexStringToByteArray
(
"
808190
"
)
val
batch
:
Int
=
3
val
reference
:
Int
=
1
myReader
.
briSetConfig
(
brimid
,
britid
,
briprocode
,
batch
.
toByte
(),
reference
)
...
...
@@ -321,6 +325,7 @@ class MainActivity : AppCompatActivity() {
myReader
.
ledSetIdle
()
myReader
.
ledSetOk
()
runOnUiThread
(
Runnable
{
Log
.
d
(
"Deduct"
,
"RC: "
+
String
.
format
(
"%04X"
,
errorCode
[
0
]))
Log
.
d
(
"Deduct"
,
"Report:"
+
report
[
0
])
tvBalance
.
setText
(
String
.
format
(
...
...
build.gradle
View file @
5207e2cb
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript
{
repositories
{
google
()
mavenCentral
()
maven
{
url
=
uri
(
"https://plugins.gradle.org/m2/"
)
}
maven
{
url
"https://mobile-repo.mdd.co.id:8081/artifactory/android-library/"
allowInsecureProtocol
(
true
)
credentials
{
username
=
"partner"
password
=
"Partner*123#"
}
}
}
dependencies
{
classpath
"org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20"
classpath
"org.jfrog.buildinfo:build-info-extractor-gradle:4.28.1"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
plugins
{
id
'com.android.application'
version
'8.2.2'
apply
false
id
'com.android.application'
version
'8.2.2'
apply
false
id
'org.jetbrains.kotlin.android'
version
'1.9.22'
apply
false
}
gradle/wrapper/gradle-wrapper.properties
View file @
5207e2cb
#T
ue Feb 06 14:50:14 WIB 2024
#T
hu Mar 13 14:11:46 WIB 2025
distributionBase
=
GRADLE_USER_HOME
distributionPath
=
wrapper/dists
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-8.
2
-bin.zip
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-8.
10
-bin.zip
zipStoreBase
=
GRADLE_USER_HOME
zipStorePath
=
wrapper/dists
settings.gradle
View file @
5207e2cb
...
...
@@ -17,8 +17,8 @@ dependencyResolutionManagement {
url
"https://mobile-repo.mdd.co.id:8081/artifactory/android-library/"
allowInsecureProtocol
(
true
)
credentials
{
username
=
"
admin
"
password
=
"
Mddcoid
*123#"
username
=
"
partner
"
password
=
"
Partner
*123#"
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment