Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
d7233d9
Sync with remote
ishowrunes Jan 10, 2024
3736dd3
Add new config class for sdk operation
ishowrunes Jan 18, 2024
367a562
Update gradle
ishowrunes Jan 19, 2024
78effa7
Add .idea to gitignore
ishowrunes Jan 19, 2024
1989c72
Add new Khalti to control sdk actions
ishowrunes Jan 19, 2024
e7c30b1
Upgrade gradle dependencies
ishowrunes Jan 19, 2024
dd68f65
Update assertion for khalti parameters
ishowrunes Jan 19, 2024
d0194a1
Update kotlin compiler version for compose
ishowrunes Jan 19, 2024
0680c06
Accept recommended suggestion by android studio
ishowrunes Jan 19, 2024
80ddb9b
Accept recommended suggestion by android studio
ishowrunes Jan 19, 2024
e5e9a28
Update target and compile sdk version to 34
ishowrunes Jan 19, 2024
cb288dc
Update compose version
ishowrunes Jan 19, 2024
bea2df4
Update kotlin binary version
ishowrunes Jan 19, 2024
fcabb68
Add test code for khalti test
ishowrunes Jan 19, 2024
aa3a095
Rename onPayment to onPayment result
ishowrunes Feb 19, 2024
1ec5d2d
Add new interface OnMessage
ishowrunes Feb 19, 2024
f7ad51c
Add new interface OnReturn
ishowrunes Feb 19, 2024
324edb7
Remove unwanted fields from PaymentResult
ishowrunes Feb 19, 2024
dcad292
Replace builder pattern with overloaded functions init
ishowrunes Feb 19, 2024
5650ca9
Rename OnPayment to OnPaymentResult
ishowrunes Feb 19, 2024
d811dc6
Add Environment enum
ishowrunes Feb 19, 2024
bdaf039
Remove all function overloading for parameters with default values
ishowrunes Feb 19, 2024
5e01c02
Replace payment url with pidx
ishowrunes Feb 19, 2024
e0fbc24
Add parcelize plugin
ishowrunes Feb 22, 2024
b2ab2b5
Add retrofit for api calls
ishowrunes Feb 22, 2024
655c954
Remove activity and returnUrl as parameter to EPaymentWebClient
ishowrunes Feb 22, 2024
82aeb74
Remove old handleUri function
ishowrunes Feb 22, 2024
1c7e5bc
Access khalti config from cache
ishowrunes Feb 22, 2024
35a2802
Cleanup import
ishowrunes Feb 22, 2024
c9b4cf0
Fetch khalti config from cache
ishowrunes Feb 22, 2024
ebd7839
Add broadcast registration and de-registration to handle closing of p…
ishowrunes Feb 22, 2024
1faa03b
Remove unnecessary fields
ishowrunes Feb 22, 2024
609e243
Separate config fields into separate data class for separation of con…
ishowrunes Feb 22, 2024
f9b79a7
Add support for in-memory caching
ishowrunes Feb 22, 2024
3d61288
Add early implementatin of api service
ishowrunes Feb 22, 2024
cd6b3f9
Add android context to Khalti; required to open PaymentActivity
ishowrunes Feb 22, 2024
8f43b36
Move config fields into KhaltiPayConfig
ishowrunes Feb 22, 2024
a712889
Cache khalti object in cachemanager
ishowrunes Feb 22, 2024
428f3ed
Add support to open PaymentActivity from Khalti object
ishowrunes Feb 22, 2024
6c98627
Add support to close PaymentActivity from Khalti object
ishowrunes Feb 22, 2024
f7906b7
Add support to verify payment
ishowrunes Feb 22, 2024
fa4bf6a
Trigger onReturn callback after page has finished loading
ishowrunes Feb 22, 2024
e401a1b
Add resource directory for urls and string constants
ishowrunes Feb 22, 2024
8f46a0b
Replace hardcoded strings with enums for urls
ishowrunes Feb 22, 2024
d517033
Add service directory
ishowrunes Feb 23, 2024
865c235
Fix typo
ishowrunes Feb 29, 2024
3b4d592
Add custom throwable KFailure
ishowrunes Feb 29, 2024
e710c7a
Add Result for easier error handling
ishowrunes Feb 29, 2024
43f5ed4
Add ErrorUtil for parsing api errors
ishowrunes Feb 29, 2024
0206dd2
Add helper functions for json
ishowrunes Feb 29, 2024
8e8d48a
Mark fields in payment result as serializable
ishowrunes Feb 29, 2024
497ede0
Remove passing config as parameter when verifying
ishowrunes Feb 29, 2024
062adfd
Simplify creation of ApiClient
ishowrunes Feb 29, 2024
f1bde62
Remove hardcoded api headers; add return type
ishowrunes Feb 29, 2024
e329b50
Reformat
ishowrunes Feb 29, 2024
4ed1d45
Add strong return type
ishowrunes Feb 29, 2024
97bf558
Add proper callback invocations
ishowrunes Feb 29, 2024
bb3ed25
Add throwable and code as callback parameters
ishowrunes Feb 29, 2024
2e83257
Add default null value
ishowrunes Feb 29, 2024
a5dd341
Remove nullability
ishowrunes Feb 29, 2024
c52d4dc
Add default value to message
ishowrunes Feb 29, 2024
92e684f
Reflect changes to OnMessage
ishowrunes Feb 29, 2024
7c447bb
Add proper logs to callbacks
ishowrunes Feb 29, 2024
dbadc20
Add verification repo
ishowrunes Feb 29, 2024
fd65d5c
Rename CacheManager to Store
ishowrunes Feb 29, 2024
c368347
Remove callback invocations
ishowrunes Feb 29, 2024
c2bd6ed
Cleanup import
ishowrunes Feb 29, 2024
861e79b
Reflect Store rename
ishowrunes Feb 29, 2024
d0373cb
Show progress bar during status lookup
ishowrunes Feb 29, 2024
ba037a4
Add khalti object as callback parameters
ishowrunes Mar 1, 2024
d604d5d
Pass khalti object through callbacks
ishowrunes Mar 1, 2024
895d3c5
Use named parameters
ishowrunes Mar 1, 2024
4764548
Call ui functions in ui thread
ishowrunes Mar 1, 2024
ae6b250
Pass khalti object through callbacks
ishowrunes Mar 1, 2024
d3d469c
Use named parameters for callbacks to reduce ambiguity
ishowrunes Mar 1, 2024
78a9bbc
Add merchange package name and package version name to store
ishowrunes Mar 1, 2024
0a75609
Remove log and todo
ishowrunes Mar 1, 2024
e0b9698
Use merchant's package name and package version name from store
ishowrunes Mar 1, 2024
3900824
Generate BuildConfig for khalti-android
ishowrunes Mar 1, 2024
9357e55
Add http status code to KFailure.Payment
ishowrunes Mar 1, 2024
3d45cdc
Route all failure cases to onMessage
ishowrunes Mar 1, 2024
be24a8a
Remove old files
ishowrunes Mar 1, 2024
29338a3
Re-organize files
ishowrunes Mar 1, 2024
164bfaf
Remove commented code
ishowrunes Mar 1, 2024
d507ce9
Trigger onMessage callback when user pressed the back button
ishowrunes Mar 4, 2024
a663fd2
Remove unused file
ishowrunes Mar 5, 2024
18a874d
Add experimental version of payment activity for compose ui
ishowrunes Mar 5, 2024
333794e
Add experimental version of payment activity for compose ui
ishowrunes Mar 5, 2024
b53a919
Re-organize ui logic
ishowrunes Mar 5, 2024
53066d9
Add compose dependencies in khalti library
ishowrunes Mar 5, 2024
54900f4
Add error type
ishowrunes Mar 6, 2024
a08a750
Add network util
ishowrunes Mar 6, 2024
33484b0
Add package util
ishowrunes Mar 6, 2024
ba9b151
Add composable for error
ishowrunes Mar 6, 2024
afbd241
Add composable for payment page
ishowrunes Mar 6, 2024
27aa687
Add webview composable
ishowrunes Mar 6, 2024
7c70c39
Use package util
ishowrunes Mar 6, 2024
7d987be
Use segregated composables
ishowrunes Mar 6, 2024
47b82d6
Remove error handling
ishowrunes Mar 6, 2024
37c72f2
Add material icons as dependency
ishowrunes Mar 6, 2024
27b5ed8
Add internet permission
ishowrunes Mar 6, 2024
db05092
Reload page if try again button is pressed
ishowrunes Mar 7, 2024
4784e05
Add refresh button
ishowrunes Mar 7, 2024
ce88d16
Move network listener inside launchEffect to prevent illegal state ex…
ishowrunes Mar 7, 2024
eae257a
Add demo log
ishowrunes Mar 11, 2024
0b8a584
Remove theme
ishowrunes Mar 11, 2024
bd393d4
Add message event types for onMessage
ishowrunes Mar 11, 2024
903b54d
Add message payload for onMessage
ishowrunes Mar 11, 2024
bf43ff5
Remove old payment activity
ishowrunes Mar 11, 2024
d737595
Rename paymentV3activity to paymentActivity
ishowrunes Mar 11, 2024
2fca6eb
Reflect payment activity rename/removal
ishowrunes Mar 11, 2024
146db87
Rename PaymentActivity
ishowrunes Mar 11, 2024
5618c93
Replace crowded parameters with single messagePayload
ishowrunes Mar 11, 2024
1c45a5f
Pass message eventy
ishowrunes Mar 11, 2024
1c2f37d
Add back error handling
ishowrunes Mar 11, 2024
57cc138
Re-invent demo screen page
ishowrunes Mar 11, 2024
2fb8572
Add snackbar for onPaymentResult and onMessage callback
ishowrunes Mar 11, 2024
3d1b8c2
Add viewmodel for KhaltiPaymentPage
ishowrunes Mar 12, 2024
4a8eb7d
Move payment page to payment directory
ishowrunes Mar 12, 2024
336491d
Reflect addition of view model
ishowrunes Mar 12, 2024
34bc5f9
Add progress dialog
ishowrunes Mar 13, 2024
e79b72c
Move loadUrl to factory lamba
ishowrunes Mar 13, 2024
1c50727
Show progress dialog on verification
ishowrunes Mar 13, 2024
f8e1182
Close khalti on payment completion
ishowrunes Mar 13, 2024
c143167
Upgrade dependencies
ishowrunes Mar 18, 2024
944c7a4
Increase minimum sdk to 21
ishowrunes Mar 18, 2024
214459d
Upgrade gradle
ishowrunes Mar 18, 2024
b91f024
Upgrade dependencies
ishowrunes Mar 19, 2024
bd2f67a
Update scripts for deployment
ishowrunes Mar 19, 2024
3b246af
Make pidx and environment editable in demo app
ishowrunes Mar 19, 2024
f9ffac7
Add option to add pidx, public key, return url and environment from t…
ishowrunes Mar 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
local.properties
/app/release/
/khalti-android/build/
/.idea
1 change: 0 additions & 1 deletion .idea/.name

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/compiler.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/copyright/Khalti_Authors.xml

This file was deleted.

12 changes: 0 additions & 12 deletions .idea/copyright/profiles_settings.xml

This file was deleted.

21 changes: 0 additions & 21 deletions .idea/gradle.xml

This file was deleted.

7 changes: 0 additions & 7 deletions .idea/misc.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

14 changes: 8 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
Expand Down Expand Up @@ -37,15 +39,15 @@ android {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion '1.1.1'
kotlinCompilerExtensionVersion '1.5.10'
}
packagingOptions {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
}
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
tasks.withType(KotlinCompile).configureEach {
kotlinOptions {
freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
}
Expand All @@ -54,13 +56,13 @@ android {

dependencies {
implementation "androidx.core:core-ktx:$core_ktx_version"
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1'
implementation 'androidx.activity:activity-compose:1.6.1'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.7.0'
implementation 'androidx.activity:activity-compose:1.8.2'
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
implementation 'androidx.compose.material3:material3:1.1.0-alpha01'
implementation 'androidx.compose.material3:material3:1.2.1'

//implementation "com.khalti:khalti-android:$khaltiVersionName"
// implementation "com.khalti:khalti-android:$khaltiVersionName"
implementation project(path: ':khalti-android')

testImplementation "junit:junit:$junit_version"
Expand Down
11 changes: 4 additions & 7 deletions app/src/main/java/com/khalti/android/demo/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,16 @@ import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.Surface
import androidx.compose.ui.Modifier
import com.khalti.android.demo.composable.DemoScreen
import com.khalti.android.demo.theme.KhaltiTheme

class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

setContent {
KhaltiTheme {
Surface(
Modifier.fillMaxSize(),
) {
DemoScreen()
}
Surface(
Modifier.fillMaxSize(),
) {
DemoScreen()
}
}
}
Expand Down
Loading