Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
Dolan SelfService Topup
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
Faizol
Dolan SelfService Topup
Commits
241a3a09
Commit
241a3a09
authored
Dec 06, 2022
by
Izol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adjust_print_status_method_transactions_anomali
parent
da73a8b7
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
28 deletions
+45
-28
workspace.xml
.idea/workspace.xml
+5
-11
workspace.xml
android/.idea/workspace.xml
+2
-8
MainActivity.kt
...rc/main/kotlin/com/example/self_service_3/MainActivity.kt
+20
-6
reader_flutter.dart
lib/reader/reader_flutter.dart
+4
-0
home_page.dart
lib/ui/pages/home_page.dart
+14
-3
No files found.
.idea/workspace.xml
View file @
241a3a09
...
...
@@ -15,15 +15,9 @@
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"8704a1d9-96ef-4cdc-ac57-c88bc9c0306e"
name=
"Default Changelist"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/android/.gradle/7.4/executionHistory/executionHistory.bin"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/android/.gradle/7.4/executionHistory/executionHistory.bin"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/android/.gradle/7.4/executionHistory/executionHistory.lock"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/android/.gradle/7.4/executionHistory/executionHistory.lock"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/android/.gradle/7.4/fileHashes/fileHashes.bin"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/android/.gradle/7.4/fileHashes/fileHashes.bin"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/android/.gradle/7.4/fileHashes/fileHashes.lock"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/android/.gradle/7.4/fileHashes/fileHashes.lock"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/android/.gradle/buildOutputCleanup/outputFiles.bin"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/android/.gradle/buildOutputCleanup/outputFiles.bin"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/android/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/android/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/
daemon/7.4/registry.bin"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/daemon/7.4/registry.bin
"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/
daemon/7.4/registry.bin.lock"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/daemon/7.4/registry.bin.lock
"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/
android/app/src/main/kotlin/com/example/self_service_3/MainActivity.kt"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/android/app/src/main/kotlin/com/example/self_service_3/MainActivity.kt
"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/
lib/reader/reader_flutter.dart"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/lib/reader/reader_flutter.dart
"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/lib/ui/pages/home_page.dart"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/lib/ui/pages/home_page.dart"
afterDir=
"false"
/>
</list>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
...
...
@@ -131,17 +125,17 @@
<breakpoints>
<line-breakpoint
enabled=
"true"
suspend=
"THREAD"
type=
"Dart"
>
<url>
file://$PROJECT_DIR$/lib/reader/reader_flutter.dart
</url>
<line>
1
09
</line>
<line>
1
13
</line>
<option
name=
"timeStamp"
value=
"1"
/>
</line-breakpoint>
<line-breakpoint
enabled=
"true"
suspend=
"THREAD"
type=
"Dart"
>
<url>
file://$PROJECT_DIR$/lib/reader/reader_flutter.dart
</url>
<line>
11
0
</line>
<line>
11
4
</line>
<option
name=
"timeStamp"
value=
"2"
/>
</line-breakpoint>
<line-breakpoint
enabled=
"true"
suspend=
"THREAD"
type=
"Dart"
>
<url>
file://$PROJECT_DIR$/lib/reader/reader_flutter.dart
</url>
<line>
11
2
</line>
<line>
11
6
</line>
<option
name=
"timeStamp"
value=
"3"
/>
</line-breakpoint>
</breakpoints>
...
...
android/.idea/workspace.xml
View file @
241a3a09
...
...
@@ -15,15 +15,9 @@
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"d7f16c77-9245-4a59-8524-9e417f68f24f"
name=
"Changes"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/../.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/../.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.gradle/7.4/executionHistory/executionHistory.bin"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.gradle/7.4/executionHistory/executionHistory.bin"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.gradle/7.4/executionHistory/executionHistory.lock"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.gradle/7.4/executionHistory/executionHistory.lock"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.gradle/7.4/fileHashes/fileHashes.bin"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.gradle/7.4/fileHashes/fileHashes.bin"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.gradle/7.4/fileHashes/fileHashes.lock"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.gradle/7.4/fileHashes/fileHashes.lock"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.gradle/buildOutputCleanup/buildOutputCleanup.lock"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.gradle/buildOutputCleanup/buildOutputCleanup.lock"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.gradle/buildOutputCleanup/outputFiles.bin"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.gradle/buildOutputCleanup/outputFiles.bin"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/
../daemon/7.4/registry.bin"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/../daemon/7.4/registry.bin
"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/../
daemon/7.4/registry.bin.lock"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/../daemon/7.4/registry.bin.lock
"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/
app/src/main/kotlin/com/example/self_service_3/MainActivity.kt"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/app/src/main/kotlin/com/example/self_service_3/MainActivity.kt
"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/../
lib/reader/reader_flutter.dart"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/../lib/reader/reader_flutter.dart
"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/../lib/ui/pages/home_page.dart"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/../lib/ui/pages/home_page.dart"
afterDir=
"false"
/>
</list>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
...
...
android/app/src/main/kotlin/com/example/self_service_3/MainActivity.kt
View file @
241a3a09
package
com.example.self_service_3
import
android.graphics.Bitmap
import
android.graphics.BitmapFactory
import
android.graphics.BitmapFactory.decodeResource
import
android.graphics.Color
import
android.graphics.Paint
import
android.graphics.drawable.Drawable
...
...
@@ -51,6 +48,8 @@ class MainActivity : MethodChannel.MethodCallHandler, FlutterActivity(), MifareT
val
serviceCharge
=
call
.
argument
<
String
>(
"service_charge"
)
val
serviceChargeAmount
=
call
.
argument
<
String
>(
"service_charge_amount"
)
val
denom
=
call
.
argument
<
String
>(
"denom"
)
val
metodeBayar
=
call
.
argument
<
String
>(
"metode_bayar"
)
val
status
=
call
.
argument
<
String
>(
"status"
)
generateReceipt
(
ticketJson
!!
,
...
...
@@ -62,6 +61,8 @@ class MainActivity : MethodChannel.MethodCallHandler, FlutterActivity(), MifareT
serviceCharge
!!
.
toInt
(),
serviceChargeAmount
!!
.
toInt
(),
denom
!!
.
toInt
(),
metodeBayar
!!
,
status
!!
)
}
"init_mifare_lib"
->
{
...
...
@@ -231,7 +232,9 @@ class MainActivity : MethodChannel.MethodCallHandler, FlutterActivity(), MifareT
prevBalance
:
Int
,
serviceCharge
:
Int
,
serviceChargeAmount
:
Int
,
denom
:
Int
denom
:
Int
,
metodeBayar
:
String
,
status
:
String
)
{
val
timeNow
=
Date
()
val
ticket
=
Gson
().
fromJson
(
ticketJson
,
Ticket
::
class
.
java
);
...
...
@@ -245,7 +248,7 @@ class MainActivity : MethodChannel.MethodCallHandler, FlutterActivity(), MifareT
)
if
(
Build
.
MODEL
!=
"T2s"
)
{
va
l
text
=
"""
va
r
text
=
"""
[C]${companyName}
[C]${companyAddress}
[C]${companyPhone}
...
...
@@ -258,11 +261,22 @@ class MainActivity : MethodChannel.MethodCallHandler, FlutterActivity(), MifareT
[L]Isi Saldo : Rp${formatDecimalToPrice(denom.toDouble()).toString()}
[L]Saldo Akhir : Rp${formatDecimalToPrice(ticket.balance!!.toDouble()).toString()}
[L]Biaya Layanan : Rp${formatDecimalToPrice(serviceCharge.toDouble()).toString()}
[L]Jumlah Bayar : Rp${formatDecimalToPrice(serviceChargeAmount.toDouble()).toString()}
[L]Jumlah Bayar : Rp${formatDecimalToPrice(serviceChargeAmount.toDouble()).toString()}
[L]Metode Bayar : ${metodeBayar}
[L]Status : ${status}
[C]--------------------------------
"""
.
trimIndent
()
if
(
status
==
"success"
){
text
+=
"""
[C]Top Up Berhasil
[C]powered by dolanapp.com
"""
.
trimIndent
()
}
else
{
text
+=
"""
[C]Top Up Gagal
[C]powered by dolanapp.com
"""
.
trimIndent
()
}
_mifareTicketing
?.
generateReceiptTopup
(
null
,
text
,
bitmapIcon
)
}
else
{
var
receiptLayout
:
ReceiptBuilder
=
ReceiptBuilder
(
570
)
...
...
lib/reader/reader_flutter.dart
View file @
241a3a09
...
...
@@ -50,6 +50,8 @@ class StartService {
String
serviceCharge
,
String
serviceChargeAmount
,
String
denom
,
String
metodeBayar
,
String
status
,
)
async
{
var
result
;
try
{
...
...
@@ -64,6 +66,8 @@ class StartService {
"service_charge"
:
serviceCharge
,
"service_charge_amount"
:
serviceChargeAmount
,
"denom"
:
denom
,
"metode_bayar"
:
metodeBayar
,
"status"
:
status
,
});
}
catch
(
error
)
{
result
=
error
.
toString
();
...
...
lib/ui/pages/home_page.dart
View file @
241a3a09
...
...
@@ -328,6 +328,8 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
String
sca
=
PreferencesHelper
.
getString
(
"multioutletservicechargeamount"
);
String
sc
=
PreferencesHelper
.
getString
(
"multioutletservicecharge"
);
String
metodeBayar
=
"link-aja"
;
String
status
=
"success"
;
_getInfoBalance
(
info
);
infoM
=
await
StartService
.
print
(
info
,
...
...
@@ -338,7 +340,10 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
prevBalance
!,
"1"
,
(
int
.
parse
(
"10"
)
+
int
.
parse
(
"1"
)
+
int
.
parse
(
"0"
)).
toString
(),
denom
.
replaceAll
(
","
,
""
));
denom
.
replaceAll
(
","
,
""
),
metodeBayar
,
status
,
);
isHitApi
=
false
;
}
else
{
print
(
'topup gagal'
);
...
...
@@ -445,14 +450,17 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
});
/*disini juga ga bisa*/
if
(
timer
!=
null
)
timer
?.
cancel
();
// Navigator.pop(context);
String
companyName
,
companyPhone
,
denom
;
String
companyName
,
companyPhone
,
denom
,
metodeBayar
,
status
;
companyName
=
'Rockefeller'
;
companyPhone
=
'TOPUP - GAGAL'
;
companyAddress
=
'st.indonesia, jakarta raya'
;
denom
=
amountController
!.
text
.
replaceAll
(
","
,
""
);
metodeBayar
=
"link-aja"
;
String
sca
=
PreferencesHelper
.
getString
(
"multioutletservicechargeamount"
);
String
sc
=
PreferencesHelper
.
getString
(
"multioutletservicecharge"
);
metodeBayar
=
'Link-aja'
;
status
=
'gagal'
;
StartService
.
print
(
info
,
companyName
.
split
(
"-"
)[
0
],
...
...
@@ -462,7 +470,10 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
prevBalance
!,
"1"
,
(
int
.
parse
(
"10"
)
+
int
.
parse
(
"1"
)
+
int
.
parse
(
"0"
)).
toString
(),
denom
.
replaceAll
(
","
,
""
));
denom
.
replaceAll
(
","
,
""
),
metodeBayar
,
status
,
);
Navigator
.
pop
(
context
);
},
btnOkIcon:
Icons
.
cancel
,
...
...
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